Hi, this is probably a stupid question, but I want to have a TMS (raster) as the base layer in my Leaflet map and then overlay vectors from a WMS on top. Is this possible? I thought I had this working but it appears as though the WMS layer completely covers the TMS. I realize that both TMS and WMS are raster but I thought that somehow the TMS layer would show through and not be completely covered by the WMS. Here is my code
asked 25 Oct '19, 23:44 SeattleHeather |
You can add
to your WMS options (where you currently only have "layers: '7'") and this will tell the WMS that you would like tiles with a transparent background. Not all WMS servers will honour this request, however (yours seems not to, sadly). In which case you might try
which will at least make the WMS layer semi-transparent so while the underlying OSM map will lose contrast it is still visible. answered 26 Oct '19, 22:01 Frederik Ramm ♦ |
This may not be what you're trying to do, and apologies if I'm stating the bleeding obvious here, but one raster overlay over another will work if the overlay has a transparent background. See this diary entry.