![]() | This help page is a
how-to guide. It details processes or procedures of some aspect(s) of Wikipedia's norms and practices. It is not one of
Wikipedia's policies or guidelines, and may reflect varying levels of
consensus and
vetting. |
This is a tutorial for creating interactive maps on Wikipedia for shapes using OpenStreetMap data, available on a compatible Open Database License. This is applicable for creating maps of neighborhoods, parks, historic districts, campuses, and most other present-day sites. For maps of lines (transit routes, roads, etc.), see Wikipedia:Creating route maps from OpenStreetMap data.
This tutorial requires basic knowledge of:
If you need help please use the talk page, User talk:Ɱ, or Module talk:Mapframe.
There are three methods you can use to find the data you want for your map:
The first thing to try is the easiest. There's a possibility your data is already linked and you're ready to map. Create a test map in your sandbox. You'll need to use {{ Maplink}} together with the Wikidata ID of the shape. As an example: {{maplink|frame=yes|type=shape|id=Q160236}} If it displays, great. You can use the map and add parameters to make it display to your liking. If the map data does not populate, the below methods are straight-forward and reliable:
If you already know how the relation would be tagged, the OSM Relation Analyzer can be more convenient. Note: this can only be used for shapes that are relations, not ways.
If you found the data on OSM, continue on to Part 3. If you did not find it, continue to Part 2 first to create the shape on OpenStreetMap.
This optional step is only for shapes that are not already mapped on OpenStreetMap. Note that the entity you want to map must be an existing place in order to be accepted on OpenStreetMap, as OSM is not intended to map out historical, fictional, or unrecognized entities.
There are two ways to embed the shape into an article, both using the {{ maplink}} template:
If the shape has a Wikidata item and the OpenStreetMap shape relation already has a wikidata
tag set to that item's QID, you can embed a map of the shape directly onto a Wikipedia article as
external data. Use the {{
maplink}} template, setting the |id=
parameter to the QID, such as Q88466277. Normally, changes to the route in OpenStreetMap are reflected in the article within about two days.
Example: {{maplink|frame=yes|type=shape|id=Q160409|text=[[Central Park]]}}
Using map data on Wikimedia Commons:
"license": "ODbL-1.0", // ODC Open Database License v1.0
and save the page.|from=COTA10.map
, or manually, like
seen here.Example: {{maplink|frame=yes|frame-width=180|frame-height=270|from=COTA8.map|type=line|stroke-width=2|stroke-color=#0e2c6c|text=[[Central Ohio Transit Authority|COTA]] route {{COTA link|8}}}}
If the shape changes in OpenStreetMap, repeat steps 1 through 3 to update the existing Wikimedia Commons map data page.
![]() | This help page is a
how-to guide. It details processes or procedures of some aspect(s) of Wikipedia's norms and practices. It is not one of
Wikipedia's policies or guidelines, and may reflect varying levels of
consensus and
vetting. |
This is a tutorial for creating interactive maps on Wikipedia for shapes using OpenStreetMap data, available on a compatible Open Database License. This is applicable for creating maps of neighborhoods, parks, historic districts, campuses, and most other present-day sites. For maps of lines (transit routes, roads, etc.), see Wikipedia:Creating route maps from OpenStreetMap data.
This tutorial requires basic knowledge of:
If you need help please use the talk page, User talk:Ɱ, or Module talk:Mapframe.
There are three methods you can use to find the data you want for your map:
The first thing to try is the easiest. There's a possibility your data is already linked and you're ready to map. Create a test map in your sandbox. You'll need to use {{ Maplink}} together with the Wikidata ID of the shape. As an example: {{maplink|frame=yes|type=shape|id=Q160236}} If it displays, great. You can use the map and add parameters to make it display to your liking. If the map data does not populate, the below methods are straight-forward and reliable:
If you already know how the relation would be tagged, the OSM Relation Analyzer can be more convenient. Note: this can only be used for shapes that are relations, not ways.
If you found the data on OSM, continue on to Part 3. If you did not find it, continue to Part 2 first to create the shape on OpenStreetMap.
This optional step is only for shapes that are not already mapped on OpenStreetMap. Note that the entity you want to map must be an existing place in order to be accepted on OpenStreetMap, as OSM is not intended to map out historical, fictional, or unrecognized entities.
There are two ways to embed the shape into an article, both using the {{ maplink}} template:
If the shape has a Wikidata item and the OpenStreetMap shape relation already has a wikidata
tag set to that item's QID, you can embed a map of the shape directly onto a Wikipedia article as
external data. Use the {{
maplink}} template, setting the |id=
parameter to the QID, such as Q88466277. Normally, changes to the route in OpenStreetMap are reflected in the article within about two days.
Example: {{maplink|frame=yes|type=shape|id=Q160409|text=[[Central Park]]}}
Using map data on Wikimedia Commons:
"license": "ODbL-1.0", // ODC Open Database License v1.0
and save the page.|from=COTA10.map
, or manually, like
seen here.Example: {{maplink|frame=yes|frame-width=180|frame-height=270|from=COTA8.map|type=line|stroke-width=2|stroke-color=#0e2c6c|text=[[Central Ohio Transit Authority|COTA]] route {{COTA link|8}}}}
If the shape changes in OpenStreetMap, repeat steps 1 through 3 to update the existing Wikimedia Commons map data page.