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

How to get density values calculated from source points for heat map layer? #13103

Closed
dantebiase opened this issue Mar 1, 2024 · 1 comment
Closed

Comments

@dantebiase
Copy link

mapbox-gl-js version:

Question

How to get density values calculated from source points for the resulting heat map layer?

I'm looking to count the number of data points mapped between each color threshold, ex:

  • 10 points lie between transparent and royalblue
  • 30 points found between royalblue and cyan,
    ...

Is this possible?

Links to related documentation

https://www.mapbox.com/blog/introducing-heatmaps-in-mapbox-gl-js
https://docs.mapbox.com/help/tutorials/make-a-heatmap-with-mapbox-gl-js/
https://docs.mapbox.com/mapbox-gl-js/example/heatmap-layer/

@mourner
Copy link
Member

mourner commented Mar 6, 2024

I don't think there's a way to do that. However, you can get all the features that affect heatmap rendering in a particular point with queryRenderedFeatures after #10996.

@mourner mourner closed this as not planned Won't fix, can't repro, duplicate, stale Mar 6, 2024
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

2 participants