Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CLGeocodeCompletionHandler only has one placemark entry

The documentation for

- (void)geocodeAddressString:(NSString *)addressString completionHandler:(CLGeocodeCompletionHandler)completionHandler;

The documentation clearly states:

In the case of forward-geocoding requests, multiple placemark objects may be returned if the provided information yielded multiple possible locations.

states that it returns an array of placemarks. However, even if I search for objects I know for certain have multiple entries (Hollywood, washington, Denmark, main street, ect.) i always only get one entry.

Some people just shrug and say use the google API instead, but i fear for the request limit.

Is there some setting or hack to fix this, or is the CLGeocoder simply broken ?

like image 593
Nils Munch Avatar asked Dec 05 '12 09:12

Nils Munch


1 Answers

I would definitely suggest using Google Geocoding API - it is simply superior. I also argue, that you should not fear the usage limit for Google Geocoding APIs requests.

If you are developing mobile application, I suggest implementing client-side geocoding - that means, that every device queries directly Google API. As it is directly stated in Google's own documentation

geocoding limits are per user session, there is no risk that your application will reach a global limit as your userbase grows.

More info in geocoding strategies docs and geocoding docs.

like image 138
Ivan Trančík Avatar answered Oct 04 '22 14:10

Ivan Trančík