Maps/Linking wikipedia to OSM

From Bjoern Hassler's website
Jump to: navigation, search

1 Linking between wikipedia and OSM[edit]

There are few services that help to link Wikipedia to OSM:

Also see

2 Approach 1: javascript plugins to wikipedia and OSM sites[edit]

2.1 Approach 1: Tampermonkey: From wikipedia to OSM (and back)[edit]

Here's a tampermonkey script that inserts a link into a wikipedia page (near the "coordinates" section at the top right). The link is set in the script, and could be

  • a link OSM/iD ("edit this area")
  • a link to JOSM remote control
  • a link to
  • or to a local server (similar to JOSM remote control, see below). By running such a local server, you can then intercept the data extracted from the wikipedia page, process it and then link to OSM/JOSM

Note that because tampermonkey is essentially scraping, it's not guaranteed to work on all wikipedias, and it's not guaranteed to work in the future.

2.1.1 Code[edit]

Moved to Previous versions here.

2.1.2 Approach 1b: Instead of tampermonkey use MW gadget[edit]

Version rolled into a mediawiki gadget Image gallery[edit]

Maps/Linking wikipedia to OSM/image gallery

3 Approach 2: A separate map-based application that links both: extending overpass[edit]

I basically wanted to fix some stuff in both OSM and Wikipedia, creating links between the two, and fixing issues. So I needed a tool that could display both, and I couldn't find out. The most promising solution for location-based matching between wikipedia and OSM is probably leafletjs, which has plugins for both overpass and wikipedia ( So I looked at leaflet, and the various plugins, and started to build the first version like this.

However, rather than starting with basic leaflet, why not build on overpass-turbo (build on leaflet). At least overpass-turbo already handles the overpass api queries! So I added the wikipedia plugin to overpass (rather than starting from scratch with leaflet). See Overpass Turbo with Mediawiki API for details.

Also see Archaeology/Linking OSM and Wikipedia for some overpass code.

4 Also of interest[edit]