iOS Google map SDK: Setting maxZoom level issue -
i notice when set max zoom level of example 19, zoom go 20. don't know why. it's 1 more zoom level 1 set.
gmscameraposition *camera = [gmscameraposition camerawithlatitude:23.589571946369546 longitude:58.14204730042655 zoom:16]; self.mapview_.camera=camera; self.mapview_.mylocationenabled = yes; self.mapview_.maptype = kgmstypehybrid; self.mapview_.settings.compassbutton = yes; [self.mapview_ setminzoom:5 maxzoom:19]; // creates marker in center of map. gmsmarker *marker = [[gmsmarker alloc] init]; marker.position = cllocationcoordinate2dmake(23.168520, 58.008163); marker.map = self.mapview_; // ------ add layer // implement gmstileurlconstructor // returns tile based on x,y,zoom coordinates, , requested floor 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]; };
how find out maxzoom 20? version of ios maps sdk use?
i tried sample hello map application google maps' github page ios maps sdk version 1.9.1 , put below code in videdidload() method. prints correct max zoom 19.
gmscameraposition *camera = [gmscameraposition camerawithlatitude:23.589571946369546 longitude:58.14204730042655 zoom:16]; mapview_.camera=camera; mapview_.mylocationenabled = yes; mapview_.maptype = kgmstypehybrid; mapview_.settings.compassbutton = yes; // create gmsmapview camera position. mapview_ = [gmsmapview mapwithframe:cgrectzero camera:camera]; [mapview_ setminzoom:5 maxzoom:19]; nslog(@"max zoom: %f", mapview_.maxzoom);
Comments
Post a Comment