[MapServer-users] mapcache: Setting styles for a tileset and source

Trygve Aspenes trygve at aspenes.priv.no
Fri Sep 29 08:29:43 PDT 2023


Hi

In mapserver I have several styles.

In mapcache I see no styles info in the getcapabilities document, so my 
app can't know anything about it.
Anyway, you would need one tileset for each styles to cache the data. So 
right, that makes sense.

Then I try to make one tileset per style. I add to my source config, 
getmap like this:

     <source name="tileset_source" type="wms">
         <http>
             <url>http://mapserver:8080?</url>
         </http>
         <getmap>
             <params>
                 <FORMAT>image/png</FORMAT>
                 <LAYERS>tileset</LAYERS>
                 <STYLES>style_name</STYLES>
             </params>
         </getmap>
     </source>

But no luck. STYLES is sent empty to my mapserver wms server. I haven't 
got time to debug the code now, but my first look, STYLES should be 
handled here:
https://github.com/MapServer/mapcache/blob/main/lib/source_wms.c#L154-L167

the for loop would parse all elements. But I would need a closer look to 
see if this is what actually happends.

Anyone else know how to handle styles in mapcache?

Trygve Aspenes


More information about the MapServer-users mailing list