如何将拉斯维加斯谷歌地图地址与jQuery格式的长整型相反?

问题描述:

我知道该怎么做反向的JSON格式削谷歌地图与LAC,CI参数,可以,但我可以
找不到这样的方式做一个解析与纬度,经度参数,可以是不可能的?
感谢提前。如何将拉斯维加斯谷歌地图地址与jQuery格式的长整型相反?

+0

你想获得地址使用经纬度,拉长的JSON格式? –

+0

其实是的,或者有什么好主意? – liunx

+1

你看到这个http://code.google.com/apis/maps/documentation/geocoding/ –

+0

它应该是一个评论。 –

既然你标记这个与google-maps关键字,也可以直接在地址解析API从谷歌地图(例如是Gmaps API V3)内:

gmaps.geocoder.geocode({ 'address': address }, function(results, status) { 
     if (status == google.maps.GeocoderStatus.OK) { 
      var marker = new google.maps.Marker({ 
       map: gmaps.map, 
       position: results[0].geometry.location, 
      }); 

      marker.setTitle(address); 

      gmaps.bounds.extend(results[0].geometry.location); 
      gmaps.map.fitBounds(gmaps.bounds); 

      if(typeof(callback) === 'function') { 
       callback(marker); 
      } 
     } else { 
      console.log("Geocode was not successful for the following reason: " + status); 
     } 
    }); 

这个片段将取地址'的几何位置,并绘制在地图上(居住在gmaps.map)。它还会确保所有标记符合地图的界限。