iPhone Google Maps KML Search
Posted
by satyam
on Stack Overflow
See other posts from Stack Overflow
or by satyam
Published on 2010-04-28T09:48:59Z
Indexed on
2010/04/28
9:53 UTC
Read the original article
Hit count: 366
I'm using Google maps with KML Query. But my query string is "Japanese" string "??????" I'm using http://maps.google.co.jp. When requesting data, I'm getting "0" bytes. But the same query when I put in browser, its download a KML file. My code is as follows:
query = [NSString stringWithFormat:@"http://maps.google.co.jp/maps?&near=%f,%f&q=??????&output=kml&num=%d", lat,lon, num];
NSURL* url = [NSURL URLWithString:query]; NSURLRequest* request = [NSURLRequest requestWithURL:url]; NSLog(@"Quering URL = %@", url);
NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] autorelease];
NSData *myData = [NSURLConnection sendSynchronousRequest:request returningResponse: &response error: nil ];
NSInteger errorcode = [response statusCode];
I'm receiving "myData" with 0 bytes. why?
© Stack Overflow or respective owner