react-map-gl
react-map-gl copied to clipboard
[Bug] Source does not update cluster options
Description
Changing the cluster property on a <Source> component does not update the cluster options of the source.
Expected Behavior
setClusterOptions() should be called on the source, instead only setData is called
https://github.com/visgl/react-map-gl/blob/c7112cf50d6985e8427d6b187d23a4d957791bb7/modules/react-maplibre/src/components/source.ts#L57
Steps to Reproduce
https://codesandbox.io/p/devbox/fancy-dew-9ks4tr
The "Cluster" button should switch between clustered and unclustered, but nothing happens. To see what should happen fork the sandbox and change the default clustered state.
Environment
- Framework version: [email protected]
- Map library: [email protected]
Logs
No response