/** * Adds a ground overlay adds all the ground overlays onto the map and recursively adds all * ground overlays stored in the given containers * * @param groundOverlays ground overlays to add to the map * @param kmlContainers containers to check for ground overlays */ private void addGroundOverlays(HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays, Iterable<KmlContainer> kmlContainers) { addGroundOverlays(groundOverlays); for (KmlContainer container : kmlContainers) { addGroundOverlays(container.getGroundOverlayHashMap(), container.getContainers()); } }
/** * 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()); } }
public void testCreateContainerGroundOverlay() throws Exception { XmlPullParser xmlPullParser = createParser(R.raw.amu_ground_overlay); KmlContainer kmlContainer = KmlContainerParser.createContainer(xmlPullParser); assertEquals(kmlContainer.getGroundOverlayHashMap().size(), 2); }
/** * Adds ground overlays in containers from a given URL onto the map * * @param groundOverlayUrl url of ground overlay * @param kmlContainers containers containing ground overlays to add to the map */ private void addGroundOverlayInContainerGroups(String groundOverlayUrl, Iterable<KmlContainer> kmlContainers, boolean containerVisibility) { for (KmlContainer container : kmlContainers) { boolean isContainerVisible = getContainerVisibility(container, containerVisibility); addGroundOverlayToMap(groundOverlayUrl, container.getGroundOverlayHashMap(), isContainerVisible); if (container.hasContainers()) { addGroundOverlayInContainerGroups(groundOverlayUrl, container.getContainers(), isContainerVisible); } } }