SPGooglePlacesAutocomplete icon indicating copy to clipboard operation
SPGooglePlacesAutocomplete copied to clipboard

Using onlyObject with the results from geocodeAddressString is faulty

Open markkrenek opened this issue 12 years ago • 0 comments

CLGeocoder geocodeAddressString: completionHandler: may return more than one placemark, which resolveEstablishmentPlaceToPlacemark and resolveGecodePlaceToPlacemark are not anticipating. They use onlyObject to get a placemark out of the results, but that will return nil if the placemarks array contains more than 1 item. The better approach is to always select the 1st placemark, regardless of how many are returned.

markkrenek avatar Nov 14 '12 15:11 markkrenek