简体   繁体   中英

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 aproach 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM