Class KMLStyleMap

    • Field Detail

      • pairs

        protected java.util.List<KMLPair> pairs
    • Constructor Detail

      • KMLStyleMap

        public KMLStyleMap​(java.lang.String namespaceURI)
        Construct an instance.
        Parameters:
        namespaceURI - the qualifying namespace URI. May be null to indicate no namespace qualification.
    • Method Detail

      • doAddEventContent

        protected void doAddEventContent​(java.lang.Object o,
                                         XMLEventParserContext ctx,
                                         javax.xml.stream.events.XMLEvent event,
                                         java.lang.Object... args)
                                  throws javax.xml.stream.XMLStreamException
        Overrides:
        doAddEventContent in class AbstractXMLEventParser
        Throws:
        javax.xml.stream.XMLStreamException
      • getPairs

        public java.util.List<KMLPair> getPairs()
      • addPair

        protected void addPair​(KMLPair pair)
      • mergeSubStyles

        public KMLAbstractSubStyle mergeSubStyles​(KMLAbstractSubStyle subStyle,
                                                  java.lang.String styleState)
        Obtains the map's effective style for a specified style type (IconStyle, ListStyle, etc.) and state (normal or highlight). The returned style is the result of merging values from the map's style selectors and style URL for the indicated sub-style type, with precedence given to style selectors.

        Remote styleUrls that have not yet been resolved are not included in the result. In this case the returned sub-style is marked with the value AVKey.UNRESOLVED.

        Parameters:
        styleState - the style mode, either \"normal\" or \"highlight\".
        subStyle - an instance of the KMLAbstractSubStyle class desired, such as KMLIconStyle. The effective style values are accumulated and merged into this instance. The instance should not be one from within the KML document because its values may be overridden and augmented. The instance specified is the return value of this method.
        Returns:
        the sub-style values for the specified type and state. The reference returned is the same one passed in as the subStyle argument.
      • mergePairs

        protected void mergePairs​(KMLStyleMap sourceMap)
        Merge a list of incoming pairs with the current list. If an incoming pair has the same ID as an existing one, replace the existing one, otherwise just add the incoming one.
        Parameters:
        sourceMap - the incoming pairs.