We've experienced a similar problem using touch to move graphics. We needed to touch precisely in the middle of the graphic in order to move it. What we've done is to expand the "hit area" around the graphic by e.g. 25px:
internal async void OnTouchUp(MapView view, TouchEventArgs touchArgs)
{
Point position = touchArgs.GetTouchPoint(view).Position;
TouchDevice device = touchArgs.TouchDevice;
if (UpEventOnMapView(view, device))
{
if (_touchTapChecker.IsTapEvent(device, position))
{
Graphic hitGraphic = await GetSelectedGraphic(view, position);
HandleGraphicTapped(hitGraphic, device);
}
}
}
private async Task<Graphic> GetSelectedGraphic(MapView sender, Point position)
{
Rect touchArea = GetTouchAreaFromPoint(position);
Task<Graphic> graphicTask = graphicsLayer.HitTestAsync(sender, touchArea);
// do parallel tasks here if needed
return await graphicTask;
}
private Rect GetTouchAreaFromPoint(Point point)
{
Point positionLeftUp = new Point(point.X - 25, point.Y - TouchAreaSize);
Point positionRightDown = new Point(point.X + 25, point.Y + TouchAreaSize);
Rect touchPosition = new Rect(positionLeftUp, positionRightDown);
return touchPosition;
}
I hope this helps.Eugen