/** * Creates a new default Kml Style with a specified ID (given as an attribute value in the start * tag) and assigns specific elements read from the XmlPullParser to the Style. A new style is not * created if it does not have an ID. */ private static void setContainerStyle( XmlPullParser parser, HashMap<String, KmlStyle> containerStyles) throws XmlPullParserException, IOException { if (parser.getAttributeValue(null, "id") != null) { KmlStyle style = KmlStyleParser.createStyle(parser); String styleId = style.getStyleId(); containerStyles.put(styleId, style); } }
/** * Creates a new style map and assigns values from the XmlPullParser parser and stores it into the * container. */ private static void setContainerStyleMap( XmlPullParser parser, HashMap<String, String> containerStyleMap) throws XmlPullParserException, IOException { containerStyleMap.putAll(KmlStyleParser.createStyleMap(parser)); }