googlePlaces string problem iphone
i want to put name having spaces in googlePlaces query sting. my string is:
googleUrl=[[NSString alloc] initWithFormat:@"https://maps.googleapis.com/maps/api/place/search/xml?location=%f,%f&radius=500&name=the burber shop&sensor=fal开发者_JAVA技巧se&key=mykey",ab,bb];
Please note
"&name=the burber shop"
in above string. If i put &name=asda it works but because the burber shop has space in it, it does not work. Please suggest.
2 i want to get full address of all shops. how to do that.
You need to encode the URL.
http://blog.evandavey.com/2009/01/how-to-url-encode-nsstring-in-objective-c.html
精彩评论