I am using this code for creating this map:
AGSTiledMapServiceLayer *tiledLayer = [AGSTiledMapServiceLayer
tiledMapServiceLayerWithURL:[NSURL URLWithString:@"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"]]; [self.mapView addMapLayer:tiledLayer withName:@"Tiled Layer"];
[self addSubView:mapView];
return self;
I am returning the self and want to display it like this:
Mymap *myMap = [[Mymap alloc] initWithFrame:CGRectMake(20,20, 100, 100)];
[self.webView addSubView:myMap];
Nothing happens…any ideas?
Use storyboard or xib. Then, add uiview on which add mapview. Now, connect this mapOutlet to the specific class by control drag. And, that’s it, it will show you the map on your device.