Get zip code based on lat amp; long?(根据 lat amp; 获取邮政编码长的?)
问题描述
是否有我可以 ping 通的服务或 API,并将 lat/long 作为参数传递,它会返回 lat/long 对所在的邮政编码?这是仅限美国,所以我不必担心国际代码等.
Is there a service or API I can ping, and pass in the lat/long as parameters, where it returns the zip code that lat/long pair is within? This is US-only, so I don't have to worry about international codes, etc.
我觉得谷歌地图的反向地理编码对我来说太重了.如果可能的话,我更喜欢更轻的东西.这将在 javascript 中完成.
I feel like Google Maps' reverse-geocoding is too heavy for me. I'd prefer something lighter, if possible. This will be done in javascript.
推荐答案
叫做反向地理编码(地址查找).要获取 lat: 40.714224, lng: -73.961452 的地址,请使用参数 latlng=40.714224,-73.961452& 查询
(示例) 并返回 JSON 对象或使用 http://maps.googleapis.com/maps/api/geocode/json
sensor=truehttp://maps.googleapis.com/maps/api/geocode/xml
返回 XML 响应 (示例).它来自 Google,而且是免费的.
It is called Reverse Geocoding (Address Lookup). To get address for lat: 40.714224, lng: -73.961452 query http://maps.googleapis.com/maps/api/geocode/json
with parameters latlng=40.714224,-73.961452&sensor=true
(example) and it returns JSON object or use http://maps.googleapis.com/maps/api/geocode/xml
to return XML response (example). It's from Google and it's free.
这篇关于根据 lat & 获取邮政编码长的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:根据 lat & 获取邮政编码长的?


基础教程推荐
- npm start 错误与 create-react-app 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bokeh Div文本对齐 2022-01-01