Hello,
I am new in ARCGIS development.
I have .tpk & .geodatabase files with me.
I have added mapLayer of AGSLocalTiledLayer, which works perfect.
Then i tried to add layer from geodatabase but it doesn't get added. (If i dont add AGSLocalTiledLayer layer then it shows layer form geodatabase) i m sure i m doing something wrong.
Here is my code.
AGSGDBGeodatabase *gdb = [[AGSGDBGeodatabase alloc]initWithPath:thePathString error:&error];
self.localFeatureTable = [[gdb featureTables] objectAtIndex:0];
self.localFeatureTableLayer = [[AGSFeatureTableLayer alloc] initWithFeatureTable:self.localFeatureTable];
self.localFeatureTableLayer.delegate = self;
for (AGSLayer* lyr in self.mapView.mapLayers) {
if([lyr isKindOfClass:[AGSFeatureLayer class]])
[self.mapView removeMapLayer:lyr];
}
for (AGSFeatureTable* fTable in gdb.featureTables) {
if ([fTable hasGeometry]) {
[self.mapView addMapLayer:[[AGSFeatureTableLayer alloc]initWithFeatureTable:fTable]];
}
}
Please tell me what m i doing wrong, what should be done??
Thanks in advance.