Optional
colorA PAINT Property
.
"rgba(0, 0, 0, 0)"
ex.
{ "color": "rgba(240, 2, 5, 1)" }
ex.
{ "color": { "inputValue": { "key": "type", "fallback": "blue" } } }
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 string
itself or pull from feature properties using PropertyOptional
cursorthe cursor to use when hovering over the line. Defaults to "default"
Optional
filterA 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" }
]
}
Optional
geoFilter the geometry types that will be drawn.
An empty array will support all geometry types.
Ex. ["line"]
: only draw lines
Defaults to ['line', 'poly']
.
Optional
interactiveif true, when hovering over the line, the property data will be sent to the UI via an Event. Defaults to false
Optional
layerThe source's layer. Default for JSON data
Optional
lchUse LCH coloring instead of RGB. Useful for color changing when the new color is very different from the old one
Optional
maxzoomThe maximum zoom level at which the layer will be visible
Optional
metadataAdditional metadata. Used by style generators.
Optional
minzoomThe minimum zoom level at which the layer will be visible
Optional
nameThe name of the layer - useful for sorting a layer on insert or for removal
Optional
opacityA 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 PropertyOptional
radiusA PAINT Property
.
1
ex.
{ "radius": "rgba(240, 2, 5, 1)" }
ex.
{ "radius": { "inputValue": { "key": "size", "fallback": "blue" } } }
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 PropertyOptional
sourceThe source used to generate the layer
Optional
strokeA PAINT Property
.
"rgba(0, 0, 0, 0)"
ex.
{ "stroke": "rgba(240, 2, 5, 1)" }
ex.
{ "stroke": { "inputValue": { "key": "stroke", "fallback": "blue" } } }
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 string
itself or pull from feature properties using PropertyOptional
strokeA PAINT Property
.
1
ex.
{ "strokeWidth": "rgba(240, 2, 5, 1)" }
ex.
{ "strokeWidth": { "inputValue": { "key": "strokeSize", "fallback": "blue" } } }
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 strokeWidth
itself or pull from feature properties using Property[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 generatorscolor
: Color of the point. Input either a string
pull out the value using a Property.radius
: radial size of the point in pixels. Input either a number
pull out the value using a Property.stroke
: Color of the stroke. Input either a string
pull out the value using a Property.strokeWidth
: the width of the stroke in pixels. Input either a number
pull out the value using a Property.opacity
: the opacity of the point. Choose between [0, 1], or pull out the value using a Property.Optional
visibleWhether the layer is visible or not
Point 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:
color
: Color of the point. Input either astring
pull out the value using a Property.radius
: radial size of the point in pixels. Input either anumber
pull out the value using a Property.stroke
: Color of the stroke. Input either astring
pull out the value using a Property.strokeWidth
: the width of the stroke in pixels. Input either anumber
pull out the value using a Property.opacity
: the opacity of the point. Choose between [0, 1], or pull out the value using a Property.Optional properties:
geoFilter
: [See GeoFilter] filter the geometry types that will be drawn.interactive
: boolean flag. If true, when hovering over the line, the property data will be sent to the UI via an Eventcursor
: [See Cursor] the cursor to use when hovering over the line