react-map-gl icon indicating copy to clipboard operation
react-map-gl copied to clipboard

[Bug] Source does not update cluster options

Open kodebach opened this issue 4 months ago • 0 comments

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

Logs

No response

kodebach avatar Aug 27 '25 13:08 kodebach