Working with Geolocation and Google Maps API [HELP]

送分小仙女□ 提交于 2019-12-24 17:59:10

问题


I'm new to the mobile development world and right now I'm building an app that uses jQuery mobile and PhoneGap. Here's my logic:

  • I have a table that contains the users and their addresses. I grab the user address and pass it trough the maps API to catch the location. But I'm doing this for every single record and sometimes the API breaks because the number of simultaneous requests.

How can I know what users are closest to me without running it through the maps API?

Thanks a lot!


回答1:


Rafael, Google limits the number of requests you can do because it's against their TOS to do batch geocoding without paying for a (rather pricey) business license. You'll need to find a service that allows you to geocode addresses en masse.

I would recommend one like LiveAddress API which will not only geocode the addresses but also confirm the validity and fill out missing or incorrect information. Each request to the API may include up to 100 addresses. There's a non-API version if you just want to verify an existing list of addresses in a spreadsheet or CSV file.

I do work at SmartyStreets and would be happy to help you with any other questions about your addresses.



来源:https://stackoverflow.com/questions/11505555/working-with-geolocation-and-google-maps-api-help

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