Vector map package
The vector mappackage XML (.m6mmappackage.xml) is used to setup and describe a collection of vector map datasets and thus enable the creation of a complete, complex map.
Maria GDK 4.0 has added support for MBTiles-datasets with MapBox-styling using the <tileset>-parameter instead of <multidataset>. Note that only a subset of the Mapbox-style specification is supported so far.
Example:
<mappackage visibility="Visible" name="Mappackage example">
<mapversion value="1.0.0"/>
<vectormapdataset id="Norge 0-25M">
<multidataset name="OpenStreet" file="OpenStreetDataset/OpenStreetMap.m6mmultidataset.xml" minscale="500" maxscale="15000"/>
<multidataset name="Norge N50" file="Datasets N50/NorgeN50.m6mmultidataset.xml" maxscale="50000"/>
<multidataset name="Norge N250" file="n250-5mShape\NorgeN250.m6mmultidataset.xml" maxscale="250000"/>
<multidataset name="Norge N500" file="n250-5mShape\NorgeN500.m6mmultidataset.xml" maxscale="500000"/>
<multidataset name="Norge N1000" file="n250-5mShape\NorgeN1000.m6mmultidataset.xml" maxscale="1000000"/>
<multidataset name="Norge N2000" file="n250-5mShape\NorgeN2000.m6mmultidataset.xml" maxscale="2000000"/>
<multidataset name="Norge N5000" file="n250-5mShape\NorgeN5000.m6mmultidataset.xml" maxscale="25000000"/>
</vectormapdataset>
<vectormapdataset id="OSM Bright">
<tileset name="Bright" file="osm-bright.mbtiles" stylefile="\osm-bright-gl-style-master\style.json" minscale="20L" maxscale="1L" overzoom="6" resources="osm-bright-gl-style-master\icons"/>
</vectormapdataset>
</mappackage>
Mappackage
<mappackage>
is the root node of the mappackage-xml.
Attribute | Description | Properties |
---|---|---|
visibility | Valid values are "Visible" and "Hidden". Defines the map visibility in the map catalog service. If attribute not present the default value is Visible. | |
name | Human readable name for the mappackage |
Child element | Description | Properties |
---|---|---|
mapversion | Semantic version number for map package. | O A |
tilesettings | Settings for maptiles. | O A |
vectormapdataset | Adds a group of multidatasets or tilesets. Enables serverside merging of datasets at the same scale level. Can be referenced from other mappackages. | O R C A |
group | Group of multidatasets/tilesets. Can be used for serverside merging of datasets at the same scale level. | O R C A |
vectordataref | References a vectormapdataset defined in another mappackage. | O R A |
Mapversion
Attribute | Description | Properties |
---|---|---|
value | String representing semantic version number, MAJOR.MINOR.PATCH[-RELEASESTATE], for instance "2.1.1-RC" | O |
Tilesettings
Attribute | Description | Properties |
---|---|---|
serveemptytiles | If true, map service will return tiles even if empty. Default value is true. | O |
Vectormapdataset
Vectormapdataset enable serverside merging of datasets. These can be referenced from other mappackages using vectordataref elements.
<vectormapdataset id="Norge2013 0-25M" maskcoverage="MaskOpaque">
<multidataset name="Norge N50 2013" file="Norge 2013\N50\NorgeN50.m6mmultidataset.xml" maxscale="40000"/>
<multidataset name="Norge N250 2013" file="Norge 2013\N250\NorgeN250.m6mmultidataset.xml" maxscale="200000"/>
<multidataset name="Norge N500 2013" file="Norge 2013\N500\NorgeN500.m6mmultidataset.xml" maxscale="400000"/>
<multidataset name="Norge N1000 2013" file="Norge 2013\N1000\NorgeN1000.m6mmultidataset.xml" maxscale="800000"/>
<multidataset name="Norge N2000 2013" file="Norge 2013\N2000\NorgeN2000.m6mmultidataset.xml" maxscale="2500000"/>
<multidataset name="Norge N5000 2013" file="Norge 2013\N5000\NorgeN5000.m6mmultidataset.xml" maxscale="25000000"/>
</vectormapdataset>
<vectormapdataset id="OSM Bright">
<tileset name="Bright" file="osm-bright.mbtiles" stylefile="\osm-bright-gl-style-master\style.json" minscale="20L" maxscale="1L" overzoom="6" resources="osm-bright-gl-style-master\icons"/>
</vectormapdataset>
Child element | Description | Properties |
---|---|---|
multidataset | Adds map multidataset information. | O R A |
tileset | Adds tileset information. | O R A C |
Attribute | Description | Properties |
---|---|---|
id | Key that identifies the vectormapdataset. Used when referencing a dataset from another mappackage. | O |
maskcoverage | Mask mode. Valid values are "NoMasking" (no pixels included in mask), "MaskSemiTransparent" (all not fully transparent pixels included in mask), "MaskOpaque" (only fully opaque (a=255) pixels included in mask). Default value is "MaskSemiTransparent". | O |
Multidataset
Attribute | Description | Properties |
---|---|---|
name | Key that identifies the multidataset. | |
file | Relative path to the map multidataset xml file. | |
minscale | Minimum valid zoomlevel (use postfix 'L') or map scale for this tileset. Use of mapscale factors (k/K/m/M) are allowed. | O |
maxscale | Maximum valid zoomlevel (use postfix 'L') or map scale for this tileset. Use of mapscale factors (k/K/m/M) are allowed. | O |
Tileset
Use the tileset-parameter if you have a MBTiles-vectordataset with Mapbox-styling. Note that only a subset of the Mapbox styling specification is supported.
<vectormapdataset id="OSM Bright">
<tileset name="Bright" file="osm-bright.mbtiles" stylefile="\osm-bright-gl-style-master\style.json" minscale="20L" maxscale="1L" overzoom="6" resources="osm-bright-gl-style-master\icons"/>
</vectormapdataset>
Overzoom is used for drawing maps on levels where no data exists. The number of levels specified by the overzoom parameter controls the number of levels the mapservice can search upwards in the maplevel tree for data to draw. The first level encountered to contain data will be used.
Remember to specify relative path to additional resourcefiles (f.x. symbolfiles) using the "resources"-attribute if necessary.
Attribute | Description | Properties |
---|---|---|
name | Key that identifies the tileset. | |
file | Relative path to the MBTiles-file (vector tiles). Ignored if [[#Source][source]] is specified. | |
stylefile | Relative path to the Mapbox-stylefile (json). | |
resources | Relative path to folder containing additional resourcefiles (symbols, patterns etc). | O |
minscale | Minimum valid zoomlevel (use postfix 'L') or map scale for this tileset. Use of mapscale factors (k/K/m/M) are allowed. | O |
maxscale | Maximum valid zoomlevel (use postfix 'L') or map scale for this tileset. Use of mapscale factors (k/K/m/M) are allowed. | O |
overzoom | Number of zoomlevels. Default value is 0. | O |
Child element | Description | Properties |
---|---|---|
source | Setup for multiple sources referenced in Mapbox style. Supported since Maria GDK 4.3+. | O A R |
Source
Maria GDK 4.3+ supports Mapbox styling referencing multiple datasources.
<vectormapdataset>
<tileset name="norway" stylefile="norway_style.json" minscale="20L" maxscale="1L" overzoom="2" resources="\norway\icons">
<source name="norway_simple" file="norway_simple.mbtiles" />
<source name="contours" file="norway_contours.mbtiles" />
</tileset>
</vectormapdataset>
Attribute | Description | Properties |
---|---|---|
name | Key that identifies the source. Must match source-definition in corresponding Mapbox style. | |
file | Relative path to the MBTiles-file (vector tiles). |
Group
Mappackage groups enable serverside merging of datasets. This functionality is largely replaced by vectormapdataset.
Example:
<mappackage>
<group maskcoverage="MaskSemiTransparent">
<multidataset file="mgcp\FMGTMGCPTestdata.m6mmultidataset.xml" minscale="5000" maxscale="25000000"/>
</group>
<group>
<multidataset file="vmap0/vmap0.m6mmultidataset.xml" minscale="10000" maxscale="50000000"/>
</group>
</mappackage>
Child element | Description | Properties |
---|---|---|
multidataset | Adds map multidataset information. | O R A |
Attribute | Description | Properties |
---|---|---|
maskcoverage | Mask mode. Valid values are "NoMasking" (no pixels included in mask), "MaskSemiTransparent" (all not fully transparent pixels included in mask), "MaskOpaque" (only fully opaque (a=255) pixels included in mask). Default value is "MaskSemiTransparent". | O |
Vectordataref
Using <vectordataref>
makes it possible for a mappackage to reference datasets located in other mappackages. The dataset(s) to reference must be wrapped inside a <vectormapdataset>
-block and the <vectormapdataset>
must have an defined id (f.ex. id="Norge2013 0-25M").
Example:
This mappackage...
<mappackage>
<vectordataref id="Norge2013 0-25M" maskcoverage="MaskSemiTransparent"/>
</mappackage>
...references dataset in this mappackage:
<mappackage>
<vectormapdataset id="Norge2013 0-25M" maskcoverage="MaskOpaque">
<multidataset name="N50" file="Norge\N50\N50.m6mmultidataset.xml" maxscale="40000"/>
<multidataset name="N250" file="Norge\N250\N250.m6mmultidataset.xml" maxscale="200000"/>
</vectormapdataset>
</mappackage>