[mapserver-users] MapServer/MapCache vector tile test with max/min scale denominator
Martin Høgh
mh at mapcentia.com
Sat Nov 17 04:05:17 PST 2018
I've tested MapServer and MapCache with vector tiles using this
MapServer branch:
https://github.com/sdlime/mapserver/tree/vector-tiles
And this MapCache PR:
https://github.com/mapserver/mapcache/pull/166
And it works.
I've also tested the layer level "max/min scale denominator" setting in
MapServer to filter out layers in the vector tiles for different zoom
levels, which also works when using Mapserver directly with the classic
cgi interface, but not when using MapCache.
The max/min scale denominator kicks in with something likes this:
http://127.0.0.1/cgi-bin/mapserv.fcgi?map=/my_mapfile.map&mode=tile&tilemode=gmap&tile={x}+{y}+{z}&layers=all&map.imagetype=mvt
But when requesting tiles through MapCache the max/min scale denominator
doesn't kicks in at any zoom levels.
I believe its because MapCache is requesting tiles through the WMS
interface of MapServer and for some reason that behaves differently?
The definition in the MapCache file is
<!—define a new raw format to use for MapBox vector tiles -->
<format name="MVT" type="RAW">
<extension>mvt</extension>
<mime_type>application/vnd.mapbox-vector-tile</mime_type>
</format>
<!—this WMS source fetches MapBox vector tiles (.mvt) -->
<source name="wms_mvt" type="wms">
<http>
<url>http://localhost/cgi-bin/mapserv.fcgi?</url>
</http>
<getmap>
<params>
<LAYERS>public</LAYERS>
<FORMAT>application/vnd.mapbox-vector-tile</FORMAT>
<MAP>/my_mapfile.map </MAP>
</params>
</getmap>
</source>
<!—and finally the tileset -->
<tileset name="mvt">
<source>wms_mvt</source>
<grid>g</grid>
<cache>disk</cache>
<format>MVT</format>
</tileset>
Cheers
--
Martin Høgh
MapCentia ApS
More information about the MapServer-users
mailing list