Help:Map Data

Map data allows users to store GeoJSON data on wiki, similar to images. Other wikis may use this data to draw on top of the maps, together with other map customizations.

To create a new map data, go to Wikimedia Commons, and create a new page in the Data namespace with the .map suffix, such as. For now, page content can only be edited in the raw JSON format. Eventually, we hope there will be a powerful editor to simplify GeoJSON creation.

Top-level fields
Tabular data has several required and optional top-level elements:
 * The required  field must always be set to   string value. For now, tabular data only supports CC0 (Public Domain dedication) license. More license support may be available in the future.
 * The optional  field must be set to a localized string value - an object with at least one key-value, where the key is a language code (e.g. "en"), and the value is a description string.
 * The optional  field must be an integer between 0 and 18. This value is only used for displaying map on its own page, not when including it in the articles.
 * The optional  and   fields specify the center of the map when displaying it on its own page, not when including it in the articles.
 * The required  field must be set to the valid GeoJSON content. Per GeoJSON specification,   field may be set for every Feature object. The map data will use all of the Simple Style properties, such as ,  ,   (color), and others. Additionally, the   and   fields may be either strings or localized string objects (similar to the localized type in tabular data). This allows the same map data to appear differently depending on the user's language.

Usage

 * Use  and   tags to show a map together with the custom map data defined in the .map page. For that, add this wiki markup (or similar
 * While not a very common usage scenario, a Lua script on any wiki can get map data by calling . The function returns data in almost the same format as the original JSON, except that all localized strings will be converted to regular strings, and the license field will also include a localized license name. To get the data in another language, pass language code as the second parameter. To get the data in the original, unmodified form, use "_" as the language code.