2012-09-20 34 views

回答

1
    拿到地理位置
  1. 首先用文本塊保存並查看座標。
  2. 現在將其命名爲txtBlock1。

現在,您可以在地圖保持事件中添加以下代碼。

你拿着鼠標的地方。它會顯示經度和緯度的座標。

而且你可以明智任何使用它們作爲一個字符串或位置,其中

mapMain.Hold + =(S,E)=>

   { 
        Point p = e.GetPosition(this.mapMain); 

        GeoCoordinate geo = new GeoCoordinate(); 

        geo = mapMain.ViewportPointToLocation(p); 

        txtBlock1.text = geo.ToString(); 


       }; 

希望它可以幫助... - )

相關問題