mapcomponents / react-map-components-maplibre

A react component framework for declarative GIS application development.
MIT License
125 stars 18 forks source link

Fix/usesource stylechange #168

Closed cioddi closed 8 months ago

cioddi commented 8 months ago

Currently the stylechange storybook demo is broken, as the layer is not added to the map again after style is changing. This is because of the useSource hook being unaware of it's state within the maplibre instance. This PR will add a subscription to the "styledata" event to the useSource hook.