2017-09-12 58 views
0
  var root = JsonConvert.DeserializeObject<RootObject>(text); 

      double latitude = root.data.location.latitude; 
      double longitude = root.data.location.longitude; 

      //http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true_or_false 
      var GeoCoder = new Geocoder("AIzaSyAPK_C2Q882Jgkbhj_TsKv_xxxxx"); 
      var address = GeoCoder.ReverseGeocode(new LatLng(latitude, longitude)); 

我正在正確定位,我只需要在地圖上顯示它之後,如果我重定向到Google地圖,它將不會自動刷新,請使用此地址顯示地圖。 。在webform上顯示地圖C#

回答