I have a silverlight application that contains Bing map.
I want when the user clicks on someplace on the map to show him the lat/long of the point where he clicked. is that possible ? and how?
I have a silverlight application that contains Bing map. I want when the user
Share
This is very easy to do. I am assuming you know how to set up a mouse handler on the map. The parameter on the handler is of type MapMouseEventArgs, which contains the ViewportPoint Property, which is just an instance of the Point object documenting where on the viewport/map the click occured. You need to translate this viewport point to lat/long coordinates. To do this, use the ViewportPointToLocation Method on your Map object, which as the name implies translates your viewport point to a Location(lag/long) object. After you get the lag/long, just show it to the user however you’d like.