0
私はプロジェクト上でgoogleマップを使って作業しています 私は緯度&を場所の名前から取得する必要があります(都市ではありませんが、街ではカフェ、街ではモール) 。だから私はこのコードGoogle maps geocode places
var geocoder = new google.maps.Geocoder();
geocoder.geocode({ 'address': 'SCC, Sarajevo'}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
alert("location : " + results[0].geometry.location.lat() + " " +results[0].geometry.location.lng());
$("#pretragaBarInput").val("location : " + results[0].geometry.location.lat() + " " +results[0].geometry.location.lng());
} else {
alert("Something got wrong " + status);
}
});
(SCCはサラエボのショッピングモールである) で行きましたしかし、私は、市内中心部からの場所からの正確な緯度& LNGはなく、緯度& LNGを得るいけません。私は他の場所で試したことがあるが、市内中心を指す正確な同じ指針を持っている。
P.これはちょうどその動作しているかどうかを確認するためのデバッグスクリプトです...