Apekshit
Apekshit

Reputation: 847

How to search locations by given a name in iPhone SDK?

I want to search by a name (String) and then get at least 10 matching locations with their longitude and latitude.

Let's say I type 'Jaipur' in my search bar, i need to request some map service and get 10 locations that start with 'Jaipur'.

It seems we cannot do this with Map Kit.

Could someone point me few little tips to get started. It seems Yahoo Maps return JSON with one value. Any API that I could use easily with JSON parsing and example request would be really helpful.

Thanks and Kind Regards,

Upvotes: 0

Views: 585

Answers (2)

ipraba
ipraba

Reputation: 16543

You can access the Google Api

http://maps.google.com/maps/geo?q=yourSearchName&output=xml

This will give details about that searchname provided. You can parse the xml and get latitude and longitude from that details.

The output can be in json and csv also.

Reference for Google Map API

Upvotes: 1

Kevin Sylvestre
Kevin Sylvestre

Reputation: 38012

What about using something like foursquare? They offer a developer API found here.

Upvotes: 0

Related Questions