Location Manager (Give road name)
I'm new to iOS programming and is developing an app that requires the user's location. I do not need to plot it onto a map nor any fancy coordinates. All I need is the road name (Whatever Street/Avenue) as a string 开发者_如何学JAVAfor my app to use. I stumbled upon CLLocationManager but it doesn't appear to do that. Appreciate any guidance! Thank you!
Edit: I noticed an app that does it... returned "29 Scotts Road" earlier. That's too detailed. I only need it to return "Scotts Road"
Converting lat/long coordinates to named locations (addresses, cities, states, landmarks, etc) is called reverse geocoding. The built-in support for reverse geocoding is provided MKReverseGeocoder
.
Here's the official documentation:
http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKReverseGeocoder_Class/Reference/Reference.html
精彩评论