I want to make a wms request using L.tileLayer.wms, Is there a way to add a request header to the request for authorization purposes? If not what would be a good possible workaround?
Used to load and display tile layers on the map, implements ILayer interface.
TileLayer. WMS layer, provide the base WMS URL, and specify whatever WMS options you need. The base WMS URL is simply the GetCapabilities URL, without any parameters, like so: http://ows.mundialis.de/services/service?
you can use leaflet-wms-header plugin https://github.com/ticinum-aerospace/leaflet-wms-header or try to create a custom wms layer as in this example https://github.com/ticinum-aerospace/leaflet-wms-header/blob/master/index.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With