2011-06-27 3 views
0

私はjson形式のlac、ciパラメータでGoogleマップを逆行する方法を知っていますが、私は可能です
これは緯度、長いパラメータで解析するのは不可能ですか?
ありがとうございます。json形式のlong型の長いGoogleマップアドレスを逆にする方法はありますか?

+0

lat、long型のJson形式を使用してアドレスを取得したいですか? –

+0

実際にはい、または良いアイデアですか? – liunx

+1

あなたはこれを見ましたかhttp://code.google.com/apis/maps/documentation/geocoding/ –

答えて

0

Googleマップ内から直接もすることができます、google-mapsキーワードでジオコーディングAPIをこれをタグ付けするのでThe Google Geocoding API

+0

コメントでなければなりません。 –

0

を試してみてください(例は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にあるマップにプロットします。また、すべてのマーカーが地図の境界内に収まるようにします。