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 toGoogle Maps it is our own software and free data.
Go toHimalayas. 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.
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 fromVMAP0 andold data from theOpenStreetMap project and rendered using theMapnik toolkit. Plotted VMAP0 layers are shown on the right.
As a big fan of theNPS 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 theWIWOSM project.
The reduced bandwidth map (coastline) is based onGSHHS Coastline Data (public domain)
Thephysical shaded relief is created by Tom Patterson of the US National Park Service mainly based onLandsat and SRTM30 data. It is in the public domain, downloadablehere. To cut the two hemisphere images up into tiles a custom ImageMagick script was used.
The WikiMiniAtlas status is available athttp://wma.wmcloud.org/status.php . For every language an error report with unparsable coordinates is generated.
Set default zoom level of the map toz (0=show whole world, 15=maximum zoom). Settingz to -1 activates automatic choice of a sensible zoom level (default).
enabled: true|false
Set this tofalse to deactivate the WikiMiniAtlas.
onlyTitle: true|false
Set this totrue 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 aturl.
timeout:time
Set coordinate processing timeout totime in milliseconds (default 5000 = 5 seconds).
Thetext 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 haveKML files attached using theAttached 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 (seethis article for a good example)
Some articles have corresponding tags in the OpenStreetMap database, the OSM geometries are fetched with the help of theWIWOSM project and displayed using a canvas overlay on the WikiMiniAtlas.
Textual labels arecached 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)
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 fromxx.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 includeMediaWiki:Wikiminiatlas.js in your localMediaWiki: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.
WikiMiniAtlas is (c) 2006-2013 by Daniel Schwen and licensed under theGPL License version 3 or above. The unminified source code is available on GitHub at
json2.js provides JSON serialization and parsing for browsers that do not support it natively. Library by Douglas Crockford, licensed as Public Domain.
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:
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.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOTLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FORA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ORCONTRIBUTORS 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, ORPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDINGNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.