Class MapboxVectorStyle

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String glyphUrl
      The optional URL for glyphs.
      private java.lang.String name
      The optional name for the vector style
      private java.util.Map<Source,​ElemStyles> sources
      The required collection of sources with a list of layers that are applicable for that source
      private java.lang.String spriteUrl
      The optional URL for sprites.
      private static java.util.concurrent.ConcurrentHashMap<java.lang.String,​MapboxVectorStyle> STYLE_MAPPING  
      private int version
      The version for the style specification
    • Constructor Summary

      Constructors 
      Constructor Description
      MapboxVectorStyle​(jakarta.json.JsonObject jsonObject)
      Create a new MapboxVector style.
    • Field Detail

      • version

        private final int version
        The version for the style specification
      • name

        private final java.lang.String name
        The optional name for the vector style
      • spriteUrl

        private final java.lang.String spriteUrl
        The optional URL for sprites. This mush be absolute (so it must contain the scheme, authority, and path).
      • glyphUrl

        private final java.lang.String glyphUrl
        The optional URL for glyphs. This may have replaceable values in it.
      • sources

        private final java.util.Map<Source,​ElemStyles> sources
        The required collection of sources with a list of layers that are applicable for that source
    • Method Detail

      • getMapboxVectorStyle

        public static MapboxVectorStyle getMapboxVectorStyle​(java.lang.String url)
        Get a MapboxVector style for a URL
        Parameters:
        url - The url to get
        Returns:
        The Mapbox Vector Style. May be null if there was an error.
      • save

        private void save​(java.lang.String name,
                          java.lang.Object object)
      • getSources

        public java.util.Map<Source,​ElemStylesgetSources()
        Get the generated layer → style mapping
        Returns:
        The mapping (use to enable/disable a paint style)
      • getSpriteUrl

        public java.lang.String getSpriteUrl()
        Get the sprite url for the style
        Returns:
        The base sprite url
      • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object