HexagonLayer elevation based on getColorValue
See original GitHub issueThis is the map what I got, I have a customized getColorValue
on props, how can I make the hexbins elevation based on this value? Seems currently the elevation is based on points.length
and I can’t customize it?
_onGetSublayerElevation(cell) {
...
const domain = elevationDomain || [0, sortedBins.maxCount];
return linearScale(domain, elevationRange, cell.points.length);
}
Maybe change to this?
const { getColorValue } = this.props;
...
return linearScale(domain, elevationRange, getColorValue(cell.points));
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
HexagonLayer elevation based on getColorValue #674 - GitHub
This is the map what I got, I have a customized getColorValue on props, how can I make the hexbins elevation based on...
Read more >HexagonLayer - deck.gl
The HexagonLayer aggregates data into a hexagon-based heatmap. The color and height of a hexagon are determined based on the objects it contains....
Read more >HexagonLayer - Get aggregated data or it's value bounds
I am building mapbox & deck.gl application and I want to filter some bars at runtime based on value ranges.
Read more >Hexagon Layer with Custom Elevation value? - Using Streamlit
Is there a way I can assign a value from my data frame to my HexagonLayer layer? Here is my data: Here is...
Read more >deck.gl | GPUGridLayer (WebGL2)
The color and height of a cell are determined based on the objects it ... Instead of getColorValue , getColorWeight and colorAggregation should...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree that elevation can be based on other metrics besides count. However I would not have it based on the same value that color is based on.
Color and Elevation are two different visual channels that can be used to encode different metrics. E.g. as it is implemented right now. With a heatmap showing population demographic, elevation can be used to show population density and color can be used to show average household income. In which case, we can tell the story of how income correlates to density.
That being said. I think we can add another props
getElevationValue
similar asgetColorValue
, it would have the binning and sorting run twice on ever data change. Because it needs to sort the hex bins by values that color is based on AND values that elevation is based on. User can always pass the same function if they want the elevation to correlate with the color.@heshan0131 It is resolved by #938, can we close it?