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 vem3.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 gather map usage statistics (KPI) to better gauge how and what should be improved.
 * TBD: 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. 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.

WikiVoyage goals
Wikivoyage tends to have a large number of POIs, such as museums and restaurants, listed on a page (see example and scroll down to the "See" section). 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:
 * Ability to incrementally add features to the map. For example, each usage of the restaurant template adds a single point of interest (POI), and the map shows all of them.
 * Added features 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.

&lt;mapframe> usage
This sample inserts a map of a given zoom and location (centered) and shows a museum icon. Depending on the client and network speed, the map could be shown as static or interactive. If static, the map can be clicked to show full screen and become interactive. If dynamic, the map should have a "maximize" icon to make it full screen. The content of the  tag has to be either empty or a valid GeoJSON with styling, as produced by GeoJSON editor. Map supports simplestyle specification with Maki icons (CC0).

==  creates a link that shows a full screen map when clicked. The link's text could be either set with the  attribute. Without the  attribute, the word "map" will be shown, unless in GeoJSON, the   is set to the magic   or   value. Each  will be replaced with an incremental counter , and   with   values. If GeoJSON has more than one counter, the value of the first one will be shown as the link's text. Optionally, editors may add a suffix to have multiple counters on the page at the same time. This way  will have different counter from. It would make sense to use a distinct color for each counting group. All data added via  will also be shown in all maps inserted with , unless   attribute is used.

Groups
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 set of data on the same page and not show them in the same map.