WikiMiniAtlas

From Meta, a Wikimedia project coordination wiki

English (main) | Català | Deutsch | Eesti | Esperanto | Euskara | Finnish | Français | Frysk | עברית | Italiano | 日本語 | 한국어 | Kölsch | Kurdî | Lietuvių | Nederlands | Polski | Português | Svenska | Türkçe | 廣東話 | العربية | Српски | فارسی | پښتو | edit

Feature
VMAP0 layer
Legend
Seaice
seaicea
shelf ice
Grassland
grassa
grassland
Trees
treesa
Trees
Waterbodies
inwatera
lakes and wide streams
Ice
landicea
landice
Cities
builtupa
all settlements
Rivers
watrcrsl
river

intermittent river

Borders
polbndl
country border

regional border

Canals
aquecanl
canal
Railroad
railrdl
railtrack
Roads
roadl
with median

without median

Mapsymbols
Article
Mountain
Event
Village < 10000 inhabitants
Town < 100.000 inhabitants
City < 500.000 inhabitants
City < 1.000.000 inhabitants
City > 1.000.000 inhabitants

WikiMiniAtlas is a JavaScript plugin to display a draggable, zoomable, and clickable world map (as well as Moon, Mars, Venus, Mercury, Io and Titan imagery) in geocoded Wikipedia articles. The map contains links to all other geocoded articles in Wikipedia and can be magnified down to street level. 3D building models are displayed in modern browsers. While it looks similar to Google Maps it is our own software and free data.

Go to Himalayas. Check out the -icon in the top right corner. Click it and drag the map around. Use the +/- buttons to zoom in and out, use the downward arrow to open the config page.

Map data courtesy of OpenStreetMap and VMAP0, rendered using the Mapnik toolkit, additional data courtesy of the US National Park Service, Landsat7 data courtesy of NASA.

Data Sources[edit]

  • Textual labels on the map are extracted from the external links (pointing to the geohack) tables on the WMF cloud database replica servers. Labels are sorted according to importance into a quadtree data structure for fast retrieval.
  • The default base map is generated from VMAP0 and old data from the OpenStreetMap project and rendered using the Mapnik toolkit. Plotted VMAP0 layers are shown on the right.
  • As a big fan of the NPS I also added all US National Parks and Monuments to the VMAP0 base map. (Thanks for the freely available Geodata!)
  • Some shape overlays are extracted from the OSM database and obtained through the WIWOSM project.
  • The reduced bandwidth map (coastline) is based on GSHHS Coastline Data (public domain)
  • The physical shaded relief is created by Tom Patterson of the US National Park Service mainly based on Landsat and SRTM30 data. It is in the public domain, downloadable here. To cut the two hemisphere images up into tiles a custom ImageMagick script was used.
  • The Landsat7, daily aqua, and daily terra satellite modes use data by the National Air and Space Administration
  • "The Blue Marble" and "Night on Earth" are based on imagery from https://visibleearth.nasa.gov/

Status reports[edit]

The WikiMiniAtlas status is available at http://wma.wmcloud.org/status.php . For every language an error report with unparsable coordinates is generated.

Configuration[edit]

To set custom configuration for you, add the following to your common.js file:

window.wma_settings = {
 height: 400,
 width: 700
};

to set the size of the MiniAtlas window.

Configuration reference[edit]

Parameter Description
height: h Set the height of the map popup to h pixels.
width: w Set the width of the map popup to w pixels.
zoom: z Set default zoom level of the map to z (0=show whole world, 15=maximum zoom). Setting z to -1 activates automatic choice of a sensible zoom level (default).
enabled: true|false Set this to false to deactivate the WikiMiniAtlas.
onlyTitle: true|false Set this to true to limit the WikiMiniAtlas to title coordinates.
flowTextTooltips: true|false Adds tooltip menus to coordinates in inline text rather than icons.
buttonImage: url Replace the blue globe with the image at url.
timeout: time Set coordinate processing timeout to time in milliseconds (default 5000 = 5 seconds).

