iPhone iOS5 CLGeocoder how to geocode a large (200) set of addresses?

后端 未结 2 565
误落风尘
误落风尘 2020-12-15 01:03

I got a large set of about 200 addresses for which I need to know their latitude and longitude. I\'ve created a method that parses the addresses, and now I\'m trying to get

2条回答
  •  青春惊慌失措
    2020-12-15 01:34

    The answer is you are violating the TOS for Apple's geocoder.

    From the CLGeocoder documentation.

    Applications should be conscious of how they use geocoding. Here are some rules of thumb for using this class effectively:

    Send at most one geocoding request for any one user action. If the user performs multiple actions that involve geocoding the same location, reuse the results from the initial geocoding request instead of starting individual requests for each action. When you want to update the user’s current location automatically (such as when the user is moving), issue new geocoding requests only when the user has moved a significant distance and after a reasonable amount of time has passed. For example, in a typical situation, you should not send more than one geocoding request per minute. Do not start a geocoding request at a time when the user will not see the results immediately. For example, do not start a request if your application is inactive or in the background.

    Apple would be well within their rights to stop providing responses, cut off your app entirely, or even revoke your developer account.

    If you need to process such a large number of address quickly, then you should look into getting a service like Factual for Points of Interest or Data Science Toolkit for postal addresses and geographic regions.


    Update

    Here is the API docs for Places API - Resolve, which is Factual's places geocoder.


    Update 2

    Here is the API for Street Address to Coordinates, which is Data Science Toolkit's location geocoder.

提交回复
热议问题