66MapServer Migration Guide
77*****************************************************************************
88
9- :Last Updated: 2026-04-19
9+ :Last Updated: 2026-05-01
1010
1111.. contents:: Table of Contents
1212 :depth: 2
@@ -117,7 +117,7 @@ MapServer 8.4 to 8.6 Migration
117117 query parameters to all URLs generated through the API, by
118118 defining the `ows_extra_params` parameter in the mapfile's WEB.METADATA object.
119119
120- .. code-block:: mapfile
120+ .. code-block:: mapfile
121121
122122 MAP
123123 ...
@@ -155,6 +155,9 @@ MapServer 8.2 to 8.4 Migration
155155 an OGR backend connection (see CVE record: `CVE-2025-59431 <https://www.cve.org/CVERecord?id=CVE-2025-59431>`__,
156156 or MapServer's `Security Advisory <https://github.com/MapServer/MapServer/security/advisories/GHSA-256m-rx4h-r55w>`__)
157157
158+ - MapServer now requires at least `CMake <https://cmake.org/>`__ version 3.16
159+ for building
160+
158161- you can now build against the PCRE2 library (WITH_PCRE2=ON)
159162
160163- reminder that since the PROJ 9.1 release, the former `PROJ_LIB` variable has
@@ -346,7 +349,8 @@ MapServer 7.6 to 8.0 Migration
346349MapServer 7.4 to 7.6 Migration
347350==============================
348351
349- - MapServer now requires at least CMake version 3.0 for compiling
352+ - MapServer now requires at least `CMake <https://cmake.org/>`__ version 3.0
353+ for building
350354
351355- PointZM data support (X,Y,Z,M coordinates) is now enabled by default
352356
@@ -364,7 +368,7 @@ MapServer 7.4 to 7.6 Migration
364368- CONNECTIONOPTIONS parameter has been added in the mapfile LAYER, to take
365369 advantage of GDAL/OGR driver options. (see :ref:`RFC 125 <rfc125>`) such as:
366370
367- .. code-block:: mapfile
371+ .. code-block:: mapfile
368372
369373 LAYER
370374 NAME "test"
@@ -380,7 +384,7 @@ MapServer 7.4 to 7.6 Migration
380384 to enable a 'painters model' where all classes for a layer are drawn at once with a
381385 `ALL_MATCHING_CLASSES` setting, such as:
382386
383- .. code-block:: mapfile
387+ .. code-block:: mapfile
384388
385389 LAYER
386390 NAME "test"
@@ -417,7 +421,7 @@ MapServer 7.4 to 7.6 Migration
417421
418422 Here is an example of the new `wms_essential` parameter:
419423
420- .. code-block:: mapfile
424+ .. code-block:: mapfile
421425
422426 LAYER
423427 NAME "country_bounds"
@@ -437,7 +441,7 @@ MapServer 7.4 to 7.6 Migration
437441- Windows users can now use umlauts (special characters such as ä ö ü) in their
438442 directory paths and filenames, such as:
439443
440- .. code-block:: mapfile
444+ .. code-block:: mapfile
441445
442446 LAYER
443447 ..
@@ -502,19 +506,19 @@ MapServer 6.4 to 7.0 Migration
502506 from MapServer syntax to native syntax (e.g. SQL). Native expressions can still be set either
503507 using: 1) sub-selects in the DATA statement or 2) using the new NATIVE_FILTER processing key.
504508
505- ::
509+ .. code-block:: mapfile
506510
507- # OGR Layer Before
508- LAYER
509- ...
510- FILTER 'where id=234'
511- END
511+ # OGR Layer Before
512+ LAYER
513+ ...
514+ FILTER 'where id=234'
515+ END
512516
513- # OGR Layer After
514- LAYER
515- ...
516- PROCESSING 'NATIVE_FILTER=id=234'
517- END
517+ # OGR Layer After
518+ LAYER
519+ ...
520+ PROCESSING 'NATIVE_FILTER=id=234'
521+ END
518522
519523- MapServer attribute queries (e.g. mode=item[n]query) *must* be specified using MapServer
520524 expression syntax (qstring and qitem (opt)). For RDBMS backends you no longer send SQL snippets,
@@ -526,21 +530,21 @@ MapServer 6.4 to 7.0 Migration
526530 and MapScript getter/setter functions will continue to function but unpredictable results will
527531 occur if used in conjunction with COMPOSITE blocks. For more information see https://mapserver.org/development/rfc/ms-rfc-113.html.
528532
529- ::
530-
531- # Before
532- LAYER
533- ...
534- OPACITY 70
535- END
533+ .. code-block:: mapfile
536534
537- # After
538- LAYER
539- ...
540- COMPOSITE
535+ # Before
536+ LAYER
537+ ...
541538 OPACITY 70
542539 END
543- END
540+
541+ # After
542+ LAYER
543+ ...
544+ COMPOSITE
545+ OPACITY 70
546+ END
547+ END
544548
545549- Handling of non UTF-8 encoded datasources has changed with RFC103. Mapfiles
546550 now *must* be saved in UTF-8 encoding, and requests returned by MapServer
@@ -567,38 +571,40 @@ MapServer 6.4 to 7.0 Migration
567571- ExternalGraphics added through SLD must now validate against the
568572 "sld_external_graphic" entry of the MAP->WEB->VALIDATION block
569573
570- ::
574+ .. code-block:: mapfile
571575
572- MAP
573- WEB
574- VALIDATION
575- "sld_external_graphic" "^/path/to/symbols/.*png"
576+ MAP
577+ WEB
578+ VALIDATION
579+ "sld_external_graphic" "^/path/to/symbols/.*png"
580+ END
581+ END
576582 END
577- END
578- END
579583
580584MapServer 6.2 to 6.4 Migration
581585==============================
582586
587+ - MapServer now must be built with the CMake tool. Build instructions
588+ are included in the `INSTALL_CMAKE.md <https://github.com/MapServer/MapServer/blob/main/INSTALL_CMAKE.md>`__
589+ file in the source directory. You will need to have CMake installed
590+ on your system. Users of mapscripts (except PHP) will also need `SWIG <https://www.swig.org/>`__
591+ to be installed.
592+
583593- The "ows_extent" layer metadata is not used anymore to obtain georeferencing
584594 information for unreferenced raster data. Please use the "extent" layer key
585595 instead
586596
587- ::
597+ .. code-block:: mapfile
588598
589- LAYER
590- ...
591- EXTENT -180 90 180 90
592- END
599+ LAYER
600+ ...
601+ EXTENT -180 90 180 90
602+ END
593603
594604- Validation patterns cannot be specified in metadata blocks (i.e. using
595605 xxx_validation_pattern and default_xxx metadata entries), use VALIDATION blocks.
596606 see #4596 #4604 #4608 or :ref:`runsub`
597607
598- - Build has changed after the switch to cmake. Build instructions are included in
599- the INSTALL.CMAKE file in the source directory. You will need to have cmake installed
600- on your system. Users of mapscripts (except php) will also need swig to be installed.
601-
602608- WFS paging parameter startIndex changed to base on 0 instead of 1 (0 is the first
603609 feature). See #4180 for external references.
604610
@@ -726,7 +732,7 @@ support it.
726732As a result the parameters BACKGROUNDCOLOR, BACKGROUNDSHADOWCOLOR, BACKGROUNDSHADOWSIZE
727733are no more. To draw a label "box" in 6.0 you'd do:
728734
729- ::
735+ .. code-block:: mapfile
730736
731737 LABEL
732738 ...
@@ -850,7 +856,9 @@ Mapfile Changes - OGC requests - DUMP parameter removed
850856The DUMP LAYER parameter has been removed. To enable output of
851857geometries in WMS getfeatureinfo requests - GML
852858(INFO_FORMAT=application/vnd.ogc.gml), LAYER METADATA is used
853- instead::
859+ instead.
860+
861+ .. code-block:: mapfile
854862
855863 METADATA
856864 gml_geometries "geom"
@@ -877,7 +885,7 @@ following character is ", ' or \.
877885For Windows users: if you have a path string delimited by single/double
878886quotes that ends with \, you will have to escape the last backslash.
879887
880- ::
888+ .. code-block:: mapfile
881889
882890 SHAPEPATH "C:\ms4w\shapefiles\"
883891 # should be modified to...
@@ -965,7 +973,7 @@ the 5.4/5.6 versions. Gone are resultsGetShape and getFeature methods. You shoul
965973refactored getShape method to access layer shapes. That method takes a resultObj and returns
966974a shapeObj. Typical use would be (in Perl):
967975
968- ::
976+ .. code-block:: perl
969977
970978 $layer->queryByRect($map, $map->{extent}); # layer is still open
971979
@@ -981,6 +989,8 @@ A resultObj encapsulates the data used to manage a result set.
981989
982990To access shapes independently of a query use the new resultObj class:
983991
992+ .. code-block:: perl
993+
984994 $layer->open();
985995 $shape = $layer->getShape(new mapscript::resultObj(1));
986996 $layer->close();
@@ -1142,7 +1152,7 @@ like ANGLEITEM or LABELSIZEITEM were used, now you denote the attribute
11421152in the context of the property being bound. For example, to bind an
11431153attribute to a label size you'd do:
11441154
1145- ::
1155+ .. code-block:: mapfile
11461156
11471157 LABEL
11481158 ...
0 commit comments