Class Layers

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  Layers.Type
      The layer type.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.regex.Pattern CURLY_BRACES  
      private static java.lang.String DEFAULT_COLOR  
      private Expression filter
      An optional expression
      private java.lang.String id
      A required unique layer name
      private int maxZoom
      The max zoom for the layer
      private int minZoom
      The min zoom for the layer
      private static java.lang.String PAINT  
      private java.lang.String paintProperties
      Default paint properties for this layer
      private static char SEMI_COLON  
      private java.lang.String source
      A source description to be used with this layer.
      private java.lang.String sourceLayer
      Layer to use from the vector tile source.
      private java.lang.String styleId
      The id for the style -- used for image paths
      private Layers.Type type
      The required type
    • Constructor Summary

      Constructors 
      Constructor Description
      Layers​(jakarta.json.JsonObject layerInfo)
      Create a layer object
      Layers​(java.lang.String styleId, jakarta.json.JsonObject layerInfo)
      Create a layer object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      Expression getFilter()
      Get the filter for this layer
      java.lang.String getId()
      Get the unique id for this layer
      java.lang.String getSource()
      Get the source that this applies to
      java.lang.String getSourceLayer()
      Get the layer that this applies to
      Layers.Type getType()
      Get the type of this layer
      int hashCode()  
      private static java.lang.String parsePaintBackground​(jakarta.json.JsonObject paintObject)  
      private static java.lang.String parsePaintCircle​(jakarta.json.JsonObject paintObject)  
      private static java.lang.String parsePaintFill​(jakarta.json.JsonObject paintObject)  
      private static java.lang.String parsePaintLine​(jakarta.json.JsonObject layoutObject, jakarta.json.JsonObject paintObject)  
      private java.lang.String parsePaintSymbol​(jakarta.json.JsonObject layoutObject, jakarta.json.JsonObject paintObject)  
      java.lang.String toString()
      Converts this layer object to a mapcss entry string (to be parsed later)
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Layers

        public Layers​(jakarta.json.JsonObject layerInfo)
        Create a layer object
        Parameters:
        layerInfo - The info to use to create the layer
      • Layers

        public Layers​(java.lang.String styleId,
                      jakarta.json.JsonObject layerInfo)
        Create a layer object
        Parameters:
        styleId - The id for the style (image paths require this)
        layerInfo - The info to use to create the layer
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the unique id for this layer
        Returns:
        The unique id
      • getType

        public Layers.Type getType()
        Get the type of this layer
        Returns:
        The layer type
      • parsePaintLine

        private static java.lang.String parsePaintLine​(jakarta.json.JsonObject layoutObject,
                                                       jakarta.json.JsonObject paintObject)
      • parsePaintCircle

        private static java.lang.String parsePaintCircle​(jakarta.json.JsonObject paintObject)
      • parsePaintSymbol

        private java.lang.String parsePaintSymbol​(jakarta.json.JsonObject layoutObject,
                                                  jakarta.json.JsonObject paintObject)
      • parsePaintBackground

        private static java.lang.String parsePaintBackground​(jakarta.json.JsonObject paintObject)
      • parsePaintFill

        private static java.lang.String parsePaintFill​(jakarta.json.JsonObject paintObject)
      • toString

        public java.lang.String toString()
        Converts this layer object to a mapcss entry string (to be parsed later)
        Overrides:
        toString in class java.lang.Object
        Returns:
        The mapcss entry (string form)
      • getSource

        public java.lang.String getSource()
        Get the source that this applies to
        Returns:
        The source name
      • getSourceLayer

        public java.lang.String getSourceLayer()
        Get the layer that this applies to
        Returns:
        The layer name
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object