Skip to content

Commit

Permalink
Avoid crash when trying to getError on static heatmap layer
Browse files Browse the repository at this point in the history
  • Loading branch information
weberjavi committed Aug 13, 2024
1 parent ba785ef commit 4c9d5a8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export class FourwingsHeatmapStaticLayer extends CompositeLayer<FourwingsHeatmap
initializeState(context: LayerContext) {
super.initializeState(context)
this.state = {
error: '',
colorDomain: [],
colorRanges: this._getColorRanges(),
scales: [],
Expand All @@ -83,7 +84,9 @@ export class FourwingsHeatmapStaticLayer extends CompositeLayer<FourwingsHeatmap
getColorRamp({ rampId: colorRamp as ColorRampId })
)
}

getError(): string {
return (this.state as FourwingsTileLayerState).error
}
_calculateColorDomain = () => {
// TODO use to get the real bin value considering the NO_DATA_VALUE and negatives
// NO_DATA_VALUE = 0
Expand Down

0 comments on commit 4c9d5a8

Please sign in to comment.