[MapServer-users] MVT Unable to initialize image

mathias cunault mathias.cunault at inrap.fr
Tue Jul 29 06:39:21 PDT 2025


Finally, I use MVT mode successfully. Here is what I did if it can help
(and I will probably read my own lines in few months !)
- installed Mapserver with MS4W 5
- followed instructions (readme.txt) to replace old mapserver & Apache with
new ones. Not as easy as it sounds because...
- had to install the VSC++ in the ms4w/tmp, not the most recent one, for
Apache (otherwise php conflict according to the log).
- in httpd.conf of Apache change DocumentRoot to define my storage of
mapfiles.
- in c:/ms4w/ms4w.conf, defined my own MS_MAP_PATTERN to stick to the
mapfile root just above.
- in mapfile :
 - OutputFormat mvt according to the doc
https://mapserver.org/output/tile_mode.html
 - did not use tile_map_edge_buffer nor tile_metatile_level or in
Openlayers there were problems of rendering as polygons where "moving" from
here to there on the map each time I moved the map.
- At last in openLayers : in a VectorTileSource, set an url like this :
http://
.../cgi-bin/mapserv.exe?MAP=C:/ms4w/Apache/site/mapfile/vue_prescription_pgts_wfs.map&"
+

"mode=tile&tilemode=gmap&tile={x}+{y}+{z}&LAYERS=prescription&map.imagetype=mvt"

and now it works fine.

Cordialement,

*----------*
*Mathias Cunault*

*référent SIG / Admin Caviar*

*Inrap Tours - 148 av. Maginot37000 TOURS06 32 05 98 96*
abonnez-vous à la lettre d'information de l'Inrap : http://ww
<http://www.inrap.fr/newsletter.php>w.inrap.fr/newsletter.php
<http://www.inrap.fr/newsletter.php>


Le sam. 26 juil. 2025 à 10:44, Jeff McKenna via MapServer-users <
mapserver-users at lists.osgeo.org> a écrit :

> Also be sure to always define a PROJECTION block for each of your layers.
>
> Have a nice weekend,
>
> -jeff
>
>
>
>
> --
> Jeff McKenna
> GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
> On 2025-07-25 1:42 p.m., Jeff McKenna wrote:
> > Hi Mathias,
> >
> > What happens if you try in your request: &TILE=0+0+0 (and remove the
> > &map.imagetype part) ?
> >
> > (that's what I did while documenting steps for the page https://
> > mapserver.org/output/tile_mode.html )
> >
> > Recent MS4W versions also include an MVT demo as well as a local.map
> > test file, so you could:
> >
> >
> > - first try in your browser http://127.0.0.1/cgi-bin/mapserv.exe?MAP=/
> > ms4w/apps/local-demo/
> > local.map&MODE=tile&TILEMODE=gmap&TILE=0+0+0&LAYERS=countries  (you
> > should see a map image of the world countries in your browser)
> >
> > - then add your OUTPUTFORMAT for MVT into local.map, and then try:
> >
> > http://127.0.0.1/cgi-bin/mapserv.exe?MAP=/ms4w/apps/local-demo/
> >
> local.map&MODE=tile&TILEMODE=gmap&TILE=0+0+0&LAYERS=countries&map.imagetype=mvt
> >
> > If that fails, you might have to upgrade your MS4W version.
> >
> > But if that works, I would then paste your "prescription" layer into
> > local.map, and reload that same request in your browser.
> >
> > thanks,
> >
> > (and thanks for using MS4W)
> >
> > -jeff
> >
> >
> >
>
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20250729/a76cf804/attachment.htm>


More information about the MapServer-users mailing list