user223814
user223814

Reputation: 51

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!

Upvotes: 1

Views: 1514

Answers (3)

Rich Dominelli
Rich Dominelli

Reputation: 915

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

Upvotes: 1

Scott Densmore
Scott Densmore

Reputation: 1469

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.

Upvotes: 0

Adam Lerman
Adam Lerman

Reputation: 3409

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

Upvotes: 0

Related Questions