2010-05-10 4 views

Répondre

2

Je ne pense pas qu'il existe un moyen de faire du reverse reverse geocoding, mais je suis nouveau sur l'iPhone, Objective C, Cocoa et XCode, donc. C'est le meilleur article que j'ai pu trouver sur le sujet.

va dans mon « pourrait être bon » tiroir signet :)

Le deuxième exemple d'URL donne un fichier XML que vous pouvez chercher avec initWithContentsOfURL, puis getObjectForKey:@"lat" et getObjectForKey:@"lng" ou quelque chose le long de ces lignes.

5

Cela fonctionne pour moi:

NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv", 
         [addressField.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; 
NSString *locationString = [NSString stringWithContentsOfURL:[NSURL URLWithString:urlString]]; 

bonne chance

Questions connexes