我正在尝试使用密码在我的谷歌地图中实现搜索选项...是否可能?任何建议......
答案 0 :(得分:1)
我想你正在使用其他方法,但没有更多细节,这是最好的猜测。
答案 1 :(得分:0)
我知道它很晚才回答这个问题,但它可能有助于其他搜索它的人。转到geonames.org。他们确实有api从邮政编码中获取位置信息。响应包含纬度和经度信息。您可以使用此信息放在地图上。
以下是示例请求和响应:
请求: http://api.geonames.org/postalCodeLookupJSON?postalcode=627357&username=demo&country=IN
以下是回复:
{
"postalcodes": [{
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Karaiyiruppu",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Nanajankulam",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Naranammalpuram",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Pallaikottai",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Sankarnagar",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Tenkulam",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}]
}