OptionalcontrastA PAINT Property.
0
ex.
{ "contrast": 0.5 }
ex.
{ "contrast": { "inputValue": { "key": "contrast", "fallback": 1 } } }
inputValue: [See InputValue] access value in feature propertiesdataCondition: [See DataCondition] filter based on feature property conditionsdataRange: [See DataRange] filter based on feature property rangesinputRange: [See InputRange] filter based on map conditions like "zoom", "lon", "lat", "angle", or "pitch"featureState: [See FeatureState] filter based on feature statefallback: if all else fails, use this value. A value of number itself or pull from feature properties using PropertyOptionalfadeThe duration of the fade in milliseconds. Defaults to 300
OptionalfilterA filter function to filter out features from the source layer.
example:
"filter": { "key": "class", "comparator": "==", "value": "ocean" }
another example:
"filter": {
"or": [
{ "key": "class", "comparator": "==", "value": "ocean" },
{ "key": "class", "comparator": "==", "value": "bay" }
]
}
another example:
"filter": {
"and": [
{ "key": "class", "comparator": "==", "value": "ocean" },
{ "key": "size", "comparator": "==", "value": "large" },
{ "key": "type", "comparator": "!=", "value": "pacific" }
]
}
OptionallayerThe source's layer. Default for JSON data
OptionallchUse LCH coloring instead of RGB. Useful for color changing when the new color is very different from the old one
OptionalmaxzoomThe maximum zoom level at which the layer will be visible
OptionalmetadataAdditional metadata. Used by style generators.
OptionalminzoomThe minimum zoom level at which the layer will be visible
OptionalnameThe name of the layer - useful for sorting a layer on insert or for removal
OptionalopacityA PAINT Property.
1
ex.
{ "opacity": 0.5 }
ex.
{ "opacity": { "inputValue": { "key": "opacity", "fallback": 1 } } }
inputValue: [See InputValue] access value in feature propertiesdataCondition: [See DataCondition] filter based on feature property conditionsdataRange: [See DataRange] filter based on feature property rangesinputRange: [See InputRange] filter based on map conditions like "zoom", "lon", "lat", "angle", or "pitch"featureState: [See FeatureState] filter based on feature statefallback: if all else fails, use this value. A value of opacity itself or pull from feature properties using PropertyOptionalresamplingDecide how the GPU samples the texture. Either nearest or linear. Linear is smoother but nearest has better performance.
Defaults to linear.
OptionalsaturationA PAINT Property.
0
ex.
{ "saturation": 0.5 }
ex.
{ "saturation": { "inputValue": { "key": "saturation", "fallback": 0.5 } } }
inputValue: [See InputValue] access value in feature propertiesdataCondition: [See DataCondition] filter based on feature property conditionsdataRange: [See DataRange] filter based on feature property rangesinputRange: [See InputRange] filter based on map conditions like "zoom", "lon", "lat", "angle", or "pitch"featureState: [See FeatureState] filter based on feature statefallback: if all else fails, use this value. A value of saturation itself or pull from feature properties using PropertyOptionalsourceThe source used to generate the layer
[See LayerStyleBase]
name: the name of the layer, useful for sorting a layer on insert or for removalsource: the name of the source whose data this layer will uselayer: the source's layer. Defaults to "default" for JSON dataminzoom: the minimum zoom level at which the layer will be visiblemaxzoom: the maximum zoom level at which the layer will be visiblefilter: [See Filter] a filter function to filter out features from the source layerlch: use LCH coloring instead of RGB. Useful for color changing when the new color is very different from the old onevisible: whether the layer is visible or notmetadata: additional metadata. Used by style generatorsopacity: the opacity of the raster. Choose between [0, 1], or pull out the value using a Property.saturation: the saturation of the raster. Choose between [-1, 1], or pull out the value using a Property.contrast: the contrast of the raster. Choose between [-1, 1], or pull out the value using a Property.resampling: [See Resampling] The resampling method. Either nearest or linearfadeDuration: The time it takes for each raster tile to fade in and out of view in millisecondsOptionalvisibleWhether the layer is visible or not
Raster Style Guide
Base Properties:
[See LayerStyleBase]
name: the name of the layer, useful for sorting a layer on insert or for removalsource: the name of the source whose data this layer will uselayer: the source's layer. Defaults to "default" for JSON dataminzoom: the minimum zoom level at which the layer will be visiblemaxzoom: the maximum zoom level at which the layer will be visiblefilter: [See Filter] a filter function to filter out features from the source layerlch: use LCH coloring instead of RGB. Useful for color changing when the new color is very different from the old onevisible: whether the layer is visible or notmetadata: additional metadata. Used by style generatorsOptional paint properties:
opacity: the opacity of the raster. Choose between [0, 1], or pull out the value using a Property.saturation: the saturation of the raster. Choose between [-1, 1], or pull out the value using a Property.contrast: the contrast of the raster. Choose between [-1, 1], or pull out the value using a Property.Optional layout properties:
resampling: [See Resampling] The resampling method. EithernearestorlinearfadeDuration: The time it takes for each raster tile to fade in and out of view in milliseconds