Skip to content

Commit

Permalink
fix(carto): Support QuadbinHeatmapTileLayer onViewportLoad callback
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy committed May 28, 2024
1 parent a51fc69 commit 4a90848
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions modules/carto/src/layers/quadbin-heatmap-tile-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,16 @@ class QuadbinHeatmapTileLayer<DataT = any, ExtraProps extends {} = {}> extends C
static defaultProps = defaultProps;

renderLayers(): Layer {
const {getWeight, colorDomain, colorRange, radiusPixels, _subLayerProps} = this.props;
const {
data,
getWeight,
colorDomain,
colorRange,
radiusPixels,
_subLayerProps,
updateTriggers,
...tileLayerProps
} = this.props;

// Inject modified polygon layer as sublayer into TileLayer
const subLayerProps = {
Expand All @@ -103,9 +112,10 @@ class QuadbinHeatmapTileLayer<DataT = any, ExtraProps extends {} = {}> extends C
: encodeWeight(getWeight);

return new PostProcessQuadbinTileLayer(
tileLayerProps as Omit<QuadbinTileLayerProps, 'data'>,
this.getSubLayerProps({
id: 'heatmap',
data: this.props.data,
data,

getFillColor,

Expand All @@ -115,7 +125,7 @@ class QuadbinHeatmapTileLayer<DataT = any, ExtraProps extends {} = {}> extends C
_subLayerProps: subLayerProps,

updateTriggers: {
getPosition: this.props.updateTriggers.getWeight
getPosition: updateTriggers.getWeight
}
})
);
Expand Down

0 comments on commit 4a90848

Please sign in to comment.