Table of Contents

Getting Started with Maps

Our custom map plugin, “Ptolemy”, allows us to display interactive maps on our wiki pages. The content for these maps is generated from the wiki itself with the help of the excellent Struct plugin.

There are two components to Ptolemy's maps: the map itself and the map content.

Quick Note on Terms

Dokuwiki is made up of pages. When you access a page that has no content, you are given the chance to make that page. When it has no content, the page is deleted. When you make a page “under” another page, the “parent” page now also acts as a namespace.

For example, if we had “cities:restaurants”1), we would consider “cities” to be the namespace. We could go further by having “cities:restaurants:burrito_shop”, where both cities and restaurants act as namespaces.

Its important to know about namespaces, because the wiki's admins can assign different data schemas to them using Struct. In this way, one namespace can be for maps, another for locations, and so on.

Defining a Map

If a map doesn't already exist, the first thing we have to do is define the map's attributes. We do this by creating a page on the wiki that has the right Struct fields - in our case, we use maps:. When you make a page in that namespace, you'll see fields at the bottom of the page that let you define:

Ptolemy can support multiple maps on the wiki, in addition to the basic one that covers the broader setting.

Defining Locations

When you add or edit a page in a namespace that has the right Struct fields, it can act as a location on a map. Locations have a few important fields and some optional ones:

Map Syntax

Once you have a map, you can display it! You don't need any locations to make a map visible - they'll appear as you add them.

~~MAP|(the page your map's struct is on)|(initial coordinates)|(initial zoom)~~

An example would be:

~~MAP|maps:my_map|100,100|0~~

That would display the map defined on the “maps:my_map” page. The view would be centered at 100px by 100px, with an initial zoom of 0.

Problem Solving

Map not Updating

Dokuwiki aggressively caches its pages. This is usually a great thing, but when you add or edit a location elsewhere in the wiki, it doesn't trigger your map to update. You may need to edit a page where the map seems out-of-date to force the wiki to update your map.

Markers not Displaying

Your markers may not be displaying for a few reasons.

OOC

1)
this is the bit of the url after 'doku.php?id=', the same as you'd use when making an internal wiki link