[mapserver-users] mapcache config troubles, "Tile parameter not set"
Hal Mueller
hal at mobilegeographics.com
Tue Apr 28 20:47:26 PDT 2015
I have MapServer set up, rendering PostGIS into tiles for a Leaflet.js project. I want to cache a couple of the layers. I think I have something misconfigured in mapcache.xml. Mapcache is passing MapServer a BBOX instead of a tile reference.
Here’s the raw MapServer request, generated by Leaflet.js if I configure Leaflet to hit MapServer directly. This works fine.
GET /cgi-bin/mapserv?map=/data/web/www/mapserver/sitesTest.map&layers=property_pt%20property_poly&mode=tile&tilemode=gmap&tile=131+190+9
Here’s a sample request if I configure Leaflet to hit Mapcache. This is what Leaflet asks my server for:
GET /mapcache/tms/1.0.0/hpsites/4/2/4.png
That request generates the following internal request, from Mapcache to Mapserver. It’s pretty close; the layers are right, but not the SERVICE, BBOX, WIDTH, and HEIGHT parameters.
GET /cgi-bin/mapserv?mode=tile&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&STYLES=&BBOX=-20135347.738994,-7611905.024751,-7416226.232341,5107216.481902&WIDTH=1300&HEIGHT=1300&FORMAT=image/png&SRS=EPSG:3857&MAP=/data/web/www/mapserver/sites.map&LAYERS=property_pt%20property_poly
Mapcache.xml:
<mapcache>
<cache name="disk" type="disk">
<base>/var/www/mapcache/cache</base>
<symlink_blank/>
</cache>
<source name="hpsites" type="tms">
<getmap>
<params>
<FORMAT>image/png</FORMAT>
<MAP>/data/web/www/mapserver/sites.map</MAP>
<LAYERS>property_pt%20property_poly</LAYERS>
</params>
</getmap>
<http>
<url>http://a.historypointer.com/cgi-bin/mapserv?mode=tile&</url>
</http>
</source>
<tileset name="hpsites">
<source>hpsites</source>
<cache>disk</cache>
<grid>WGS84</grid>
<format>PNG</format>
<metatile>5 5</metatile>
<metabuffer>10</metabuffer>
<expires>10</expires>
</tileset>
<default_format>PNG</default_format>
<service type="tms" enabled="true">
<full_wms>assemble</full_wms>
<resample_mode>bilinear</resample_mode>
<format>PNG</format>
<maxsize>4096</maxsize>
</service>
<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="mapguide" enabled="true"/>
<service type="demo" enabled="true"/>
<errors>report</errors>
<lock_dir>/var/www/mapcache/cache</lock_dir>
</mapcache>
Error log from Apache (note msTileSetup()…Tile parameter not set.)
[Tue Apr 28 18:12:11 2015] [error] [client 162.17.176.230] wms request for tileset hpsites returned an unsupported format:\n<HTML>\n<HEAD><TITLE>MapServer Message</TITLE></HEAD>\n<!-- MapServer version 6.5-dev OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->\n<BODY BGCOLOR="#FFFFFF">\nmsTileSetup(): Web application error. Tile parameter not set.\n</BODY></HTML>, referer: http://www.historypointer.com/resourcesTest.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150428/66d7a197/attachment.htm>
More information about the MapServer-users
mailing list