开发者

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

开发者 https://www.devze.com 2023-01-31 09:23 出处:网络
I want to search by a name (String) and then get at least 10 matching locations with their longitude and latitude.

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,


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号