private void Map_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Map map = (sender as Map); Point p = e.GetPosition(map); GeoCoordinate location = (map).ConvertViewportPointToGeoCoordinate(p); VibrateController.Default.Start(TimeSpan.FromMilliseconds(500)); MapPointMessage.Send(Coordinate.FromGeoCoordinate(location)); }
private void Map_Tap(object sender, System.Windows.Input.GestureEventArgs e) { GeoCoordinate location; bool canConvert = (sender as Map).TryViewportPointToLocation(e.GetPosition(sender as Map), out location); VibrateController.Default.Start(TimeSpan.FromMilliseconds(500)); if (canConvert) { MapPointMessage.Send(Coordinate.FromGeoCoordinate(location)); } }