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
Expressions can respond to three things (afaik): properties of the data, zoom, and temporary feature state of the data. But sometimes it would be helpful to respond to something map-wide, like a "dark mode" or whether a satellite basemap is present, or whether the user has requested large fonts.
Design Alternatives
Currently, the way to handle this is to call map.setPaintProperty on each specific layer when that map-wide property changes. But that's not ideal, because it often means defining layer properties twice: once as initially shown, and then later when reset:
We used to have style classes, but removed them because they were hard to design for in Studio and the use case was perceived to be obscure. I've found them useful.
Motivation
Expressions can respond to three things (afaik): properties of the data, zoom, and temporary feature state of the data. But sometimes it would be helpful to respond to something map-wide, like a "dark mode" or whether a satellite basemap is present, or whether the user has requested large fonts.
Design Alternatives
Currently, the way to handle this is to call
map.setPaintProperty
on each specific layer when that map-wide property changes. But that's not ideal, because it often means defining layer properties twice: once as initially shown, and then later when reset:Design
Something like:
The text was updated successfully, but these errors were encountered: