I
- the input typeO
- the output typepublic class SourceFunction<I,O> extends Function<I,O>
Source functions allow the appearance of a map feature to change with its properties. Source functions can be used to visually differentiate types of features within the same layer or create data visualizations. 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.
Modifier and Type | Method and Description |
---|---|
PropertyValue<O> |
getDefaultValue() |
String |
getProperty()
INTERNAL USAGE ONLY
|
Map<String,Object> |
toValueObject()
INTERNAL USAGE ONLY
|
SourceFunction<I,O> |
withDefaultValue(PropertyValue<O> defaultValue)
Set the default value
|
public String getProperty()
public SourceFunction<I,O> withDefaultValue(PropertyValue<O> defaultValue)
defaultValue
- the default value to use when no other applies@Nullable public PropertyValue<O> getDefaultValue()
© 2015–2017 Mapbox. All rights reserved.