Open jakelund opened 8 years ago
I haven't tried it myself, but isn't it possible to use this option: http://leafletjs.com/reference.html#tilelayer-wms-styles? If possible, then you can just add it as an option to the L.TileLayer.WMS in the smap-responsive config file. If not, we have to implement this by adding the parameter to the URL ourselves before the request happens.
It should be possible to use the option sld: "http://link-to-my-sld/style.sld"
or sld_body: "<xml… />"
Please share your tips/issues if you find out something more about it.
Seems anything i define with "styles" or "sld" doesn't get included in the wms request. Seems some tweaking to the request is necessary.
I didn't notice I was trying this out using our custom layer implemention L.NonTiledLayer.WMS
were it works (at least the request works correctly). I have just now committed a change to include sld and sld_body if provided in the options of L.TileLayer.WMS
also. Please update your code and try again.
Is it possible to add an external style reference (.sld file) in options for init: "L.TileLayer.WMS"?