Is there a way to interpolate height of hexagons when data updated in HexagonLayer?
Hi, thanks again for your great works!
Background
I have twenty-four point files recording taxi demands(lng,lat) in a city and use HexagonLayer(3d-heatmap) to visualize the spatial patterns in 3D. And I want to show the change of demands between different files.
Actual Result
The heights of hexagons change roughly after data changed.
Expected Result
The heights of hexagons gradually transit from previous data to current data. Just like this gif. Expected Result
Addition:
I have read property-animation-rfc.md and it seems like my issue cannot be solved in current version, but is there any trick I could use to achieve the goal?
Any advise or guidance would be greatly appreciated! Thanks!
@ricardoCyy Property animations wouldn't work in this case, since the interpolation happens per hexagon (when implemented, props animation will just animate say the elevationScale prop which will affect all hexagons).
You want to look at attribute transitions, which are already implemented. I am not 100% sure it works with aggregating layers like the hexagon layer but by adding a transitions prop when changing the data you should be able to get it to work.
@Pessimistress
@ibgreen Thanks for your reply, I added transitions in my layer's prop like this:
const hex = new HexagonLayer({
But nothing happened. Did I miss something?
id: 'heatmap',
...props,
getElevationValue: p=> p.length,
transitions:{
getElevationValue: {
duration: 300,
}
}
});
@ricardoCyy The transitions prop is under development and doesn't work on all properties yet. With that said, it shouldn't be hard to support this use case. Maybe we can release a patch for this? @jianhuang01