/** * Gets the visibility of the container * * @param kmlContainer container to check visibility of * @param isParentContainerVisible true if the parent container is visible, false otherwise * @return true if this container is visible, false otherwise */ static boolean getContainerVisibility(KmlContainer kmlContainer, boolean isParentContainerVisible) { boolean isChildContainerVisible = true; if (kmlContainer.hasProperty("visibility")) { String placemarkVisibility = kmlContainer.getProperty("visibility"); if (Integer.parseInt(placemarkVisibility) == 0) { isChildContainerVisible = false; } } return (isParentContainerVisible && isChildContainerVisible); }
public void testCreateContainerProperty() throws Exception { XmlPullParser xmlPullParser = createParser(R.raw.amu_basic_folder); KmlContainer kmlContainer = KmlContainerParser.createContainer(xmlPullParser); assertTrue(kmlContainer.hasProperties()); assertEquals(kmlContainer.getProperty("name"), "Basic Folder"); xmlPullParser = createParser(R.raw.amu_unknown_folder); kmlContainer = KmlContainerParser.createContainer(xmlPullParser); assertTrue(kmlContainer.hasProperty("name")); }