vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
1.97k stars 293 forks source link

Hex Bin Layer unable to access properties #206

Open idaflik opened 1 month ago

idaflik commented 1 month ago

Describe the bug the data below returns features with "geometry" and "properties". When creating a hex bin layer, globe.gl is able to access the coordinates but not the properties, it seems.

To Reproduce Steps to reproduce the behavior: Code:

` <!DOCTYPE html>

Globe Visualization
` returns "d.properties is undefined" **Expected behavior** The hexMargin to change based on the values of WAPIS property. **Additional context** Hope this makes sense and I didn't overlook anything obvious
vasturiano commented 3 weeks ago

@idaflik as described in the docs, the signature of the hexMargin accessor function is as follows:

hexMargin(({ points, sumWeight, center: { lat, lng }}) => ...)

This is necessary because a single hex bin can represent many different points, so those are included as an array in the passed parameters.