【发布时间】:2011-12-05 02:48:25
【问题描述】:
我正在使用jQuery UI来使用Google Maps Geocoder,以及选择地址时,返回地理码信息。这是sn-p:
$('#address-dropdown').autocomplete({
//Use geocoder to fetch lat+long values from an address input using google maps API
source: function(request, response) {
geocoder.geocode( {'address': request.term }, function(results, status) {
response($.map(results, function(item) {
return {
label: item.formatted_address,
value: item.formatted_address,
location: item.geometry.location,
latitude: item.geometry.location.lat(),
longitude: item.geometry.location.lng()
}
}));
})
},
我需要能够返回使用“邮政编码”以检查他们是否居住在允许的区域内。这是一个示例输出:http://maps.googleapis.com/maps/api/geocode/json?address=1601+Main+St+Eaton+Rapids+MI+48864&sensor=false
如何定位 postal_code 信息?
【问题讨论】:
标签: jquery google-maps-api-3 geocoding google-geocoder