2010-05-09 123 views

回答

13
NSString* url = [NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f", 
              currentLocation.coordinate.latitude, currentLocation.coordinate.longitude, 
              destLocation.coordinate.latitude, destLocation.coordinate.longitude]; 

[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]]; 
+0

非常感谢,它的工作 – Satyam 2010-05-10 04:35:57

+0

嘿感谢它的工作FR我也 – Swati 2010-09-21 10:58:31

0

你有没有尝试过把纬度和经度作为参数?根据我的经验,Google API对于您可以投入的内容非常松散。例如,Google本地API可以采用几乎所有的东西,包括纬度。