彼らはthat page上で使用しているコードは次のとおりです。
function Geocode()
{
$("#locations").html("");
$("#error").html("");
// geocode with google.maps.Geocoder
var localSearch = new google.maps.Geocoder();
var postcode = $("#postcode").val();
localSearch.geocode({ 'address': postcode },
function(results, status) {
if (results.length == 1) {
var result = results[0];
var location = result.geometry.location;
GotoLocation(location);
}
else if (results.length > 1) {
$("#error").html("Multiple addresses found");
// build a list of possible addresses
var html = "";
for (var i=0; i<results.length; i++) {
html += '<a href="javascript:GotoLocation(new google.maps.LatLng(' +
results[i].geometry.location.lat() + ', ' + results[i].geometry.location.lng() + '))">' +
results[i].formatted_address + "</a><br/>";
}
$("#locations").html(html);
}
else {
$("#error").html("Address not found");
}
});
}
#postcode
を使用すると、そのサイト側のアドレスを入力する場所であり、for
ループ内results[i].geometry.location.lat() + ', ' + results[i].geometry.location.lng()
は、あなたの緯度/長いだろう...
Google TOSによると、Googleマップでジオコーディングを使用する必要があります。それ以外の場合は許可されません。 –