i want specific area name provided pincode of that area

只谈情不闲聊 提交于 2019-12-05 05:39:30

问题


I need name of an area and city I pass the postal code as a parameter.

For example I tried

http://maps.google.com/maps/api/geocode/json?address=382340&components=country:in&sensor=false

for a postal code in India.

Although this is giving multiple results with irrelevant data. I could get coordinates using the geocode API. I do not need coordinates though, just the area name corresponding to the postal code. How can I achieve this?


回答1:


Try this

http://maps.google.com/maps/api/geocode/json?address=india&components=postal_code:400003&sensor=false

This returns the correct results, which could be further trimmed to get the relevant data.



来源:https://stackoverflow.com/questions/14038206/i-want-specific-area-name-provided-pincode-of-that-area

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!