有没有JavaScript或Python/Django web服务来对街道地址进行地理编码?

2024-05-23 23:33:34 发布

您现在位置:Python中文网/ 问答频道 /正文

是否有一个通用的JavaScript或者Python/Django或其他开源web服务或API来查找给定街道地址的地理位置?http://www.braincastexception.com/wp7-web-services-first-part-geocodeservice/做我想做的,显然是用C。JavaScript或开源项目中是否可以查询类似的内容?在

在德瓦安克斯


Tags: djangocomapiwebhttp地址wwwservice
3条回答

查看Gisgraphy一个免费的开源地理服务。在

每个人都会告诉你使用googlemapsapi,但是要阅读terms of use。在

(g) No Use of Content without a Google Map. You must not use or display the Content without a corresponding Google map, unless you are explicitly permitted to do so in the Maps APIs Documentation, or through written permission from Google. In any event, you must not use or display the Content on or in conjunction with a non-Google map. For example, you must not use geocodes obtained through the Service in conjunction with a non-Google map. As another example, you must not display Street View imagery alongside a non-Google map, but you may display Street View imagery without a corresponding Google map because the Maps APIs Documentation explicitly permits you to do so.

因此,对于googleapi,您必须使用Google地图。所以如果你需要地图,你就可以了。在

您可以通过使用LiveAddress API来规避Google、Bing和其他提供商的限制性TOS。我在SmartyStreets工作并帮助维护它。在

虽然Google只会粗略估计地址(换句话说,返回不存在的地址的结果),但LiveAddress将验证地址的存在并只返回有效结果,以及其他一些有关它的有价值的数据。在

这里是Python示例代码:https://github.com/smartystreets/LiveAddressSamples/tree/master/python

这里的Javascript示例: http://jsfiddle.net/user/smartystreets/fiddles/和{a5}(使用jQuery)和{a6}。在

您可以使用Google Maps JavaScript API。你可以找到一个你想要的例子here。在

相关问题 更多 >