Help:Extension:Kartographer/OSM

How to use objects from OpenStreetMap
You can draw polygon and way objects (regions and lines), such as countries, roads, rivers, or parks from OpenStreetMap directly on maps. To do that, the OSM object must be tagged with the Wikidata ID. Wikipedia maps do not support the points (nodes) yet.

 { "type": "ExternalData", "service": "geoshape", "ids": "Q995174", "properties": { "title": "Bryant Park", "description": "", "stroke": "#125123", "stroke-width": 3, "fill": "#2aaf4d" } }

For example, to highlight Bryant Park in New York, you need to find its Wikidata ID number. The easiest is to go to the corresponding wiki article, Bryant Park, and click on "Wikidata item" in the toolbox on the left. In some rare cases, there may not be a corresponding Wikidata item, in which case you should create it and add the Wikipedia article to it.

Once added (see "how to" below if it's missing), you will be able to use the "geoline" service for lines, "geoshape" service for polygons, and "geomask" service to mask-out everything except the needed polygon.

How to add Wikidata ID to OSM

 * Go to osm.org
 * If you don't have an account, click "login" (upper right corner), and click the Wikipedia icon - this will allow OSM to use your Wikipedia account.
 * Using the search box, find the object you need in the left pane, and click on it.
 * Once the object is shown in a bright orange line, check if the "wikipedia" and/or "wikidata" tag is there. If both are there, you are done.
 * Zoom in onto any part of the orange line all the way to the ground.
 * Click "edit" button at the top. Be careful not to click anything in the map.
 * The left side of the screen should now show "Edit feature" box. Scroll down to "Add field:" box, which is right above the "All tags (..)".
 * If there was no wikipedia and no wikidata tags, click "add field" box and select Wikipedia. Select the language and copy/paste the article name. This will automatically add the Wikidata tag as well (you can check them in the "all tags" section).
 * If there was a wikipedia tag, but no wikidata, you can either delete and re-add the wikipedia box, and simply add the "wikidata" tag by hand in the "all tags" section.
 * Click Save, and enter a good change description.
 * The data should become available for Wikipedia in about 1 day (we are still working on making this quicker)