2010-07-14 41 views
0

我很新手在iphone s/w開發我是一個應用程序,它需要從xml文件中指定的位置啓動mapview,但在xml文件中「地址」有一些像「3300普羅維登斯博士Ste 6」的空間,但mkmapview顯示的位置0,0,而不是在谷歌API中找到。 所以我會去除這些空間。mapview顯示0,0位置從xml中獲取地址空間

我已經使用谷歌代碼:提前@ 「http://maps.google.com/maps/geo?q=%@&output=csv」,串

感謝

與問候 prateek bhanot

回答

0

你可能想URL編碼參數:

NSString *encodedAddress = [address stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 
NSString *urlLString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv", encodedAddress]; 
+0

太棒了.......謝謝 – 2010-07-14 11:05:45