2
我正在使用Jquery UI自动完成搜索地址使用Google Maps Geocoder,并选择一个地址时,它返回地理编码信息。下面是摘录:谷歌地图地理编码器:返回邮政编码
$('#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()
}
}));
})
},
我需要返回使用“POSTAL_CODE”检查,如果他们生活在允许范围内的能力。以下是一个输出示例:http://maps.googleapis.com/maps/api/geocode/json?address=1601+Main+St+Eaton+Rapids+MI+48864&sensor=false
我该如何定位邮政编码信息?