Hi Martin: Hmmm... I'm surprised it works one way and not the other. I can only guess that a scale denominator is not being computed in one case versus the other. I can confirm the necessary check is being done in the MVT code (via msLayerIsVisible()) but if the basic information that function needs is not available then that's the problem.
I created a ticket: https://github.com/mapserver/mapserver/issues/5714 --Steve -----Original Message----- From: mapserver-users [mailto:[email protected]] On Behalf Of Martin Høgh Sent: Saturday, November 17, 2018 6:05 AM To: [email protected] Subject: [mapserver-users] MapServer/MapCache vector tile test with max/min scale denominator 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 _______________________________________________ mapserver-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
