doodypatrick

MapView Layers being added handler

Discussion created by doodypatrick on Feb 3, 2012
I have code that relies on knowing when layers are added and removed from a MapView.

In my application, Layers can be added and removed from the Map in any number of ways - so in the Alpha version of the ArcGIS API, it was nice having LayerViews be children to the MapView. This allowed me to use the MapView.onHierarchyChangeListener to determine when children were added or removed from the map.

However, in the new API, I can no longer use the onHierarchyChangeListener, since Layers are no longer child views. I've looked throughout the API for MapView, but have been unable to find anything that I can use to capture the event where a layer has been added or removed from the MapView.

Is there anything in 1.0.1 I can use to detect when layers are added/removed from the map? If not, are there any plans to add something like this?

Patrick

Outcomes