최대 확대/축소 수준을 예제 19로 설정하면 타일을 사용할 때 확대/축소가 최대 20까지 증가합니다. 나는 이유를 모른다. 그것은 내가 설정 한 것보다 항상 1 배 더 줌 레벨입니다.iOS Google지도 SDK : 타일 사용시 maxZoom 수준 문제 설정
는 (이것은 구글 SDKDemo 예에서, 난 그냥 내 도메인을 가리 키도록 URL을 변경) 예를 들어 아래를 참조하십시오 :
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:23.614328
longitude:58.545284
zoom:18];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
[mapView_ setMinZoom:5 maxZoom:19];
//mapView_.buildingsEnabled = NO;
//mapView_.indoorEnabled = NO;
mapView_.mapType = kGMSTypeHybrid;
self.view = mapView_;
tileLayer_.map = nil;
// Create a new GMSTileLayer with the new floor choice.
GMSTileURLConstructor urls = ^(NSUInteger x, NSUInteger y, NSUInteger zoom) {
NSString *url = [NSString stringWithFormat:@"http://www.example.com/%tu/%tu/%tu.png", zoom, x, y];
NSLog(@"URL: %@",url);
return [NSURL URLWithString:url];
};
tileLayer_ = [GMSURLTileLayer tileLayerWithURLConstructor:urls];
tileLayer_.map = mapView_;
을 지금, 나는이에 줌을 유지하는 경우 I 인쇄 로그 얻을 것이다.
을2014년 12월 22일 20 : 06 : 02.342 SDKDemos [1792 : 941894] URL : 최대 나는 19 공지 사항으로 설정,하지만 http://www.example.com/20/694778/453520.png
공지 사항, 도메인 후 줌 레벨은 20입니다, 난 Google SDK 버전 1.9 사용