TransWikia.com

MapServer, Mapcache and WMS

Geographic Information Systems Asked by Kai Behncke on April 19, 2021

I try to use MapServer 7.4 with MapCache 1.6.1 on a Suse SLES
15-system.
MapServer is delivering a WMS very well.
I installed MapCache successfully (I think).
In my mapcache.xml I have set:

<source name="kanaldaten" type="wms">
<getmap>
<params>
<FORMAT>image/jpeg</FORMAT>
<LAYERS>schaechte</LAYERS>
</params>
</getmap>
<http>
<url>http://blablabla/cgi-bin/mapserv?map=/home/blablabla/wms.map</url>
</http>
</source>

   <tileset name="kachelnkanal">
      <source>kanaldaten</source>
      <cache>disk</cache>
      <grid>WGS84</grid>
      <format>PNG</format>
      <metatile>5 5</metatile>
      <metabuffer>10</metabuffer>
      <expires>3600</expires>
   </tileset>

If I use the WMS-demo application:

http://blablabla/mapcache/demo/wms everything works fine.
A couple of tiles are produced on the server.

But: If I use my WMS e.g. in QuantumGIS or at a simple
…GetMap-Request in an URL
no tiles at all are produced on the server??

Am I right that the tile-producing only works, if the mapclient has
specific entries?

One Answer

Allright, forget that question.

The answer is:

Not the WMS-URL should be opened in the client but the url to the mapcache-software:

e.g.:

var wmsSource = new ImageWMS({ url: 'http://blabla/mapcache/?', params: {'LAYERS': 'kachelnkanal'}, serverType: 'mapserver', crossOrigin: 'anonymous' });

var wmsLayer = new ImageLayer({ source: wmsSource });

Answered by Kai Behncke on April 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP