Heatmap example #2954
-
I am having trouble implementing the Heatmap layer...
which I want to display in form of a heatmap. Hoewever, I am not sure how to add the data to the heatmap. There is a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
We do have a heat map example: |
Beta Was this translation helpful? Give feedback.
-
Ah, I did not expect in the annotations folder. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@mfazekas Sorry, I have another question which does not get answered through the example provided. How would I color the heatmap not based on point density only, but on values associated with each point? I tried
But this gives me
Why? |
Beta Was this translation helpful? Give feedback.
We do have a heat map example:
https://github.com/rnmapbox/maps/blob/main/example/src/examples/Annotations/Heatmap.js
You'll need to convert your data to geoJSON and use wrap your HeatmapLayer in <ShapeSource shape={myGeoJSONData} ...