0
我使用谷歌地图API,它适用于除一个特定地址以外的所有地址。这是“99p商店19-20市场Wisbech PE13 1DZ”。当使用谷歌地图我可以找到它,但使用js api它说'零结果'。谷歌地图API找不到一个特定的地址
我的代码:
function mapsSetMark(map, address) {
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'address': address}, function (results, status) {
if (status === google.maps.GeocoderStatus.OK) {
map.setZoom(13);
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
console.log('Geocode was not successful for the following reason: ' + status);
}
});
}