Technology[edit]

  • The VMAP0 layer is based on data from the vector map 0 of the US armed forces, rendered using the Mapnik toolkit.
  • The coastline layer is based on GSHHS Coastline Data and rendered using custom software built on the AGG (Anti Grain Geometry) graphics library.
  • The landsat layer is fetched from JPLs mapserver and then rescaled and cut into tiles suitable for the WMA.
  • The experimental Moon layer is fetched and cached from http://onmoon.jpl.nasa.gov.
  • The text labels on the map are based on data extracted from a copy of the Wikipedia database on the Toolserver. The data is fetched by XMLHTTP-requests from a specially prepared quadtree database for fast retrieval. Labels are fetched in JSON format and laid out client-side.
  • All coordinates in an article are scraped by the WMA and transferred to the WMA iframe using postMessage. Those coordinates are displayed using blue dots. Hovering the dots with the mouse will highlight the corresponding coordinates in the article (again using postMessage to message across the different domains toolserver.org <-> *.wikipedia.org). Clicking the dots scrolls the articles to the respective coordinate.
  • Some articles have KML files attached using the Attached KML template. This data is fetched using an XMLHTTP-request, the XML-DOM is parsed and polygons and lines are extracted, coded into JSON format and passed to the WMA iframe using postMessage. The WMA then creates a canvas element overlayed over the map, where the data from the KML attachemnt is plotted (see this article for a good example)
  • Some articles have corresponding tags in the OpenStreetMap database, the OSM geometries are fetched with the help of the WIWOSM project and displayed using a canvas overlay on the WikiMiniAtlas.
  • Textual labels are cached in the sessionStorage of the browser, if supported. This makes labels appear instantly in areas of the map that have already been viewed (try zooming out and in again).
  • The 3D overview globe in the bottom right corner is rendered using WebGL, taking the texture from a canvas (to allow dynamically adding the WIWOSM/KML overlays)

Frequently Asked Questions[edit]

Why is the red dot not exactly at the position of the article marker?
The coordinates of the article markers are not necessarily the same as the coordinates coded in the actual article you are viewing. This may have different reasons:
  • The coordinates have been changed since the last extraction run
  • The coordinates in the database were extracted from an article version in a different language. (Articles linked by interwikilinks are assumed to have the same coordinates, however, the geocoding accuracy can vary considerably across projects.)
  • Numerical errors in the JavaScript interpreter restrict the matching accuracy (they shouldn't in a perfect world...).
I am from xx.wikipedia.org and would like to enable the WikiMiniAtlas on our project!
Great, this is easy and should work out of the box, just add code to include MediaWiki:Wikiminiatlas.js in your local MediaWiki:Common.js file. Please do not copy the whole JavaScript code to your project as you will not get automatic updates, and the interaction protocol between the client JavaScript code and the server may change any time.
Where can I see it in action?
The WikiMiniAtlas is enabled by default on the English, Catalan, Esperanto, French, Greek, Icelandic, Italian, Lithuanian, Norwegian (bokmål), Portuguese, Russian, Danish, Polish, Spanish, Old Church Slavonic, Hebrew, Swedish, and Vietnamese Wikipedias and Wikimedia Commons. It is a gadget on the German and Finnish Wikipedia.
Where I can contribute translations?
To help translating the WikiMiniAtlas user interface to new languages add new translation to Commons:WikiMiniAtlas/Translations.
Where is the source code?
On github:

Screenshots[edit]

License Stuff[edit]

WikiMiniAtlas is (c) 2006-2013 by Daniel Schwen and licensed under the GPL License version 3 or above. The unminified source code is available on GitHub at

https://github.com/dschwen/wikiminiatlas

The author is grateful to Wikimedia Deutschland and the Toolserver administrators for funding and running the Toolserver, where WikiMiniAtlas used to be hosted (it is now hosted at https://wma.wmcloud.org/ ).

WikiMiniAtlas uses several 3rd party libraries listed below.

jQuery[edit]

jQuery is licensed under the MIT License.

json2.js[edit]

json2.js provides JSON serialization and parsing for browsers that do not support it natively. Library by Douglas Crockford, licensed as Public Domain.

glMatrix[edit]

glMatrix is a matrix creation and manipulation library for WebGL. WikiMiniAtlas uses a stripped and minified version of glMatrix. Copyright (c) 2013 Brandon Jones, Colin MacKenzie IV

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

Poly2Tri[edit]

Poly2Tri is a polygon triangulation library. WikiMiniAtlas uses a slightly stripped and minified version of Poly2Tri.

Copyright (c) 2009-2010, Poly2Tri Contributors http://code.google.com/p/poly2tri/

All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Poly2Tri nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Disclaimer[edit]

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.