Help:Extension:Kartographer/Developer guide

Links to API documentation

 * JS documentation
 * PHP documentation

How it works
The Wikivoyage projects have use cases that do not apply to all projects and require to customize Kartographer. This extension of the Kartographer code is contained within the ResourceLoader module. Wikivoyage projects, such as the English one, may load the module and configure it by creating a MediaWiki:Kartographer.js script file (see English MediaWiki:Kartographer.js). A custom CSS, MediaWiki:Kartographer.css, also gets loaded to allow styling customizations. These two files, grouped in the ResourceLoader module, are loaded on each page that contain a   or a.

What it does
Typically, MediaWiki:Kartographer.js will define an additional list of tile layers and overlays for Kartographer. The code listens to a Kartographer extension hook  and adds a few features onto the map:


 * Adds a control (top right) to select a different tile layer and toggle overlays
 * Adds a control (top left) to show the Nearby Articles from Wikivoyage.

You can see a live example at California#See.

List of Kartographer modules
These are the list of ResourceLoader modules implemented by the extension. See the online API documentation for more details.

External libraries
''Note: Do not use. You should require our client-side modules rather than the original libraries. These are made available as single resources for performance and caching reasons.''