Created
May 14, 2013 11:46
-
-
Save ccabanero/5575341 to your computer and use it in GitHub Desktop.
Test - Adding a Cached/Tiled Map Server layer to an AGSMapView. ArcGIS for iOS Runtime SDK.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
//custom navigation bar | |
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed: @"customNavImage"] forBarMetrics:UIBarMetricsDefault]; | |
self.navigationController.navigationBar.translucent = YES; | |
//create an envelope of Seattle | |
AGSEnvelope *seattleExtent = [AGSEnvelope envelopeWithXmin:-13622101.11 ymin:6038257.54 xmax:-13613501.94 ymax:6043990.32 spatialReference:self.agsMapView.spatialReference]; | |
[self.agsMapView zoomToEnvelope:seattleExtent animated:YES]; | |
//add streets base map layer | |
NSString *streetURL = @"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"; | |
AGSTiledMapServiceLayer *streetLayer = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:[NSURL URLWithString:streetURL]]; | |
[self.agsMapView addMapLayer:streetLayer withName:@"streetlayer"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment