id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
mapbox_expressions_layers/mapbox_expressions_92_0.txt
## log2 ​ Returns the base-two logarithm of the input. ### Syntax ["log2", 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/types2_5_0.txt
arrow-up Mapbox Style Spec
mapbox_expressions_layers/mapbox_layers_24_1.txt
The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represen...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_21_0.txt
0 I'm trying to style a single GeoJSON source with different line colors based on a feature property using react-map-gl, and I can't find a way to get set the color of lines in a smart way.
mapbox_expressions_layers/mapbox_expressions_11_0.txt
## image ​ Returns a [ ` ResolvedImage ` ](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [ ` icon-image ` ](/mapbox-gl-js/style-spec/layers/#layout-symbol- icon-image) , ` *-pattern ` entries, and as a section in the ` 'format' ` expression. A ` 'coalesce' ` expression containing ` image ` expression...
mapbox_expressions_layers/115275_51_0.txt
Labels None yet
mapbox_expressions_layers/115275_37_0.txt
## Comments Copy link
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_54_0.txt
Post Your Answer Discard By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .
mapbox_expressions_layers/mapbox_expressions_26_0.txt
## id ​ Returns the feature's id, if it has one. ### Syntax ["id"]: value 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_96_0.txt
## random ​ Returns a random value in the specified range (first two input numbers) based on a supplied seed (third input). The seed can be an expression or a constant number or string value. ### Syntax ["random", number, number, value]: number clipboard SDK Support | Mapbox GL JS | A...
mapbox_expressions_layers/mapbox_expressions_16_0.txt
## string ​ Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error. ### Syntax ["string", value]: string clipboard ["string", value, f...
mapbox_expressions_layers/mapbox_layers_7_0.txt
## maxzoom ​ Optional [ number ](/style-spec/reference/types/#number) between ` 0 ` and ` 24 ` inclusive . The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_56_0.txt
* mapbox * mapbox-gl-js * react-map-gl or ask your own question .
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_40_0.txt
– hansmei Jan 20, 2022 at 22:24
mapbox_expressions_layers/types2_12_0.txt
{ "line-color": "#ff0", "line-color": "#ffff00", "line-color": "rgb(255, 255, 0)", "line-color": "rgba(255, 255, 0, 1)", "line-color": "hsl(100, 50%, 50%)", "line-color": "hsla(100, 50%, 50%, 1)", "line-color": "yellow" } ...
mapbox_expressions_layers/mapbox_expressions_6_0.txt
## Types ​ You can use **type expressions** to test and convert between different data types like strings, numbers, and boolean values. Often, such tests and conversions are unnecessary, but they may be necessary in some expressions where the type of a certain sub-expression is ambiguous. They can also be useful ...
mapbox_expressions_layers/mapbox_expressions_35_0.txt
## index-of ​ Returns the first position at which an item can be found in an array or a substring can be found in a string, or ` -1 ` if the input cannot be found. Accepts an optional index from where to begin the search. ### Syntax ["index-of", keyword: InputType (boolean, string, or nu...
mapbox_expressions_layers/mapbox_expressions_12_0.txt
## literal ​ Provides a literal array or object value. ### Syntax ["literal", [...] (JSON array literal)]: array<T, N> clipboard ["literal", {...} (JSON object literal)]: object clipboard ### Related * [ Example: Display and style rich text labels ](https://docs...
mapbox_expressions_layers/color-switcher3_5_0.txt
arrow-up Mapbox GL JS
mapbox_expressions_layers/mapbox_expressions_47_0.txt
## all ​ Returns ` true ` if all the inputs are ` true ` , ` false ` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to ` false ` , the result is ` false ` and no further input expressions are evaluated. ### Syntax ["all", boolea...
mapbox_expressions_layers/mapbox_expressions_103_0.txt
## pitch ​ Returns the current pitch in degrees. ` ["pitch"] ` may only be used in the ` filter ` expression for a ` symbol ` layer. ### Syntax ["pitch"]: number clipboard SDK Support | Mapbox GL JS | Android SDK | iOS SDK ---|---|---|--- basic functionality | >= 2.6.0 | >=...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_33_0.txt
Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first) 2
mapbox_expressions_layers/types2_21_0.txt
clipboard ## Number ​
mapbox_expressions_layers/115275_16_0.txt
Fund open source developers * The ReadME Project
mapbox_expressions_layers/115275_25_0.txt
Query To see all available qualifiers, see our documentation .
mapbox_expressions_layers/mapbox_layers_24_3.txt
n. SDK Support | Mapbox GL JS | Android SDK | iOS SDK ---|---|---|--- basic functionality | >= 3.0.0 | >= 11.0.0 | >= 11.0.0 [ Join the Mapbox Developers Discord Community arrow-right ](https://discord.gg/uMpcC5RmJh) Was this page helpful? Yes No [ © Mapbox All Rights Reserved ](https://...
mapbox_expressions_layers/mapbox_layers_13_0.txt
## source-layer ​ Optional [ string ](/style-spec/reference/types/#string) . Layer to use from a vector tile source. Required for vector and raster-array sources; prohibited for all other source types, including GeoJSON sources. ### Layer sub-properties ​ Layers have two sub-properties that determine how d...
mapbox_expressions_layers/115275_40_0.txt
All reactions Copy link
mapbox_expressions_layers/115275_13_0.txt
By Solution * CI/CD & Automation * DevOps * DevSecOps
mapbox_expressions_layers/types2_15_0.txt
clipboard ## ResolvedImage ​
mapbox_expressions_layers/mapbox_expressions_73_0.txt
## Math ​
mapbox_expressions_layers/color-switcher3_9_0.txt
* Tutorials share * Troubleshooting share
mapbox_expressions_layers/mapbox_expressions_31_0.txt
## config ​ Retrieves the configuration value for the given option. ### Syntax ["config", string]: value clipboard ["config", string, string]: value clipboard SDK Support | Mapbox GL JS | Android SDK | iOS SDK ---|---|---|--- basic functionality | >= 3....
mapbox_expressions_layers/mapbox_expressions_88_0.txt
## floor ​ Returns the largest integer that is less than or equal to the input. ### Syntax ["floor", 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/types2_23_0.txt
clipboard ## Array ​
mapbox_expressions_layers/115275_49_0.txt
ryanhamley closed this as completed Feb 21, 2022 Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_49_0.txt
Sign up using Email and Password Submit
mapbox_expressions_layers/types2_6_0.txt
Search * Guides
mapbox_expressions_layers/mapbox_expressions_63_0.txt
## downcase ​ Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database. ### Syntax ["downcase", string]: string clipboard ### Related * [ Example: Change the case o...
mapbox_expressions_layers/mapbox_layers_6_0.txt
## layout ​ Optional [ layout ](/style-spec/reference/layers/#layout-property) . Layout properties for the layer.
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_3_0.txt
* Stack Overflow help chat
mapbox_expressions_layers/mapbox_layers_1_1.txt
vertical-scale * visibility * heatmap * heatmap-color * heatmap-intensity * heatmap-opacity * heatmap-radius * heatmap-weight * visibility * hillshade * hillshade-accent-color * hillshade-emissive-strength * hillshade-exaggeration * hillshade-highlight-color ...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_43_0.txt
## Your Answer Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more
mapbox_expressions_layers/mapbox_expressions_45_0.txt
## > ​ Returns ` true ` if the first input is strictly greater than the second, ` false ` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are co...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_65_0.txt
8 How to use react-map-gl to draw line between two point
mapbox_expressions_layers/mapbox_expressions_36_0.txt
## length ​ Returns the length of an array or string. ### Syntax ["length", string | array | value]: 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_51_0.txt
## match ​ Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, ` ["get", "building_type"] ` ). Each label must be unique, and must be either: * a single literal value; or * an array of literal values, ...
mapbox_expressions_layers/mapbox_layers_20_3.txt
L JS | Android SDK | iOS SDK ---|---|---|--- basic functionality | >= 3.0.0 | >= 10.10.0 | >= 10.10.0 ### fill-extrusion-translate ​ [ Paint ](/style-spec/reference/layers/#paint-property) property. Optional [ array ](/style-spec/reference/types/#array) of [ number s ](/style- spec/referen...
mapbox_expressions_layers/mapbox_expressions_52_0.txt
## within ​ Returns ` true ` if the evaluated feature is fully contained inside a boundary of the input geometry, ` false ` otherwise. The input value can be a valid GeoJSON of type ` Polygon ` , ` MultiPolygon ` , ` Feature ` , or ` FeatureCollection ` . Supported features for evaluation: * ` Point ` : Returns...
mapbox_expressions_layers/mapbox_expressions_30_0.txt
## at ​ Retrieves an item from an array. ### Syntax ["at", number, array]: ItemType 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_53_0.txt
## Ramps, scales, curves ​
mapbox_expressions_layers/mapbox_expressions_86_0.txt
## distance ​ Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type ` Point ` , ` MultiPoint ` , ` LineString ` , ` MultiLineString ` , ` Polygon ` , ` MultiPolygon ` , ` Feature ` , or ` FeatureCollection ` . Distance values re...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_76_0.txt
* About * Press * Work Here * Legal * Privacy Policy * Terms of Service * Contact Us * Cookie Settings * Cookie Policy ##### Stack Exchange Network
mapbox_expressions_layers/115275_11_0.txt
* All features * Documentation * GitHub Skills * Blog * Solutions
mapbox_expressions_layers/mapbox_layers_16_1.txt
0 ` . _Requires_ lights . Supports [ smooth-ramp ` interpolate ` ](/style-spec/reference/expressions/#interpolate) expressions. opacity Transitionable. Controls the intensity of light emitted on the source features. SDK Support | Mapbox GL JS | Android SDK | iOS SDK ---|---|---|--- basic functionali...
mapbox_expressions_layers/115275_34_0.txt
# Default colour for values null/undefined with setPaintProperty ? #11527 Closed
mapbox_expressions_layers/115275_12_0.txt
For * Enterprise * Teams * Startups * Education
mapbox_expressions_layers/types2_22_0.txt
A number value, often an integer or floating point (decimal number). Written without quotes. { "text-size": 24 }
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_59_0.txt
* The [connect] tag is being burninated #### Related
mapbox_expressions_layers/115275_22_0.txt
We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_38_0.txt
Steve Bennett Steve Bennett 121k 41 41 gold badges 178 178 silver badges 227 227 bronze badges
mapbox_expressions_layers/mapbox_expressions_15_0.txt
## object ​ Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error. ### Syntax ["object", value]: object clipboard ["object", value,...
mapbox_expressions_layers/mapbox_layers_17_0.txt
## symbol ​ A ` symbol ` style layer renders icon and text labels at points or along lines on a map. You can use a symbol layer to configure the visual appearance of labels for features in vector tiles. This [ map of Denver area businesses ](https://docs.mapbox.com/help/troubleshooting/using-recolorable-images-in...
mapbox_expressions_layers/115275_35_0.txt
erkanisuf opened this issue Feb 18, 2022 · 2 comments Closed
mapbox_expressions_layers/types2_19_0.txt
clipboard ## Boolean ​
mapbox_expressions_layers/mapbox_expressions_74_0.txt
## \- ​ For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0. ### Syntax ["-", number, number]: number clipboard ["-", number]: number clipboard ### Related * [ Tutoria...
mapbox_expressions_layers/mapbox_expressions_50_0.txt
## coalesce ​ Evaluates each expression in turn until the first valid value is obtained. Invalid values are ` null ` and ` 'image' ` expressions that are unavailable in the style. If all values are invalid, ` coalesce ` returns the first value listed. ### Syntax ["coalesce", OutputType, OutputTyp...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_39_0.txt
2 * Thanks! I will give this a try as soon as I can. Is there a way to solve this using a js function to set a color based on the property?
mapbox_expressions_layers/115275_53_0.txt
Milestone No milestone
mapbox_expressions_layers/mapbox_expressions_3_0.txt
## Camera expressions ​ A **camera expression** is any expression that uses the ` zoom ` operator. These expressions change the appearance of a layer with the map's zoom level. Camera expressions can be used to create the appearance of depth and to control data density. { "circle-radius":...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_27_0.txt
* mapbox * mapbox-gl-js * react-map-gl Share
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_63_0.txt
3 mapbox layer fill-color based on TEXT property
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_2_0.txt
Loading… 1. ### current community
mapbox_expressions_layers/mapbox_layers_11_0.txt
## slot ​ Optional [ string ](/style-spec/reference/types/#string) . The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order. SDK Support | Mapbox GL JS | Android SDK | iOS SDK ---|---|---|--- basic functionality | >=...
mapbox_expressions_layers/types2_16_0.txt
The ` resolvedImage ` type is an image (for example, an icon or pattern) that is used in a layer. An input to the ` image ` expression operator is checked against the current map style to see if it is available to be rendered or not, and the result is returned in the ` resolvedImage ` type. To define a series of image...
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_47_0.txt
Draft discarded ### Sign up or log in
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_25_0.txt
<Source id="my-data" type="geojson" data={TheDataFileWithSomeData}> <Layer {...layerStyleTheLines } /> </Source> Then I want a layer styling something like this (not working):
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_68_0.txt
0 Connect markers with a polyline in Mapbox GL
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_72_0.txt
# Subscribe to RSS Question feed
mapbox_expressions_layers/color-switcher3_3_0.txt
Help Docs
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_75_0.txt
* Teams * Advertising * Collectives * Talent ##### Company
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_30_0.txt
asked Jan 18, 2022 at 23:29 hansmei hansmei
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_37_0.txt
Follow answered Jan 19, 2022 at 22:09
mapbox_expressions_layers/mapbox_expressions_85_0.txt
## cos ​ Returns the cosine of the input. ### Syntax ["cos", 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_28_0.txt
{{ message }} mapbox / mapbox-gl-js Public
mapbox_expressions_layers/mapbox_expressions_32_0.txt
## get ​ Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns ` null ` if the requested property is missing. ### Syntax ["get", string]: value clipboard ["get", string, object]: value clipb...
mapbox_expressions_layers/mapbox_expressions_29_0.txt
## Lookup ​
mapbox_expressions_layers/mapbox_expressions_105_0.txt
## Heatmap ​
mapbox_expressions_layers/mapbox_expressions_9_0.txt
## collator ​ Returns a ` collator ` for use in locale-dependent comparison operations. The ` case-sensitive ` and ` diacritic-sensitive ` options default to ` false ` . The ` locale ` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested l...
mapbox_expressions_layers/mapbox_layers_18_0.txt
## raster ​ A ` raster ` style layer renders raster tiles on a map. You can use a raster layer to configure the color parameters of raster tiles. This [ interactive SWIR imagery map by Maxar ](https://blog.maxar.com/news- events/2020/maxar-and-mapbox-release-interactive-swir-imagery-map-of- california-wildfires?u...
mapbox_expressions_layers/mapbox_expressions_65_0.txt
## resolved-locale ​ Returns the IETF language tag of the locale being used by the provided ` collator ` . This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded. ### Syntax ["resolved-locale", collator]: string clipboard SDK...
mapbox_expressions_layers/mapbox_expressions_59_0.txt
## let ​ Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"]. ### Syntax ["let", string (alphanumeric literal), any, string (alphanumeric literal), any, ..., OutputType ]: OutputType clipboard ...
mapbox_expressions_layers/types2_18_0.txt
A string is text. In Mapbox styles, strings are in quotes. { "source": "mySource" }
mapbox_expressions_layers/mapbox_expressions_33_0.txt
## has ​ Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided. ### Syntax ["has", string]: boolean clipboard ["has", string, object]: boolean clipboard ### Related * [ Example: C...
mapbox_expressions_layers/mapbox_layers_22_1.txt
SDK Support | Mapbox GL JS | Android SDK | iOS SDK ---|---|---|--- basic functionality | >= 0.43.0 | >= 6.0.0 | >= 4.0.0 ### hillshade-shadow-color ​ [ Paint ](/style-spec/reference/layers/#paint-property) property. Optional [ color ](/style-spec/reference/types/#color) . Defaults to ` ...
mapbox_expressions_layers/color-switcher3_1_0.txt
Maps Navigation
mapbox_expressions_layers/mapbox-gl-style-line-color-based-on-property-text-value5_6_0.txt
company blog 2. 3. Log in 4. Sign up
mapbox_expressions_layers/mapbox_layers_17_10.txt
Android SDK | iOS SDK ---|---|---|--- basic functionality | >= 0.10.0 | >= 2.0.1 | >= 2.0.0 data-driven styling | >= 0.35.0 | >= 5.1.0 | >= 3.6.0 ### text-transform ​ [ Layout ](/style-spec/reference/layers/#layout-property) property. Optional [ enum ](/style-spec/reference/types/#enu...
mapbox_expressions_layers/mapbox_expressions_101_0.txt
## Camera ​
mapbox_expressions_layers/mapbox_expressions_82_0.txt
## asin ​ Returns the arcsine of the input. ### Syntax ["asin", number]: number clipboard SDK Support | Mapbox GL JS | Android SDK | iOS SDK ---|---|---|--- basic functionality | >= 0.41.0 | >= 6.0.0 | >= 4.0.0