0
Google지도와 KML 쿼리를 사용하고 있습니다. 하지만 내 쿼리 문자열은 "일본어"문자열 "마쿠도니드" 나는 http://maps.google.co.jp을 사용하고 있습니다. 데이터를 요청할 때 "0"바이트가 나타납니다. 하지만 브라우저에 넣을 때와 같은 쿼리는 KML 파일을 다운로드합니다. 내 코드는 다음과 같습니다 :iPhone Google지도 KML 검색
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 * 요청 = [NSURLRequest requestWithURL : url]; NSLog (@ "쿼리 URL = % @", url);
NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] autorelease];
NSData *myData = [NSURLConnection sendSynchronousRequest:request returningResponse: &response error: nil ];
NSInteger errorcode = [response statusCode];
"myData"는 0 바이트입니다. 왜?