Class CompiledStyleSet

java.lang.Object
com.massifmaps.styles.CompiledStyleSet

public class CompiledStyleSet extends Object
Compiled style set definition for vector tiles. Compiled style sets should contains either Mapnik XML stylesheets
with all required assets or CartoCSS JSON-based project files.
  • Constructor Details

    • CompiledStyleSet

      public CompiledStyleSet(AssetPackage assetPackage)
      Constructs a style set from the given asset package.
      If the asset package contains multiple styles (XML or JSON files), the first one (based on lexicographical order) from the root folder is chosen as the current style.
      Parameters:
      assetPackage - The asset package containing compiled style set data and style definition.
    • CompiledStyleSet

      public CompiledStyleSet(AssetPackage assetPackage, String styleName)
      Constructs a style from the given asset package and explicit style name.
      Parameters:
      assetPackage - The asset package containing compiled style set data and style definition.
      styleName - The name of the style to use.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • getStyleName

      public String getStyleName()
      Returns the current style name.
      Returns:
      The current style name.
    • getStyleAssetName

      public String getStyleAssetName()
      Returns the asset name defining the current style name.
      Returns:
      The CartoCSS string used for the style.
    • getAssetPackage

      public AssetPackage getAssetPackage()
      Returns the style asset package.
      Returns:
      The style asset package.