Open andrewgryan opened 2 weeks ago
Potential design to support non-standard WMS parameters.
Use JSON in a dedicated options
attribute.
<l-tile-layer-wms
base-url="/wms/path"
layers="wms_layer_name"
styles="wms_style"
options='{"key": "value"}'
></l-tile-layer-wms>
Internal to the component, the options and standard attributes can be parsed and combined.
// connectedCallback
// Error handling omitted
const layers = this.getAttribute("layers")
const styles = this.getAttribute("styles")
const options = JSON.parse(
this.getAttribute("options")
)
this.layer = TileLayer.WMS(baseUrl,
{ layers, styles, ...options}
)
Add support for
<l-tile-layer-wms>
Custom Element.L.TileLayer.WMS
options objectUseful links