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
Is there a way to style them with mapbox gl? At the moment my plan is to include an additional attribute in my geoJSON that combines my two data points and I can use that in a property function. This is inelegant as I'd need to edit and reload my geoJSON when the user changes classifications.
Possibly this could be done with a change to property functions to take two properties
something like
{
"fill-color": {
"property": "temperature",
"bivariate-property": "population",
"stops": [
// temperature is low, population is low - blue
[{ value: 0, value2: 100}, 'blue'],
// temperature is low, population is high - cyan
[{ value: 0, value2: 10000}, 'cyan'],
//temperature is high, population is low - red
[{ value: 20, value2: 100},'red'],
//temperature is high, population is high - yellow
[{ value: 20, value2: 10000},'yellow'],
]
}
}
The text was updated successfully, but these errors were encountered:
include an additional attribute in my geoJSON that combines my two data points
This is the best current solution. #4077 tracks the request for property functions that can combine multiple data properties using arbitrary arithmetic expressions.
Bivariate maps are occasionally useful see https://en.wikipedia.org/wiki/Bivariate_map
Is there a way to style them with mapbox gl? At the moment my plan is to include an additional attribute in my geoJSON that combines my two data points and I can use that in a property function. This is inelegant as I'd need to edit and reload my geoJSON when the user changes classifications.
Possibly this could be done with a change to property functions to take two properties
something like
{
"fill-color": {
"property": "temperature",
"bivariate-property": "population",
"stops": [
// temperature is low, population is low - blue
[{ value: 0, value2: 100}, 'blue'],
// temperature is low, population is high - cyan
[{ value: 0, value2: 10000}, 'cyan'],
//temperature is high, population is low - red
[{ value: 20, value2: 100},'red'],
//temperature is high, population is high - yellow
[{ value: 20, value2: 10000},'yellow'],
]
}
}
The text was updated successfully, but these errors were encountered: