[MapServer-users] How to handle multiple styles in MapCache?

Just van den Broecke justb4 at gmail.com
Fri Sep 13 14:11:09 PDT 2024


Hi Alessandro,

I try to understand your issue. Beware, I am not a MapCache expert.

You mention a GetMap request and STYLE (not STYLES?) parameter. MapCache 
supports tiling, like WMTS GetTile, not WMS GetMap.

But looking at the MapCache docs (1.8 is quite old) [1]. The <getmap> 
element within the <source> element may contain WMS parameters, 
including STYLES. These will be sent to the WMS (GeoServer) backend (as 
GetMap). But I see no way how one could have varying Styes for a 
tilecache, other than a separate cache per STYLES value.

[1] https://mapserver.org/fr/mapcache/config.html

Hope this helps!

Best,

Just
On 13/09/2024 17:47, Alessandro Parma via MapServer-users wrote:
> Dear ML,
> 
> I am using MapCache version 1.8 and having issues with the caching 
> configuration of one of the layers:
> 
> The layer in question can be requested with multiple different styles 
> but it looks like the STYLE parameter in
> the GetMap requests is ignored and I get the same cached tiles no matter 
> what the style value of the request is.
> 
> This is a snippet of the configuration:
> ...
>     <source name="mtg_fd:ir105_hrfi" type="wms">
>      <getmap>
>          <params>
>              <TRANSPARENT>true</TRANSPARENT>
>              <TILED>false</TILED>
>              <LAYERS>mtg_fd:ir105_hrfi</LAYERS>
>          </params>
>      </getmap>
>      <http>
>          <url>http://wms-geoserver-slave-svc:8080/geoserver/wms 
> <http://wms-geoserver-slave-svc:8080/geoserver/wms>?</url>
>      </http>
>      <timeout>10</timeout>
>      <connection_timeout>3</connection_timeout>
>        </source>
> 
>      <tileset name="mtg_fd:ir105_hrfi">
>          <source>mtg_fd:ir105_hrfi</source>
>          <cache>multitier-cache</cache>
>          <grid use_wms_intermediate_resolutions="true">EPSG4326_512</grid>
>          <grid use_wms_intermediate_resolutions="true">EPSG3995_512</grid>
>          <grid use_wms_intermediate_resolutions="true">EPSG3857_512</grid>
>      <grid use_wms_intermediate_resolutions="true">EPSG3976_512</grid>
>          <dimensions>
>              <dimension type="regex" name="TIME" default="now">
>                  <regex>^.*$</regex>
>              </dimension>
>          </dimensions>
>          <format>MIXED</format>
>          <metatile>1 1</metatile>
>          <metabuffer>10</metabuffer>
>          <expires>604800</expires>
>      </tileset>
> ...
> 
> Do you have any suggestions?
> 
> -- 
> 
> Regards, Alessandro Parma == GeoServer Professional Services from the 
> experts! Visit http://goo.gl/it488V <http://goo.gl/it488V> for more 
> information. == Alessandro Parma Technical Lead / Senior DevOps Engineer 
> GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy 
> phone: +39 340 4752467 fax: +39 0584 1660272 
> https://www.geosolutionsgroup.com <https://www.geosolutionsgroup.com> 
> https://twitter.com/geosolutions_it 
> <https://twitter.com/geosolutions_it> 
> ------------------------------------------------------- Con riferimento 
> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - 
> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che 
> ogni circostanza inerente alla presente email (il suo contenuto, gli 
> eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i 
> solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è 
> giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è 
> illecita. Le sarei comunque grato se potesse darmene notizia. This email 
> is intended only for the person or entity to which it is addressed and 
> may contain information that is privileged, confidential or otherwise 
> protected from disclosure. We remind that - as provided by European 
> Regulation 2016/679 “GDPR” - copying, dissemination or use of this 
> e-mail or the information herein by anyone other than the intended 
> recipient is prohibited. If you have received this email by mistake, 
> please notify us immediately by telephone or e-mail.
> 
> 
> _______________________________________________
> 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