本文介绍了点击bingmap时如何获取位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello Everyone!
我必须使用Windows 8.1商店项目,我必须使用bingmap或其他地图进行此项目(我尝试了Bing Map)。当我点击地图时,我想采取这一点的位置(Latidude,Longtitude)。
我该怎么办?如果帮助我,我会很开心。
感谢您的答案..:)
Hello Everyone !
I have to a Windows 8.1 store project and I must use bingmap or other maps for this project( I tried Bing Map). When I click on the map I want to take location(Latidude , Longtitude) of the this point.
How can I do? If help me, I will be very happy.
Thanks for answers.. :)
推荐答案
xmlns:Maps="using:Bing.Maps"
<maps:map credentials="{StaticResource BingCredentials}" tapped="MapTapped" xmlns:maps="#unknown" />
Tapped就像这样
The Tapped is like this
private void MapTapped(object sender, TappedRoutedEventArgs e)
{
var pos = e.GetPosition(map);
Location location;
map.TryPixelToLocation(pos, out location);
var latitude= location.Latitude;
var longitude= location.Longitude;
}
参考:
[]
[]
这篇关于点击bingmap时如何获取位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!