# MapML — Map Markup Language (MapML)

> MapML (Map Markup Language (MapML)): HTML-like XML markup for web maps and embedded vector features, developed by the W3C Maps for HTML Community Group. Specs, software and free sample files; convert MapML to 39 formats online.

- Page: https://beta.mygeodata.cloud/formats/mapml



## What is a MapML file?

Map Markup Language (MapML) is a text-based markup for representing maps and map layers in a way that integrates with HTML. It is developed by the Maps for HTML Community Group at the W3C. Its specification is a community group draft rather than a formal W3C Recommendation. The goal is to let browsers and web pages display map layers declaratively, with tiles, images and vector features served as MapML documents.

A MapML document has a mapml root element with head and body sections. Vector data is encoded as map-feature elements. Each feature contains a map-geometry element with coordinates and a map-properties element holding attribute content, often as HTML. Points, lines and polygons can be mixed in one document. Coordinates refer to a declared projection, such as OSMTILE (Web Mercator), WGS84 or CBMTILE. Support in mainstream browsers currently relies on a JavaScript polyfill.

MapML files are mostly exchanged between web map developers, public-sector data publishers and GIS teams that serve layers to web pages through a custom map element. Because the format is a community group draft, behaviour can differ between tools. Check which projection the document declares, since coordinates are interpreted in that system, and expect attributes to arrive as HTML rather than plain fields.

### Technical details

| | |
|---|---|
| Full name | Map Markup Language (MapML) |
| Data type | Vector · Web & JSON |
| File extension | .mapml |
| Files | Single file |
| Media type | text/mapml |
| Geometry types | Point, LineString, Polygon |
| Multiple layers | Yes |
| Mixed geometry in a layer | Yes |
| Attribute names | — |
| Coordinate system | Any (EPSG, ESRI, custom) |
| Converter support | Read & write |
| Typical software | GDAL/OGR, GeoServer, MapML.js, QGIS |
| Specification | https://maps4html.org/MapML/spec/ |

### Specifications & references

- https://maps4html.org/MapML/spec/
- https://gdal.org/en/stable/drivers/vector/mapml.html

### Sample MapML files — free download

- [Basemap (MapML)](https://beta.mygeodata.cloud/static/landing/samples/v1/mapml/st-helena-basemap.mapml) — Multi-layer basemap of Saint Helena: island outline, land cover, waterways, 100 m contours, roads, Jamestown buildings and places. MapML document (WGS 84 / OSMTILE extent) with one layer per feature class. (916.5 kB, EPSG:4326)

### Convert MapML to other formats

- [MapML to CSV](https://beta.mygeodata.cloud/converter/mapml-to-csv)
- [MapML to DXF](https://beta.mygeodata.cloud/converter/mapml-to-dxf)
- [MapML to GeoJSON](https://beta.mygeodata.cloud/converter/mapml-to-geojson)
- [MapML to GeoPDF](https://beta.mygeodata.cloud/converter/mapml-to-geopdf)
- [MapML to GPKG](https://beta.mygeodata.cloud/converter/mapml-to-gpkg)
- [MapML to GPX](https://beta.mygeodata.cloud/converter/mapml-to-gpx)
- [MapML to KML](https://beta.mygeodata.cloud/converter/mapml-to-kml)
- [MapML to KMZ](https://beta.mygeodata.cloud/converter/mapml-to-kmz)
- [MapML to SHP](https://beta.mygeodata.cloud/converter/mapml-to-shp)
- [MapML to TopoJSON](https://beta.mygeodata.cloud/converter/mapml-to-topojson)
- [MapML to XLSX](https://beta.mygeodata.cloud/converter/mapml-to-xlsx)
- [MapML to DGN](https://beta.mygeodata.cloud/converter/mapml-to-dgn)
- [MapML to FGB](https://beta.mygeodata.cloud/converter/mapml-to-fgb)
- [MapML to FileGDB](https://beta.mygeodata.cloud/converter/mapml-to-filegdb)
- [MapML to GML](https://beta.mygeodata.cloud/converter/mapml-to-gml)
- [MapML to MapInfo](https://beta.mygeodata.cloud/converter/mapml-to-mapinfo)
- [MapML to MBTiles](https://beta.mygeodata.cloud/converter/mapml-to-mbtiles)
- [MapML to MIF](https://beta.mygeodata.cloud/converter/mapml-to-mif)

## Frequently asked questions

### How does MapML differ from GeoJSON?

GeoJSON is a JSON format for geometry and simple properties, with coordinates in WGS 84. MapML is XML-like markup that declares a projection and stores feature attributes as HTML, so it is designed to be consumed directly by web pages and map viewers.

### Why does my MapML file not display in a browser?

Mainstream browsers currently need a JavaScript polyfill such as MapML.js to render MapML. Also check that the file is served with the text/mapml media type and that its declared projection matches the viewer.

### Does a MapML file store attribute fields like a table?

Not as typed columns. Each feature carries a map-properties element, often containing HTML content such as a table or text. When converting to a tabular format, attributes may need to be extracted from that markup.

### What is a MapML file?

Map Markup Language (MapML) is a text-based markup for representing maps and map layers in a way that integrates with HTML. It is developed by the Maps for HTML Community Group at the W3C. Its specification is a community group draft rather than a formal W3C Recommendation. The goal is to let browsers and web pages display map layers declaratively, with tiles, images and vector features served as MapML documents.

A MapML document has a mapml root element with head and body sections. Vector data is encoded as map-feature elements. Each feature contains a map-geometry element with coordinates and a map-properties element holding attribute content, often as HTML. Points, lines and polygons can be mixed in one document. Coordinates refer to a declared projection, such as OSMTILE (Web Mercator), WGS84 or CBMTILE. Support in mainstream browsers currently relies on a JavaScript polyfill.

### How do I open a MapML file?

MapML files can be opened in GDAL/OGR, GeoServer, MapML.js and QGIS. Without any software you can preview and convert them online in MyGeodata Cloud.

### What can I convert MapML to?

Popular conversions are CSV, DXF, GeoJSON, GeoPDF, GPKG and GPX. In total the Converter writes MapML data to 39 formats.

### How do I create a MapML file?

Convert existing data to MapML — for example from CSV, DWG, DXF, GeoJSON and GeoPDF. Upload the file, choose MapML as output and download the result.

