User:Dan Shick (WMDE)/Drafts/Help:Extension:Kartographer/Getting started

Overview
Kartographer is an extension to MediaWiki that allows you to create embedded maps and links to full-screen maps on wiki pages, as easily as writing a single line of wikitext or clicking on a menu item in the VisualEditor.

This guide focuses on maps in wikitext; for instructions on maps in the VisualEditor see Help:VisualEditor/Maps.

Some wikis wrap Kartographer's functionality in templates (for example, Maplink and Mapbox). Check the Kartographer help page on your local wiki for commonly used templates.

Quick start: example


This code produces a simple 250x250 map in a frame, like the one you see in this section, with the caption "Downtown San Francisco".

 To add a map that appears in a small window (or frame) on a wiki page, use the tag. Clicking on the small map opens a full-screen interactive map.


 * On Wikipedia and other Wikimedia wikis, the embedded map is static. Clicking the static image opens a full-screen interactive map.
 * On Wikivoyage and test2wiki, this embedded map is interactive. Clicking, holding and moving the cursor pans the map; double-clicking or clicking the full-screen icon in the top corner opens a full-screen interactive map.

In its simplest form,  uses the following information to display a map of a specific area:
 * a location (latitude and longitude)
 * the size of the frame (width and height)

Example:

For a complete explanation of the syntax as well as a list of available attributes, see the main help page.

Instead of an interactive map on the wiki page itself, you can also create text (with an optional marker) that links to a fullscreen interactive map, using.

A minimal  tag is even shorter -- all you need is a location.

Example:

External data
In addition to displaying and marking up maps, Kartographer can also draw on the vast resources of geodata that Wikidata and OpenStreetMap have to offer. That data can help you highlight areas of your map using geoshapes, geographical data that describes the physical properties of an area.

Geoshapes can be rendered in three different ways, using the  attribute:


 * : Draws a simple line.
 * : Draws a polygon with a shaded interior.
 * : Draws a polygon and shades everything outside the polygon.

In addition to placing a single geoshape on your map, you can also use SPARQL queries to bring in several related geoshapes.

For more information, see the External data section of the main help page.

For help writing SPARQL, take a look at Wikidata's wikidata:Wikidata:Query_Builder Query Builder.