id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_66_0.txt | 0
Remove Lines from MapboxGL map | |
mapbox_expressions_layers/mapbox_expressions_48_0.txt | ## any â
Returns ` true ` if any of the inputs are ` true ` , ` false ` otherwise. The
inputs are evaluated in order, and evaluation is short-circuiting: once an
input expression evaluates to ` true ` , the result is ` true ` and no further
input expressions are evaluated.
### Syntax
["any", boole... | |
mapbox_expressions_layers/types2_0_0.txt | Skip to main content
Docs | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_58_0.txt | * Featured on Meta
* Testing a new version of Stack Overflow Jobs
* Policy: Generative AI (e.g., ChatGPT) is banned | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_11_0.txt | 10. Communities for your favorite technologies. Explore all Collectives
2. Teams | |
mapbox_expressions_layers/mapbox_layers_22_0.txt | ## hillshade â
A ` hillshade ` style layer renders digital elevation model (DEM) data on the
client-side. The implementation only supports [ Mapbox Terrain RGB
](https://docs.mapbox.com/help/how-mapbox-works/mapbox-data/#mapbox-terrain-
rgb) and Mapzen Terrarium tiles.
This map of Mount Shasta uses a high value f... | |
mapbox_expressions_layers/mapbox_layers_16_0.txt | ## line â
A ` line ` style layer renders one or more stroked polylines on the map. You
can use a line layer to configure the visual appearance of polyline or
multipolyline features.
This map of a [ Strava ](https://blog.mapbox.com/strava-launches-gorgeous-new-
outdoor-maps-977c74cf37f9) user's hike through Grand ... | |
mapbox_expressions_layers/mapbox_layers_17_8.txt | umber ](/style-spec/reference/types/#number) . Units in ems . Defaults
to ` 1.2 ` . _Requires_ text-field . Supports [ smooth-ramp ` interpolate
` ](/style-spec/reference/expressions/#interpolate) expressions.
Text leading value for multi-line text.
SDK Support | Mapbox GL JS | Android SDK | iOS SDK ... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_77_0.txt | * Technology
* Culture & recreation
* Life & arts
* Science
* Professional
* Business
* API
* Data
* Blog
* Facebook
* Twitter
* LinkedIn
* Instagram | |
mapbox_expressions_layers/115275_42_0.txt | erkanisuf commented Feb 18, 2022
Actually i managed to do it. Did it this way:
This solution worked for me : //This will put color of white for the missing
property | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_42_0.txt | Jan 21, 2022 at 3:12
Add a comment | | |
mapbox_expressions_layers/mapbox_expressions_93_0.txt | ## max â
Returns the maximum value of the inputs.
### Syntax
["max", number, number, ...]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.41.0 | >= 6.0.0 | >= 4.0.0
| |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_16_0.txt | Q&A for work
Connect and share knowledge within a single location that is structured and
easy to search. | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_14_0.txt | ##### Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you
use most. | |
mapbox_expressions_layers/115275_0_0.txt | Skip to content
## Navigation Menu | |
mapbox_expressions_layers/mapbox_layers_17_2.txt | and in between they
are blended together.
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 3.0.0 | >= 11.0.0 | >= 11.0.0
data-driven styling | >= 3.0.0 | >= 11.0.0 | >= 11.0.0
### icon-keep-upright â
[ Layout ](/style-spec/reference/layers... | |
mapbox_expressions_layers/mapbox_expressions_67_0.txt | ## Color â
| |
mapbox_expressions_layers/mapbox_expressions_106_0.txt | ## heatmap-density â
Returns the kernel density estimation of a pixel in a heatmap layer, which is
a relative measure of how many data points are crowded around a particular
pixel. Can only be used in the ` heatmap-color ` property.
### Syntax
["heatmap-density"]: number
clipboard
SDK Sup... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_70_0.txt | #### Hot Network Questions
* Is this bike overkill for me
* Recreate {% cache %} content without clearing first
* Visually arrange multi-day events on a calendar
* How to know when a user was created? but explicitly according with the version of Ubuntu itself
* How is rating calculated for players who h... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_44_0.txt | Thanks for contributing an answer to Stack Overflow!
* Please be sure to answer the question . Provide details and share your research! | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_5_0.txt | Sign up or log in to customize your list.
### more stack exchange communities | |
mapbox_expressions_layers/mapbox_layers_12_0.txt | ## source â
Optional [ string ](/style-spec/reference/types/#string) .
Name of a source description to be used for this layer. Required for all layer
types except ` background ` and ` slot ` .
| |
mapbox_expressions_layers/mapbox_expressions_84_0.txt | ## ceil â
Returns the smallest integer that is greater than or equal to the input.
### Syntax
["ceil", number]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.45.0 | >= 6.0.0 | >= 4.0.0
| |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_74_0.txt | * Questions
* Help
##### Products | |
mapbox_expressions_layers/115275_44_0.txt |
map.setPaintProperty(
'layerName',
'fill-opacity',
["case", ["==", ["get", key], null], 0.1, 0.7]
);
---
👍 1 jdominguezg89 reacted with thumbs up emoji
All reactions | |
mapbox_expressions_layers/color-switcher3_13_0.txt | * The ` triangles ` custom layer, added with ` addLayer ` , uses a custom tileset ( ` examples.ckv9z0wgf5v7c27p7me2mf0l9-9wrve ` ) as a ` vector ` source.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Change a layer's color with buttons</title>
<meta nam... | |
mapbox_expressions_layers/types2_1_0.txt | Maps
Navigation | |
mapbox_expressions_layers/color-switcher3_14_0.txt | clipboard
Join the Mapbox Developers Discord Community arrow-right | |
mapbox_expressions_layers/mapbox_expressions_89_0.txt | ## ln â
Returns the natural logarithm of the input.
### Syntax
["ln", number]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.41.0 | >= 6.0.0 | >= 4.0.0
| |
mapbox_expressions_layers/115275_23_0.txt | Cancel Submit feedback
# Saved searches | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_71_0.txt | more hot questions
Question feed | |
mapbox_expressions_layers/115275_17_0.txt | GitHub community articles
Repositories | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_41_0.txt | * No. This is the mechanism for data-driven styling.
– Steve Bennett | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_1_0.txt | 1. About
2. Products
3. For Teams
1. Stack Overflow Public questions & answers
2. Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
3. Talent Build your employer brand
4. Advertising Reach developers & technologists worldwide
5. Labs The future... | |
mapbox_expressions_layers/mapbox_layers_1_0.txt | ## On this page
* Layer properties
* id
* type
* filter
* layout
* maxzoom
* metadata
* minzoom
* paint
* slot
* source
* source-layer
* Layer sub-properties
* background
* background-color
* background-emissive-strength
* background-opacit... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_22_0.txt | Most of all, I would love to apply a function on the dataset to return the
color of my own choosing based on a feature property value, but so far I
haven't fount anything about it. If you know about it, please point in my
direction:)
If I have the following GeoJSON: | |
mapbox_expressions_layers/mapbox_layers_18_1.txt | DK | iOS SDK
---|---|---|---
basic functionality | >= 3.0.0 | >= 11.0.0 | >= 11.0.0
### raster-color-range â
[ Paint ](/style-spec/reference/layers/#paint-property) property. Optional [
array ](/style-spec/reference/types/#array) of [ number s ](/style-
spec/reference/types/#number) . Defau... | |
mapbox_expressions_layers/mapbox_layers_15_1.txt | ional [
resolvedImage ](/style-spec/reference/types/#resolvedImage) .
Name of image in sprite to use for drawing image fills. For seamless patterns,
image width and height must be a factor of two (2, 4, 8, ..., 512). Note that
zoom-dependent expressions will be evaluated only at integer zoom levels.
SDK Support | ... | |
mapbox_expressions_layers/115275_26_0.txt | Cancel Create saved search
Sign in | |
mapbox_expressions_layers/mapbox_expressions_27_0.txt | ## line-progress â
Returns the progress along a gradient line. Can only be used in the ` line-
gradient ` property.
### Syntax
["line-progress"]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.45.0 | >= 6.5.0 ... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_29_0.txt | edited Jan 18, 2022 at 23:44
hansmei | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_50_0.txt | ### Post as a guest
Name | |
mapbox_expressions_layers/mapbox_layers_5_0.txt | ## filter â
Optional [ expression ](/style-spec/reference/expressions/) .
An expression specifying conditions on source features. Only features that
match the filter are displayed. Zoom expressions in filters are only evaluated
at integer zoom levels. The ` ["feature-state", ...] ` expression is not
supported in... | |
mapbox_expressions_layers/mapbox_expressions_102_0.txt | ## distance-from-center â
Returns the distance of a ` symbol ` instance from the center of the map. The
distance is measured in pixels divided by the height of the map container. It
measures 0 at the center, decreases towards the camera and increase away from
the camera. For example, if the height of the map is 10... | |
mapbox_expressions_layers/mapbox_layers_16_2.txt | ence/layers/#paint-property) property. Optional [
number ](/style-spec/reference/types/#number) . Units in pixels . Defaults
to ` 0 ` . Supports _[ combine ` feature-state ` ](/style-
spec/reference/expressions/#feature-state) _ and [ smooth-ramp ` interpolate
` ](/style-spec/reference/expressions/#interpolat... | |
mapbox_expressions_layers/color-switcher3_6_0.txt | Search
* Guides chevron-down | |
mapbox_expressions_layers/mapbox_layers_14_0.txt | ## background â
The ` background ` style layer covers the entire map. Use a background style
layer to configure a color or pattern to show below all other map content. If
the background layer is transparent or omitted from the style, any part of the
map view that does not show another style layer is transparent.
... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_62_0.txt | 16
Change text color in mapbox cluster map | |
mapbox_expressions_layers/color-switcher3_13_1.txt | = document.getElementById('swatches');
const layer = document.getElementById('layer');
const colors = [
'#ffffcc',
'#a1dab4',
'#41b6c4',
'#2c7fb8',
'#253494',
'#fed976',
'#feb24c',
'#fd8d3... | |
mapbox_expressions_layers/115275_8_0.txt | Manage code changes
* Issues | |
mapbox_expressions_layers/mapbox_expressions_64_0.txt | ## is-supported-script â
Returns ` true ` if the input string is expected to render legibly. Returns `
false ` if the input string contains sections that cannot be rendered without
potential loss of meaning (e.g. Indic scripts that require complex text
shaping, or right-to-left scripts if the the ` mapbox-gl-rtl-t... | |
mapbox_expressions_layers/mapbox_expressions_19_0.txt | ## to-number â
Converts the input value to a number, if possible. If the input is ` null ` or
` false ` , the result is 0. If the input is ` true ` , the result is 1. If
the input is a string, it is converted to a number as specified by the [
"ToNumber Applied to the String Type" algorithm
](https://tc39.github.io... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_8_0.txt | 3. Tags
4. 5. Users | |
mapbox_expressions_layers/115275_9_0.txt | Plan and track work
* Discussions | |
mapbox_expressions_layers/mapbox_expressions_41_0.txt | ## != â
Returns ` true ` if the input values are not equal, ` false ` otherwise. The
comparison is strictly typed: values of different runtime types are always
considered unequal. Cases where the types are known to be different at parse
time are considered invalid and will produce a parse error. Accepts an
optiona... | |
mapbox_expressions_layers/115275_48_0.txt | @erkanisuf Using ` case ` as you've done would be the recommended way to do
this.
---
All reactions
Sorry, something went wrong. | |
mapbox_expressions_layers/mapbox_layers_9_0.txt | ## minzoom â
Optional [ number ](/style-spec/reference/types/#number) between ` 0 ` and `
24 ` inclusive .
The minimum zoom level for the layer. At zoom levels less than the minzoom,
the layer will be hidden.
| |
mapbox_expressions_layers/115275_50_0.txt | Assignees
No one assigned | |
mapbox_expressions_layers/mapbox_expressions_94_0.txt | ## min â
Returns the minimum value of the inputs.
### Syntax
["min", number, number, ...]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.41.0 | >= 6.0.0 | >= 4.0.0
| |
mapbox_expressions_layers/mapbox_expressions_2_0.txt | ## Data expressions â
A **data expression** is any expression that accesses feature data â that
is, any expression that uses one of the data operators: ` get ` , ` has ` ,
` id ` , ` geometry-type ` , ` properties ` , or ` feature-state ` . Data
expressions allow a feature's properties or state to determine... | |
mapbox_expressions_layers/types2_11_0.txt | ## Color â
The ` color ` type is a color in the sRGB color space . Colors are JSON
strings in a variety of permitted formats: HTML-style hex values, RGB, RGBA,
HSL, and HSLA. Predefined HTML colors names, like ` yellow ` and ` blue ` ,
are also permitted. | |
mapbox_expressions_layers/color-switcher3_10_0.txt | * How-to Videos share
* All docs chevron-right
* Mapbox GL JS chevron-right
* Examples chevron-right
* Change a layer's color with buttons | |
mapbox_expressions_layers/mapbox_expressions_69_0.txt | ## hsla â
Creates a color value from hue (range 0-360), saturation and lightness
components (range 0-100), and an alpha component (range 0-1). If any component
is out of range, the expression is an error.
### Syntax
["hsla", number, number, number, number]: color
clipboard
SDK Support | ... | |
mapbox_expressions_layers/mapbox_expressions_37_0.txt | ## measure-light â
Returns a requested property of the light configuration based on the supplied
options. Currently the only supported option is ` brightness ` which returns
the global brightness value of the lights on a scale of 0 to 1, where 0 means
total darkness and 1 means full brightness. This expression wor... | |
mapbox_expressions_layers/mapbox_expressions_8_0.txt | ## boolean â
Asserts that the input value is a boolean. If multiple values are provided,
each one is evaluated in order until a boolean is obtained. If none of the
inputs are booleans, the expression is an error.
### Syntax
["boolean", value]: boolean
clipboard
["boolean", v... | |
mapbox_expressions_layers/mapbox_expressions_61_0.txt | ## String â
| |
mapbox_expressions_layers/mapbox_layers_0_0.txt | Skip to main content
[ ](https://www.mapbox.com)
[ Docs ](https://docs.mapbox.com)
[ Maps ](https://docs.mapbox.com/#maps)
[ Navigation ](https://docs.mapbox.com/#navigation)
[ Search ](https://docs.mapbox.com/#search)
[ Data ](https://docs.mapbox.com/#data)
[ Help ](https://docs.mapbox.com/help/)
[ ](https://w... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_51_0.txt | Email
Required, but never shown | |
mapbox_expressions_layers/mapbox_expressions_55_0.txt | ## interpolate-hcl â
Produces continuous, smooth results by interpolating between pairs of input
and output values ("stops"). Works like ` interpolate ` , but the output type
must be ` color ` , and the interpolation is performed in the Hue-Chroma-
Luminance color space.
### Syntax
["interpolate-h... | |
mapbox_expressions_layers/115275_57_0.txt | * Terms
* Privacy
* Security
* Status
* Docs
* Contact
* Manage cookies
* Do not share my personal information
You can’t perform that action at this time. | |
mapbox_expressions_layers/mapbox_layers_24_0.txt | ## model â
Warning
Note that this is an experimental feature which is under development and is
prone to change.
A ` model ` style layer renders 3D buildings and instanced models (for
example, trees in standard style). ` model ` layer renders content from
following sources:
1. vector or GeoJSON (Used for trees... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_36_0.txt | Share
Improve this answer | |
mapbox_expressions_layers/mapbox_expressions_20_0.txt | ## to-string â
Converts the input value to a string. If the input is ` null ` , the result is
` "" ` . If the input is a ` boolean ` , the result is ` "true" ` or `
"false" ` . If the input is a number, it is converted to a string as specified
by the [ "NumberToString" algorithm ](https://tc39.github.io/ecma262/#... | |
mapbox_expressions_layers/mapbox_expressions_71_0.txt | ## rgba â
Creates a color value from red, green, blue components, which must range
between 0 and 255, and an alpha component which must range between 0 and 1. If
any component is out of range, the expression is an error.
### Syntax
["rgba", number, number, number, number]: color
clipboard
... | |
mapbox_expressions_layers/mapbox_expressions_23_0.txt | ## accumulated â
Returns the value of a cluster property accumulated so far. Can only be used
in the ` clusterProperties ` option of a clustered GeoJSON source.
### Syntax
["accumulated"]: value
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic ... | |
mapbox_expressions_layers/115275_2_0.txt | * Product
* Actions | |
mapbox_expressions_layers/115275_36_0.txt | # Default colour for values null/undefined with setPaintProperty ? #11527
erkanisuf opened this issue Feb 18, 2022 · 2 comments | |
mapbox_expressions_layers/types2_7_0.txt | * Spec Reference chevron-down
* All docs chevron-right
* Mapbox Style Spec chevron-right
* Spec Reference chevron-right
* Types | |
mapbox_expressions_layers/115275_21_0.txt | Search syntax tips
# Provide feedback | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_17_0.txt | Learn more about Teams
Get early access and see previews of new features. | |
mapbox_expressions_layers/mapbox_expressions_21_0.txt | ## typeof â
Returns a string describing the type of the given value.
### Syntax
["typeof", value]: string
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.41.0 | >= 6.0.0 | >= 4.0.0
| |
mapbox_expressions_layers/mapbox_expressions_68_0.txt | ## hsl â
Creates a color value from hue (range 0-360), saturation and lightness
components (range 0-100), and an alpha component of 1. If any component is out
of range, the expression is an error.
### Syntax
["hsl", number, number, number]: color
clipboard
SDK Support | Mapbox GL JS | ... | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_53_0.txt | Email
Required, but never shown | |
mapbox_expressions_layers/115275_33_0.txt | Already on GitHub? Sign in to your account
Jump to bottom | |
mapbox_expressions_layers/115275_24_0.txt | ## Use saved searches to filter your results more quickly
Name | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_34_0.txt | > I've read about styling expressions at mapbox, and I believe the "feature-
> state" is key to solving this, but I cant wrap my head around how to get the
> color converted from a feature.
You only want ` feature-state ` if you're intending to manipulate the feature
attributes dynamically, which I don't think you are... | |
mapbox_expressions_layers/115275_27_0.txt | Sign up
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your
session. Dismiss alert | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_13_0.txt | 3. Teams
4. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams | |
mapbox_expressions_layers/115275_7_0.txt | Write better code with AI
* Code review | |
mapbox_expressions_layers/115275_46_0.txt | Copy link
Contributor | |
mapbox_expressions_layers/115275_5_0.txt | Find and fix vulnerabilities
* Codespaces | |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_61_0.txt | 1
Use a color gradient for a line with Mapbox | |
mapbox_expressions_layers/mapbox_expressions_75_0.txt | ## * â
Returns the product of the inputs.
### Syntax
["*", number, number, ...]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.41.0 | >= 6.0.0 | >= 4.0.0
| |
mapbox_expressions_layers/mapbox_expressions_77_0.txt | ## % â
Returns the remainder after integer division of the first input by the second.
### Syntax
["%", number, number]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.41.0 | >= 6.0.0 | >= 4.0.0
| |
mapbox_expressions_layers/mapbox_expressions_39_0.txt | ## Decision â
You can use **decision expressions** to add conditional logic to your styles.
For example, the ` 'case' ` expression provides "if/then/else" logic, and `
'match' ` allows you to map specific values of an input expression to
different output expressions.
| |
mapbox_expressions_layers/115275_29_0.txt | * Notifications
* Fork 2.2k
* Star 10.7k
* Code
* Issues 1.2k
* Pull requests 34
* Actions
* Projects 2
* Security
* Insights | |
mapbox_expressions_layers/mapbox_expressions_58_0.txt | ## Variable binding â
| |
mapbox_expressions_layers/mapbox_layers_10_0.txt | ## paint â
Optional [ paint ](/style-spec/reference/layers/#paint-property) .
Default paint properties for this layer.
| |
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_7_0.txt | 1. 1. Home
2. Questions | |
mapbox_expressions_layers/mapbox_expressions_80_0.txt | ## abs â
Returns the absolute value of the input.
### Syntax
["abs", number]: number
clipboard
SDK Support | Mapbox GL JS | Android SDK | iOS SDK
---|---|---|---
basic functionality | >= 0.45.0 | >= 6.0.0 | >= 4.0.0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.