i'm quite novice in iphone s/w development i was on an application it requires to start mapview from the location specified in xml file but in xml file "address" having some spaces in it like "3300 Providence Dr Ste 6" but mkmapview show the location 0,0 instead to find开发者_如何学编程 in google api. so what i'll do to remove those spaces.
i have used google code : @"http://maps.google.com/maps/geo?q=%@&output=csv",string
thanks in advance
with regards prateek bhanot
You probably want to URL-encode the parameter:
NSString *encodedAddress = [address stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *urlLString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv", encodedAddress];
精彩评论