Reputation: 75
I was wondering if anyone has an example of how to extract the geoposition(Lat,Lon) from a mouse click on the Bing Maps control. Pretty much I am launching the maps control, and I need to be able to take the Coordinates that are chosen via mouse click(double click) and pass them back into my UWP app.
Upvotes: 0
Views: 212
Reputation: 102
private void Map_MapTapped(Windows.UI.Xaml.Controls.Maps.MapControl sender, Windows.UI.Xaml.Controls.Maps.MapInputEventArgs args)
{
var GeoPosition = args.Location.Position;
string status = "MapTapped at \nLatitude:" + GeoPosition.Latitude + "\nLongitude: " + GeoPosition.Longitude;
rootPage.NotifyUser( status, NotifyType.StatusMessage);
}
here is a answer
Upvotes: 2