Enum MBFunction.FunctionCategory

  • All Implemented Interfaces:
    Serializable, Comparable<MBFunction.FunctionCategory>
    Enclosing class:
    MBFunction

    public static enum MBFunction.FunctionCategory
    extends Enum<MBFunction.FunctionCategory>
    Function category property, zoom, or property and zoom. Defined as:
    • property: Each stop is an array with two elements, the first is a property input value and the second is a function output value. Note that support for property functions is not available across all properties and platforms at this time.
       {  "circle-color": {
            "property": "temperature",
            "stops": [
              [0, 'blue'],
              [100, 'red']
            ]
          }
        }
       
    • zoom: Each stop is an array with two elements: the first is a zoom level and the second is a function output value.
       {  "circle-radius": {
            "stops": [
              [5, 1],
              [10, 2]
            ]
          }
        }
       
    • zoom and property: Each stop is an array with two elements, the first is a property input value and the second is a function output value. Note that support for property functions is not available across all properties and platforms at this time.
       {  "circle-radius": {
            "property": "rating",
            "stops": [
              [{zoom: 0, value: 0}, 0],
              [{zoom: 0, value: 5}, 5],
              [{zoom: 20, value: 0}, 0],
              [{zoom: 20, value: 5}, 20]
            ]
          }
        }
       
    • Enum Constant Detail

      • PROPERTY

        public static final MBFunction.FunctionCategory PROPERTY
        Property functions allow the appearance of a map feature to change with its properties. Property functions can be used to visually differentate types of features within the same layer or create data visualizations.
      • ZOOM

        public static final MBFunction.FunctionCategory ZOOM
        Zoom functions allow the appearance of a map feature to change with map’s zoom level. Zoom functions can be used to create the illusion of depth and control data density.
    • Method Detail

      • values

        public static MBFunction.FunctionCategory[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MBFunction.FunctionCategory c : MBFunction.FunctionCategory.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MBFunction.FunctionCategory valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null