/** * Removes all the KML data from the map and clears all the stored placemarks of those which * are in a container. */ private void removeContainers(Iterable<KmlContainer> containers) { for (KmlContainer container : containers) { removePlacemarks(container.getPlacemarksHashMap()); removeGroundOverlays(container.getGroundOverlayHashMap()); removeContainers(container.getContainers()); } }
/** * Removes all the KML data from the map and clears all the stored placemarks */ public void removeLayerFromMap() { removePlacemarks(getAllFeatures()); removeGroundOverlays(mGroundOverlays); if (hasNestedContainers()) { removeContainers(getNestedContainers()); } setLayerVisibility(false); clearStylesRenderer(); }