Vue2Leaflet
Vue2Leaflet copied to clipboard
Changing LWMSTileLayer `layers` prop has no effect
Description
Changing the LWMSTileLayer layers
prop does not trigger redraw.
Live Demo
http://jsfiddle.net/q1gfj9n7/4/
Steps to Reproduce
As per fiddle, any LWMSTileLayer which has a layers
property which changes will not redraw the layer.
Expected Results
Changing the value of layers
should cause the layer to be redrawn using the new layer name.
Actual Results
Nothing visible changes.
Browsers Affected
- [X] Chrome
- [X] Firefox
Unable to check:
- [ ] Edge
- [ ] Safari 9
- [ ] Safari 8
- [ ] IE 11
Versions
- Leaflet: v1.6.0
- Vue: v2.6.10
- Vue2Leaflet: v2.5.2
@guygriffiths Thank you for the issue! Confirmed the bug, will investigate
the same question,when I update a new attribute value it can't send a new request
Same problem, does anybody know a solution?
A workaround: Put a ref to your layer and update the layers parameter.
this.$refs.wmsTileLayer.mapObject.wmsParams.layers