Class CartoCSSStyleSet

java.lang.Object
com.massifmaps.styles.CartoCSSStyleSet

public class CartoCSSStyleSet extends Object
CartoCSS style definition for vector tiles. Style sets contain optional asset package,
fonts and other resources can be loaded from the asset package.
  • Constructor Details

    • CartoCSSStyleSet

      public CartoCSSStyleSet(String cartoCSS)
      Constructs a style from CartoCSS string.
      Parameters:
      cartoCSS - The CartoCSS string defining point styling.
    • CartoCSSStyleSet

      public CartoCSSStyleSet(String cartoCSS, AssetPackage assetPackage)
      Constructs a style from CartoCSS string and asset data.
      Parameters:
      cartoCSS - The CartoCSS string defining point styling.
      assetPackage - The optional asset package for the style. Can be null if CartoCSS does not use any local assets.
  • 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.
    • getCartoCSS

      public String getCartoCSS()
      Returns the CartoCSS string used for the style.
      Returns:
      The CartoCSS string used for the style.
    • getAssetPackage

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