From 638fafcd2455b3f6df600e2b2a1ecf07871fb7b1 Mon Sep 17 00:00:00 2001 From: Mark Hepburn Date: Tue, 31 Oct 2017 19:10:43 +1100 Subject: [PATCH] Don't remove zIndex/opacity from initial WMS props (#405) See PaulLecam/react-leaflet#404. Initial values were being removed from the parameters passed to the leaflet element when it was first created; later updates were still correctly applied. --- src/WMSTileLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WMSTileLayer.js b/src/WMSTileLayer.js index cb28436f..368b3ee0 100644 --- a/src/WMSTileLayer.js +++ b/src/WMSTileLayer.js @@ -21,7 +21,7 @@ export default class WMSTileLayer extends GridLayer { } createLeafletElement(props: Props): LeafletElement { - const { url, opacity: _o, zIndex: _z, ...params } = props + const { url, ...params } = props return new TileLayer.WMS(url, this.getOptions(params)) }