Question

I'm currently forward geocoding a postcode entered by the user via clgeocoder, however i'm getting some odd behaviour.

If the user simply enters a single letter "p" for example, it can sometimes cause the app to become unresponsive, however in the previous implementation (using a google url to convert the data and return it) this issue never occurred.

I've currently put in a check in on the postcode field to force the user to enter more than 1 letter, however it just seems a little hacky, surely the request should time out or return an error if it receives invalid data?

I would have stuck with the google api to forward geocode, i was using this weblink but it seems to stop working: http://maps.google.com/maps/geo?q=address&output=csv

However after looking at a few other posts i found this link http://maps.google.com/maps/geo?q=UKPOSTCODE&output=xml

But i'm wondering if it's ok to use the google url to convert the postcode instead or does this break apples terms and agreements?

One last thing, this was a tutorial i first used before using clgeocoder http://mithin.in/2009/06/22/using-iphone-sdk-mapkit-framework-a-tutorial

Was it helpful?

Solution

The google approach will work, and i have found no information to indicate it would be a breach of the apple agreements, however personally i say going with the built in framework support is probably the most agreeable method to choose. As long as the user has internet access they will be able to actively search for their postcode. The failure on one letter postcodes is an inevitability because of the fact that the database being accessed has limited information.

Hope this helps anyone else.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top