6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Geocoder.geocodeでジオコーディング

Posted at

Geocoder.geocode( 住所・緯度経度などの情報 , コールバック関数 )

こんなように

var geo = new google.maps.Geocoder();
geo.geocode({ address: address }, function(results, status) { ・・・ });

あるいは同じですが

var geo = new google.maps.Geocoder();
var ad = {address: address};
geo.geocode(ad, getResult);

function getResult(results, status) { ・・・ }; //コールバック関数

コールバック関数の引数
results:検索結果のいろいろな情報
status:検索結果のステータス(正常にジオコードが返ってきたか?とか)

参考サイト

http://www.nanchatte.com/map/getLatLngByAddress.html
http://altarf.net/computer/google_apis/1642
http://libro.tuyano.com/index3?id=84001&page=4

6
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?