Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source component does not support cluster properties #354

Open
ajbraudev opened this issue Dec 13, 2021 · 0 comments
Open

Source component does not support cluster properties #354

ajbraudev opened this issue Dec 13, 2021 · 0 comments

Comments

@ajbraudev
Copy link

Describe the bug
setting cluster={true} on a Source component does not pass through. When inspecting the source after it's added, the cluster property does not show, but if I manually add a layer using map.addSource('map-data', {cluster: true}) and inspect, I see the properties. This is causing ['has', 'point_count'] not to work when attempting to cluster using mapbox layers.

To Reproduce
add cluster={true} to a source component, add a Layer component. Try to filter layer by ['has', 'point_count'] and call map.getStyle().sources and you'll see the cluster property missing.

Expected behavior
cluster properties should be passed to the mapbox source, using the filter ['has', 'point_count'] should work on layer component and filter component

Screenshots
When using the component like so: Screen Shot 2021-12-13 at 6 46 04 AM
The source properties are not reflected as show here: Screen Shot 2021-12-13 at 6 43 38 AM
but when I manually add a source like so:
Screen Shot 2021-12-13 at 6 45 07 AM
Properties are show: Screen Shot 2021-12-13 at 6 44 56 AM

Desktop (please complete the following information):

  • OS: macOs
  • Browser Chrome
  • Version [e.g. 22] 1.14.4

Additional context
We need to filter out non-clustered features, and there is no way to do that currently. If there is, please let us know!

@ajbraudev ajbraudev changed the title Source Component does not support cluster properties Source component does not support cluster properties Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant