Help determining hexagon size/area/vertex-coordinates at different latitudes on a HexagonLayer
See original GitHub issueI am trying to determine the area of each hexagon when hovered used within the HexagonLayer.
I can approximate the area of a hexagon if I know the either the radius, apothem, side length, or hexagon vertices in WGS84 coordinates. The layer accepts a radius property, in meters, but the resulting hexagons overlayed on the map are equally sized despite their latitude, so their radii cannot technically be the same number of meters as the value passed into the ‘radius’ property on the layer.
For example, a hexagon over the equator will have a much larger surface area than a hexagon of the same visual size projected over Greenland.
I inspected the payload to the onHover()
method provided to the HexagonLayer properties, but am unable to find any reference to the hexagon vertices or the radius adjusted to the latitude.
Is it possible to use the projection to derive the actual radius in meters given the original radius and the hexagon’s latitude and longitude?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
Under the hood, hexagons are generated in the common space (“Web Mercator units”). You can find out this radius as follows:
@Pessimistress Thank you very much for the explanation!