0

I went through lot of tutorials which states how to add a mapicon a pushpin on to a map, but all of them require me to hard code the latitude and the longitude or give the address in a text form.

But what i want is to get the geocode (lat and lon values) of any place when and where the user double tap on the map.
Adding a pushpin there is required too.
i am not using bing maps api, using services.maps, Devices.geolocation, map control and other uwp map functionalities only.

Raveen Athapaththu
  • 190
  • 1
  • 1
  • 13

1 Answers1

0

What you need to handle is the MapTapped of the MapControl event to get the geolocation of the place where the pointer is tapped. Something like this would do:

private void MyMap_MapTapped(Windows.UI.Xaml.Controls.Maps.MapControl sender, Windows.UI.Xaml.Controls.Maps.MapInputEventArgs args)
{
    var tappedGeoPosition = args.Location.Position;
    //Do something
}

Check out these official samples on GitHub

Raamakrishnan A.
  • 515
  • 3
  • 14