AnsweredAssumed Answered

populate Layers Tree (TOCViewController) from dynamic MAP, when Base MAP is added

Question asked by suppriya on Mar 27, 2015

hello,

 

my iPad app uses esri GIS 10.2.2. i have added base map and Dynamic Map.

i am showing Layers tree in dynamic Map with TOCViewController, tree with parent - child, populating if i do not add Base (tiled Layer).

but if i add base Map it is not populating....

 

       

 

self.m_tocViewController = [[[TOCViewController alloc] initWithMapView:self.m_mapView] autorelease];

       

        NSURL *mapUrl1 = [NSURL URLWithString:kBaseMap];

        AGSTiledMapServiceLayer *tiledLyr = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:mapUrl1];

        [self.m_mapView addMapLayer:tiledLyr withName:@"Tiled Layer"];

       

        AGSDynamicMapServiceLayer *dynamicLyr = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:mapUrl];

        [self.m_mapView addMapLayer:dynamicLyr withName:mapName];

           

 

if i comment [self.m_mapView addMapLayer:tiledLyr withName:@"Tiled Layer"]; line i get Layer tree.... as below

 

Screen Shot 2015-03-27 at 1.21.47 pm.png

 

i want same result with wen i add base or tiled MAP....  as at present i am getting empty list....

TOCViewController class is provided with AGSSDK for IOS,

Outcomes