Update (partial) props of the underlying Deck instance.
(props: MapboxOverlayProps)
| 67 | |
| 68 | /** Update (partial) props of the underlying Deck instance. */ |
| 69 | setProps(props: MapboxOverlayProps): void { |
| 70 | if (this._interleaved && props.layers) { |
| 71 | this._resolveLayers(this._map, this._deck, this._props.layers, props.layers); |
| 72 | } |
| 73 | |
| 74 | Object.assign(this._props, this.filterProps(props)); |
| 75 | |
| 76 | if (this._deck && this._map) { |
| 77 | this._deck.setProps({ |
| 78 | ...this._props, |
| 79 | views: this._getViews(this._map), |
| 80 | parameters: { |
| 81 | ...getDefaultParameters(this._map, this._interleaved), |
| 82 | ...this._props.parameters |
| 83 | } |
| 84 | }); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | // The local Map type is for internal typecheck only. It does not necesarily satisefy mapbox/maplibre types at runtime. |
| 89 | // Do not restrict the argument type here to avoid type conflict. |
no test coverage detected