mstahv / v-leaflet

Leaflet add-on for Vaadin
Other
43 stars 38 forks source link

WMS option transparent must be TRUE or FALSE #230

Open macwe opened 10 months ago

macwe commented 10 months ago

In v-leaflet, an org.vaadin.addon.leaflet.LWmsLayer has a method for setting the transparent option to a Boolean value. This results in a &transparent=true or &transparent=false string added to the URL of the WMS service. Unfortunately this won't work with all WMS services, since the WMS 1.3.0 specification, ch. 6.8.1 states: »Parameter names shall not be case sensitive, but parameter values shall be.« And ch. 7.3.3.9 states: »TRANSPARENT can take on two values, "TRUE" or "FALSE".« Cf. OpenGIS Web Map Server Implementation Specification, OGC 06-042. For example this does not work with https://services.datafordeler.dk/Dkskaermkort/topo_skaermkort/1.0.0/wms.

This behaviour is observed in v-leaflet-1.0.3 with Vaadin 7.7.4.

P.S. A workaround is to explicitly set the transparent option via setCustomOption("transparent", "FALSE").

(This issue was moved from https://github.com/vaadin/directory/issues/60)