Reputation: 1921
When using the following code zoom 0 - 2 never gets called:
GMSTileURLConstructor urls = ^(NSUInteger x, NSUInteger y, NSUInteger zoom) {
NSString *tileTemplate =[NSString stringWithFormat:@"%@%tu_%tu_%tu.png",tileDirUrl,(zoom),x,y];
NSLog(@"zoom : %tu",zoom);
return [NSURL URLWithString:tileTemplate];
};
GMSCameraPosition *camera = [GMSCameraPosition cameraWithTarget:CLLocationCoordinate2DMake(0, 0) zoom:0.0f];
GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];
[mapView setMinZoom:0 maxZoom:5];
tileLayer_ = [GMSURLTileLayer tileLayerWithURLConstructor:urls];
tileLayer_.map = mapView;
[mapView setMapType:kGMSTypeNone];
My custom map is shown nicely centred but always at zoom level 3.0f (Even if I try to zoom out with a gesture I am locked at zoom level 3.0)
What do I have to do to make GMSMapView show a single 256x256 tile at zoom 0 and 2 tiles at zoom 1?
Upvotes: 1
Views: 509
Reputation: 1573
It will not allow you to zoom out further than the zoom level where both axises of the map covers the view, might that be it?
Upvotes: 1