This tutorial tells you how to add maps to the PBS wiki. The process is fairly straightforward, but does involve cutting and pasting a complicated web page address. Don’t be intimidated, we’ll walk you through the process.

Here’s the map we’re going to insert:

The Click for map Mendocino Botanic Gardens are in California.

As you can see, the map itself is not displayed inline with the text; instead, the reader can click on a text link, and the map pops up. This is the recommended style for displaying maps in the wiki, because it lets the reader decide whether or not to look at a map.

How to insert a map:

1. To start, visit Google Maps and find the place you want the map to display. Adjust the zoom, positioning, and other elements of the map until it shows just what you want to display. Make sure the location you want to highlight is in the center of the map.

2. Just beyond the left edge of the map, near the top, you'll see a small icon that looks like two links of chain. If you hover your mouse over it, you'll see the tool tip "Link." Click this icon and copy the text in the box labeled 'Paste link in email or IM'. It's the upper of the two text boxes. The text will look something like this:,+Eastern+Cape,+South+Africa&aq=0& sll=37.093526,-95.833397&sspn=0.007582,0.02105&ie=UTF8&hq=& hnear=Satansnek&ll=-31.583361,27.950077&spn=0.032391,0.0842&t=h&z=14

3. Open the wiki page you want the map to go into, and click the edit button to edit the page. In the code for the page, click in the spot where you want the map to appear, and paste the text you just copied from Google Maps.

4. Enclose the text you just pasted in double square brackets: [[ before the text, and ]] after the text.

5. Hit the Preview button. The text that you pasted will automatically be converted into Google's GMap markup format. It looks like this: [[GMap:ll=-31.583361,27.950077&z=14]]

6. Finally, to put your map in a popup box, bracket the above GMap lines with:

(your map code goes here)

This will produce a small icon, followed by the text 'Click for map' as a link. Clicking on the link will pop up a box with the map in it. The box title will be 'Wiki map'.

How to customize the map

Here are some advanced options.

Customizing the popup box

It is possible to add parameters after GMapBoxStart: to change the map's appearance. The parameters are:

Parameters can be combined: GMapBoxStart: caption='Click for my map' text='this is my map' title='my map'

Notice single quotes are used and there should be nothing on the line after GMapBoxStart and its parameters.

Customizing the map

Look at the map code again:


This displays the map with a marker pin at the centre. The numbers that you see after the = sign are the latitude and longitude. The Z value is the zoom level. Other options you can set include:

As with a normal link, wiki text can be inserted after the options, by putting a | symbol before the text. For example:

[[GMap:ll=-31.583361,27.950077&z=14 | Satansnek, Eastern cape]]

Clicking on the pin will open a popup window containing the text.

You can also control the display of maps via the link title:

[[GMap:ll=...&z=16"nocontrols;nomarker;w:300;h:400" | My map ]]

If you preview a wiki page with a map in it, there are two tools which make finding the values for the GMap: easier. Firstly there is a button 'centre' to the top right where the usual buttons for setting the type of map appear. Clicking on this opens a window showing you the coordinates of the centre of the map. Secondly dragging and releasing the marker pin will open a popup showing the pin's coordinates. These tools make it relatively easy to create the map in the wiki without visiting Google maps.

Creating multi maps

A multi map contains pins for more than one location, or an outline of an area to be highlighted on a map. These use special non-obvious markup:

: %gmap% [[GMap:ll=...]]  : Center, view and zoom of the map
: GMap:ll=48.84,2.31      : First  pin description
: GMap:ll=...             : Second pin description
: GMap:ll=...             : Third  pin description 

The GMap: in the first line is the same as for the simple map. The subsequent lines are for marker pins.

KML files specify areas to be highlighted and other annotation. To add a KML file to a map, first upload the KML file to the wiki (KML files live in the Mappa folder and have Mappa_ as a prefix), and then include a line like:

: GMapKML: :


You can investigate these by editing this page.

Example 1, an inline link

The Click for map Mendocino Botanic Gardens are in California.

Example 2, a standalone link

Wiki map Click for map

Return to the PBS wiki Using This Wiki page
Return to the PBS wiki Photographs And Information page
Page last modified on February 13, 2013, at 09:20 AM