kdun0508
kdun0508

Reputation: 75

Bing Maps GeoPosition on Mouse Click

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

Answers (1)

Amit Khese
Amit Khese

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

Related Questions