简体   繁体   中英

IPhone Geocoding

There is absolutely no tutorials on geocoding on the iphone. Only reverse geocoding. I have an address, want to convert to coordinates, then display a streetview of that address. How can this be accomplished...

EDIT

The below answer pretty much echos what I found online, but I know this can be accomplished using Googles JSON geocoding. I am working on this now, will update post when I figure out how to pull out the coordinates.

"http://maps.google.com/maps/geo?q="+ address+"&key="+apiKey+"&sensor=false&output=json"

built in forward geocoding is new to iOS5. look at CLGeocoder, which includes methods like geocodeAddressString:completionHandler: . if you want to support pre-iOS5 then you'll have to use another service, eg google's. i haven't used it myself, but a quick search turned up: https://github.com/mjisrawi/iOS-Geocoding-Services which may be of use.

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