Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:23.614328
  2. longitude:58.545284
  3. zoom:18];
  4.  
  5. mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
  6.  
  7. [mapView_ setMinZoom:5 maxZoom:19];
  8. //mapView_.buildingsEnabled = NO;
  9. //mapView_.indoorEnabled = NO;
  10. mapView_.mapType = kGMSTypeHybrid;
  11. self.view = mapView_;
  12.  
  13. tileLayer_.map = nil;
  14.  
  15. // Create a new GMSTileLayer with the new floor choice.
  16. GMSTileURLConstructor urls = ^(NSUInteger x, NSUInteger y, NSUInteger zoom) {
  17. NSString *url = [NSString stringWithFormat:@"http://www.example.com/%tu/%tu/%tu.png", zoom, x, y];
  18. NSLog(@"URL: %@",url);
  19. return [NSURL URLWithString:url];
  20. };
  21. tileLayer_ = [GMSURLTileLayer tileLayerWithURLConstructor:urls];
  22. tileLayer_.map = mapView_;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement