ThinkGeo.com    |     Documentation    |     Premium Support

Removed MapTap support

Hi,

Were have been using MapTap ealier like this:

Map.MapTap += (sender, args) => HandleMapTap(args.WorldX, args.WorldY, args.ScreenX, args.ScreenY);

Now MapTap is not raised anymore with 14.3 release. What is the correct way to get those same coordinates from touchscreen tap which were earlier provided by MapTap ?

Br, Simo

Hi Simo,

You can just use the TouchDown event from .NET, like following:

   mapView.TouchDown += MapView_TouchDown
   private void MapView_TouchDown(object sender, System.Windows.Input.TouchEventArgs e)
   {
	   // 1. Get screen point relative to the MapView
	   Point screenPoint = e.GetTouchPoint(MapView).Position;

	   // 2. Convert screen point to world (map) coordinate
	  PointShape worldPoint = mapView.ToWorldCoordinate(screenPoint);
   }

Thanks,
Ben

1 Like