[mapserver-users] #TransparentBackground #WMS #Mapcache

Marcin Niemyjski mniemyjski at cloudferro.com
Mon Jun 20 06:40:53 PDT 2022


Hello,

does anyone know why the transparent WMS is displayed this way (https://pasteboard.co/vM3SKvRZ5krL.png)? The WMS comes from mapcaching, I checked the tiles in another program and sure enough they are transparent. I am also uploading the mapcache.xml file, maybe there is a problem with it. I would like only borders of plots to be visible, and background to remain transparent - like on tiles.



I have the same problem in qgis. However, when in the add wms layer menu instead of adding layer I add tileset everything looks great. The problem is that I must add this layer to mapbender. Mapbender can only see layers in WMS, not Tilesets

This is how I add it to QGIS: https://pasteboard.co/IU3LV6yB57Kv.png

and this is how i need it to look like (like i said when I add it as Tileset it works fine): https://pasteboard.co/ojWVBug6yDLC.png



mapcache.xml:

<?xml version="1.0" encoding="UTF-8"?>
<mapcache>
   <grid name="PUWG1992">
      <srs>EPSG:2180</srs>
 <size>256 256</size>
 <extent>170000.0000000000000000 100000.0000000000000000 900000.0000000000000000 900000.0000000000000000</extent>
 <units>m</units>
 <resolutions>8466.6836 4233.3418 2116.6709 1058.33545 529.167725 264.5838625 132.29193125 66.145965625 26.45838625 13.229193125 6.6145965625 2.6458386250000006 1.3229193125000003 0.5291677250000001 0.26458386250000004 0.13229193125000002 0.0661459656250000</resolutions>
   </grid>

   <source name="DZROL" type="wms">
     <getmap>
        <params>
           <FORMAT>image/png</FORMAT>
           <LAYERS>DZROL</LAYERS>
           <TRANSPARENT>TRUE</TRANSPARENT>
        </params>
     </getmap>
     <http>
        <url>******</url>
     </http>
   </source>

   <cache name="disk" type="disk">
       <base>/var/www/mapbender/tempo</base>
   </cache>

   <format name="PNG_BEST" type ="PNG">
   </format>


   <tileset name="DZROL_jpg">
       <source>DZROL</source>
       <cache>disk</cache>
       <format>PNG_BEST</format>
       <grid>PUWG1992</grid>
   </tileset>

   <service type="wms" enabled="true">
      <format>PNG</format>
   </service>

   <service type="wms" enabled="true"/>
   <service type="wmts" enabled="true"/>
   <service type="tms" enabled="true"/>
   <service type="kml" enabled="true"/>
   <service type="gmaps" enabled="true"/>
   <service type="ve" enabled="true"/>
   <service type="demo" enabled="true"/>

</mapcache>

Thank you for your time and patience,
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220620/26c54e4d/attachment.htm>


More information about the MapServer-users mailing list