updateLeafletElement(fromProps: Props, toProps: Props) { super.updateLeafletElement(fromProps, toProps) const { url: prevUrl, opacity: _po, zIndex: _pz, ...prevParams } = fromProps const { url, opacity: _o, zIndex: _z, ...params } = toProps if (url !== prevUrl) { this.leafletElement.setUrl(url) } if (!isEqual(params, prevParams)) { this.leafletElement.setParams(params) } }
createLeafletElement(props: Props): LeafletElement { const { url, ...params } = props return new TileLayer.WMS(url, this.getOptions(params)) }