2016-01-11 61 views
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); 
    } 
}); 
} 

回答

3

“99便士店19-20市场广场威兹比奇PE13 1DZ” 是一个地方没有一个邮政地址。该​​

它可以找到 “19-20市场广场威兹比奇PE13 1DZ”

找到 “99便士店19-20市场广场威兹比奇PE13 1DZ” 使用Places API Library