如何获取多个地址的经纬度地理位置 [英] How to get longitude latitude of multiple addresses geo-location
问题描述
我使用地理位置api http:// maps.google.com/maps/api/geocode/json?address=ADDRESS&sensor=false
I am using geo location api http://maps.google.com/maps/api/geocode/json?address=ADDRESS&sensor=false
但问题是我已经超过500-1000结果谁是长/我需要。
But the problem is I have above 500-1000 results who's long/lat I need. What I loop through geolocation api it nearly stuck the page.
有没有更好的解决方案?
Is there any better solution for this?
推荐答案
您需要提前进行地理编码并将结果存储在本地数据库中。当为用户加载页面时,不宜对这么多点进行地理编码。
You need to geocode ahead of time and store the results in a local database. It is not appropriate to geocode so many points on the fly when a page loads for the user.
另外,请注意drew010对a中的最大请求数的评论一天。
Also, pay attention to drew010's comment about the max number of requests in a day.
这篇关于如何获取多个地址的经纬度地理位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!