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

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


hm, wait

The request from my app is based on the getcapability from mapcache, so 
no styles. But when mapcache is sending the request to mapserver the 
configured STYLES in the getmap section in the mapcache config is added 
correctly.

I don't know how I missed that, but I think I get what I expect now.

Trygve Aspenes

Den 2023-09-29 17:29, skrev Trygve Aspenes via MapServer-users:
> 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
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the MapServer-users mailing list