Extension:Kartographer

Kartographer is an experimental extension to add maps to wikis. It is very similar to Maps extension, but its functionality will be specifically targetting Wikimedia communities such as Wikivoyage and Wikipedia.

Demo
See vem.wmflabs.org

Goals

 * A simple method to insert a map into an article without requiring common.js code changes
 * Ability to add extra information (marks, area, popups, text, links) to the map
 * Ability to generate static images on the server with all the extra layers (faster loading, allows to print)
 * Ability to incrementally add features to the map. For example, each usage of the restaurant template in WikiVoyage adds a single point of interest (POI), and the map shows all of them.
 * Multiple items added independently need to be indexable. E.g. the first restaurant template would show [1] on the page, and map would show POI as a clickable [1] element. There could be multiple index counters at the same time, each for its own type of POIs.
 * Ability to gather map usage statistics (KPI) to better gauge how and what should be improved.
 * Path for experimentation - if the user is aware of the privacy implications, the map should be able to show external data from non-production source, e.g. wmflabs. TBD: Static, server-side rendered images will not include the extra data added via this method until the extra data source is hosted in the secure production environment and can be shown without the user action.

Usage Ideas
This sample inserts a map of a given zoom and location (center) as a static image, and shows a museum icon. Once clicked, it will expand full screen and become interactive - users will be able to drag, zoom and interact with the icon. The content of the  tag has to be either empty or a valid GeoJSON with styling, as produced by GeoJSON editor, which uses simplestyle with Maki icons (CC0).

Map Modes
TBD: The default mode could be either  or.
 * Show the map as a static image, but when clicked, it will become interactive. This allows much faster initial map loading, and saves on bandwidth and device power until user actually wants to browse the map.
 * Same as, but instead of expanding on click to full screen, the existing static map will become interactive without changing its size.
 * Show a static, non-clickable image map.
 * Show provided wiki markup as a link. Clicking the link shows a map as a popup window of a width x height size or as full screen if width/height are not given.
 * Do not output any wiki markup, but store the data to be used by another map tag.

Combining Data (for Wikivoyage & Lists)
Wikivoyage tends to have a large number of POIs, such as museums and restaurants, listed on a page. Each POI is usually added with a template, but all of them should appear on the same map. Also, each POI should be referable by showing an icon with a number, both in the text of the article, and on the map.

To help with that,   has a data mode. All features of all  tags in data mode will be combined together for later usage. So a template could be converted into a clickable link with an icon that brings up a map. The "counter" property will be shown either as a number (1..99), or as a letter (A..Z).

Somewhere else on the page, the data can also be shown all at once with .Data attribute could also use a specific group name, or a comma separated list of groups:. The grouping concept allows us to have more than one list on the same page and not show them in the same map. We could even introduce cross-page by specifying  value to point to the data on another page.