开发者

iPhone SDK Mapkit: How can I check if the user's location is in the same street/avenue as a given coordinate?

My iPhone App is an Application that shows users some POI (points of interest) in the MapView. I wanto to give the user the option to turn on a feature that would only highlight the POI's that are in the same street, avenue, route, etc as his.

Is there a way to 开发者_如何学Pythonaproach this?

Thanks a lot!


Sounds like this is more of a database query question then a geo location question. You need to reverse geocode your current location to obtain a street name then query for POI for the same street. This webservice will do the reverse geocode http://www.geonames.org/maps/reverse-geocoder.html

Then you need do do the query to get the POI's for that street. Google maps supports this, and it the POI database is yours you should be able to support the query as well.

Rich


I believe you could do this by reverse geocoding the users location to get the street name, although this is not always exact and would require you already knowing the POIs street name. Check out Google Maps Reverse GeoCoding


I think the best way to solve that problem is to give the user a radius to filter out results. This would reduce your need for reverse geocoding and save on network and battery.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