Base map is not retaining feature layers

319
0
10-15-2019 01:22 PM
DevendraKhatri
New Contributor III

I have few feature layers rendered on the map, and I have an option to change the base map. When I switch the base map, feature layers get cleared.

Same thing works well with graphics. I understand map behaves differently for graphics overlays and layers.

But, how do I achieve this ?

I have tried one solution, where in I keep the feature layer in one array and do this when I switch base map,

mMapView.getMap().getOperationalLayers().add(geodatabaseFeatureLayer);

but sdk throws a runtime execption "object already owned" for this line. I have map view already declared globally 

Thanks

0 Kudos
0 Replies