Add heatmap example
This adds a minimal example for a Heatmap layer, currently a work in progress. The main motivation is to provide an easy, reusable scenario to debug the Lonboard upgrade to Deck.gl v9.
Changes:
- Upgraded Deck.gl to
v9.0.27 - Added a Heatmap example based on the Point example
I added two scenarios for instantiating the GeoArrowHeatmapLayer component:
-
Scenario 1: No properties other than
idanddataare passed. Given that the type definition for the props did not raise errors, I would expect this to render something. However, the console instead displaysdeck: initialization of HeatmapLayer({id: 'geoarrow-heatmap-geoarrow-heatmap-geoarrow-heatmap-0'}): buffer is null TypeError: buffer is null. -
Scenario 2: In this issue, others reported a similar problem, and the fix that worked for some was related to the
getWeightparameter. I set it to return a random positive number, which:- Did not result in a constructor error.
- Printed
Model "geoarrow-heatmap-geoarrow-heatmap-geoarrow-heatmap-0-triangle-layer: Ignoring constant supplied for unknown attribute "instancePickingColors"to the console. - Did not render a heatmap.
It is not clear to me if the buffer fix PR is available in v9.0.27. The author mentioned it depends on the UBO work PR, which hasn't been merged yet.
@kylebarron please let me know if you have any thoughts on this.
It is not clear to me if the buffer fix PR is available in
v9.0.27. The author mentioned it depends on the UBO work PR, which hasn't been merged yet.
Well it looks like there was a separate fix here: https://github.com/visgl/deck.gl/pull/9037. In general it's kinda hard to tell sometimes when PRs are also cherry picked to the release branch. Just because it's been merged to the master branch doesn't mean it's included in the 9.0 release branch.
See my comment here https://github.com/visgl/deck.gl/issues/8960#issuecomment-2284791644 where I forked the previous HeatmapLayer repro that someone else had reported, updated to the latest deck.gl version, and am still getting the same issue. Let's follow that thread and see what other maintainers say about that
This fix https://github.com/visgl/deck.gl/pull/9787 enables binary attributes and fixes HeatmapLayer. I have tested the example from this PR with [email protected] and it works now
https://github.com/user-attachments/assets/a46f89cd-d9fc-4f9a-af24-607ae5e05bf8
This is now working in Lonboard as of https://github.com/developmentseed/lonboard/pull/910