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
The map component is now written in an imperative style instead of a declarative style, using map.addLayer instead of react components. This was done for the following reasons:
We tried using the beforeId layer ordering mechanism in maplibre, but adding a TMS layer after map load would be push it to the top of the layer stack.
If the user asks for a location (“I want alerts for Berlin”) followed by another location request (“actually I want alerts for Munich”) we have to dynamically replace the geojson sources in the existing location layer.
For these reasons it was easier to use an imperative style and useEffect. However this decreased the readability in the component and made it more complicated. This ticket tracks how to reduce this complexity.
The text was updated successfully, but these errors were encountered:
The map component is now written in an imperative style instead of a declarative style, using
map.addLayer
instead of react components. This was done for the following reasons:For these reasons it was easier to use an imperative style and
useEffect
. However this decreased the readability in the component and made it more complicated. This ticket tracks how to reduce this complexity.The text was updated successfully, but these errors were encountered: