Wikipedia:Map data

Jump to navigation Jump to search

The subpages of this template can be used to store GeoJSON map data related to an article.


GeoJSON map data cannot be directly uploaded and stored in the File namespace. While map data should usually be stored on Commons (see mw:Help:Map data), until August 2018 only CC0 licences were not allowed. Because of this former restriction, this process was set up so that data with licences compatible with Wikipedia's CC-BY-SA-3.0 licencing (e.g. as CC-BY licences), the could be stored as subpages here on Wikipedia.

Storing data on Wikipedia subpages can allow the same data to be used in multiple articles with different features given prominent styling depending on the article title. For example, Wikipedia:Map data/Columbus Register of Historic Properties uses parser functions such as "stroke": {{#ifeq:{{PAGENAME}}|Old Oaks Historic District|"#ff0000"|"#666666"}}.


Created a subpage of this page. It should probably follow the convention used on Commons of /data source/title. At the start of the page, in a <noinclude>...</noinclude> section, include the {{information}} and licencing templates.

The user script User:Evad37/kmlToJson can be used to generate GeoJSON data from a KML file.

If parser functions are used, ensure that they are not used within quotation marks, e.g. use

"stroke": {{#ifeq:{{PAGENAME}}|Foo|"#ff0000"|"#666666"}}

rather than

"stroke": "{{#ifeq:{{PAGENAME}}|Foo|#ff0000|#666666}}"

Displaying the data[edit]

Use {{Mapbox}} or {{Maplink}} (with |raw={{Wikipedia:Map data/SUBPAGE}})

See also[edit]