Home -> FPP plugins page -> gpmap2.swf
This plugin is completely free for use in any context or connection.
FPP external plugin for displaying a Google map with interactive markers that have mouse-over, mouse-out and mouse-click functions.

The map can be hidden, collapsed/expanded, moved, resized and dimmed with FPP commands.

Map markers can be arranged into groups that can be shown or hidden with a single command.

The following parameters are supported:

In FPP xml file:
xmlfilexmlFile=gpmap2.xmlplugin control XML file
setupModesetupMode=1mode for creating and positioning map markers

The following parameters can be updated dynamically from FPP:
xmlfilexmlFile=gpmap2a.xmlload new XML file
widthwidth=30%map width in pixels or percentage of pano width
heightheight=250map height in pixels or percentage of pano height
sizesize=400:40%map size (width:height)
salignsalign=BRrelative map position (L,C,R and T,M,B default=CM)
marginmargin=10:15horisontal and vertical margin to pano edge
collapseTocollapseTo=BRrelative position (L,C,R and T,M,B default=salign value)
alphaalpha=0.70for setting plugin transparency
visiblevisible=T0 or 1, anything else will toggle visibility
collapsecollapse=10 or 1, anything else will toggle collapse/expand map
expandexpand=00 or 1, anything else will toggle collapse/expand map
zoomLevelzoomLevel=12zoom level (0-19 (20 for SATELLITE) )
panTopanTo=59.3155:18.0700pan to new map center
panTo=The Royal Castlepan to marker
clickclick=The Yatch Clubsimulate clicking a marker
crosshaircrosshair=1crosshair on
crosshair=0crosshair off
crosshair=59.3095:18.0738crosshair position (see NOTES below)
radarradar=1radar on
radar=0radar off
radar=59.3095:18.0738radar position (see NOTES below)
addMarkeraddMarker=Small bridge: 59.308335:18.049968:75: global.goSmallBridgeadd map marker (see below)
removeMarkerremoveMarker=Small bridgeremove map marker
clearMarkersclearMarkers=1clear all markers from map
showGroupshowGroup=foodshow marker group(s)
hideGrouphideGroup=pano:viewshide marker group(s)

In plugin external xml file, the following tags and attributes are supported:

In <map> tag:
keykey="ABQIAAAAu86lsW-dj3..."Google Maps API key (get this from http:code.google.com)
sizesize="400:40%"size of map
salignsalign="TR"floorplan position T(op),M(iddle),B(ottom) and
L(eft),C(enter),R(ight) default=TC
marginmargin="10"margin to pano edges, default=10
margin="15:10"horizontal margin:vertical margin
visiblevisible="1"0 or 1, any other value toggles visibility
alphaalpha="0.6"sets plugin alpha when not mouse-over, default=1.0
shadowshadow="1"0 or 1 (default 0), will apply a drop shadow to the map
closeButtoncloseButton="0"0 or 1 (default 1), use bult-in open/close buttons
langlang=frlanguage code (default: language code is taken from browser settings)
mapTypemapType="NORMAL"set startup map type (see maptypes below)
mapCentermapCenter="59.3425:18.0900"set startup map center coordinates (WGS84 Lat and Long separated by ":")
zoomLevelzoomLevel="11"set startup map zoom level
In <controls> tag:
zoomzoom="mini"zoom control: 0, 1 or mini (default 0)
positionposition="1"positioning and panning control: 0 or 1 (default 0)
mapTypemapType="vertical"maptype selector: 0, 1 or vertical (default 0)
overViewoverView="left"overview map: 0, 1 or left (default 0)
In <maptypes> tag:
includeinclude="NORMAL,SATELLITE,HYBRID"comma separated list of maptypes to be included in the maptype selector
choose between NORMAL, SATELLITE, HYBRID and PHYSICAL (no default)
In <infowindowformat> tag:
widthwidth="120"width of infowindow
borderColorborderColor="#CFCFCF"infowindow border color
bgColorbgColor="#223344"infowindow background color
fontfont="Arial"infowindow text font
textColortextColor="#FFFFF0"infowindow text color
textSizetextSize="11"infowindow text size
boldbold="1"infowindow text bold
italicitalic="0"infowindow text italic
underlineunderline="0"infowindow text underlined
In <icons> tag:
removeoldremoveold="0"0 or 1 (default 1) delete old icons when loading new XML file
In <icon> child tag:
namename="red"icon name
urlurl="img/pin2s_red.png"icon image file (if not specified - a Google standard icon is used)
alignalign="BL"icon alignment: L=left, C=center, R=right, T=top, M=middle, B=bottom
default: CM (Center-Middle)
shadowshadow="1"tells the Google map to apply a shadow to the icon
defaultdefault="1"will make this the default marker icon
defaultVisiteddefaultVisited="1"will make this the default visited marker icon
markerColormarkerColor="#C0C0FF"icon color - for Google standard icons
markerRadiusmarkerRadius="6"icon radius - for Google standard icons
In <markers> tag:
removeoldremoveold="0"0 or 1 (default 1) delete old markers when loading new XML file
In <markers><marker> tag:
namename="City Hall tower"marker name - also used as tooltip
typetype="noradar"marker type, "pano", "noradar" or "simple", see NOTES below
groupgroup="pano:view"colon (:) separated list of groups to which the marker belongs
hiddenhidden="1"set to 1 if you want this marker to be initially hidden
coordscoords="59.327331:18.055925"marker coordinates (WGS84 Lat and Long separated by ":")
iconicon="red"name of icon to be used for marker
if not specified - default will be used
iconVisitediconVisited="green"name of icon to be used for visited marker
if not specified - default will be used
offsetoffset="48"pano compass offset - "48" means pano 0 = 48 degrees compass direction
commanddeprecated - use onClick instead
onClickonClick="global.gotower()"FPP command(s) executed when marker is clicked
onOveronOver="global.showP1()"FPP command(s) executed when the mouse is moved over the marker
onOutonOut="global.hideP1()"FPP command(s) executed when the mouse is leaving the marker
In <markers><marker><infowindow> tag:
Contains HTML for the marker infowindow (see below)
<infowindow><![CDATA[<body>The Yacht Club<br/><img src="../img/yachtclub.jpg" hspace="0" vspace="3" width="100" height="67" /></body>]]></infowindow>
In <radar> tag:
urlurl="img/mapradar11.png"radar image file
visiblevisible="1"use radar at current marker: 0 or 1, default 0
lengthlength="40"radar cone length, default=30
lineWidthlineWidth="1"radar cone line width, default=0 (hairline)
lineColorlineColor="#FFFFFF"radar cone line color, default=#000000
fillColorfillColor="#FFFFFF"radar cone fill color, default=same as line color
fillAlphafillAlpha="0.25"radar cone fill alpha, default=0.30
In <crosshair> tag:
urlurl="img/crosshair12.png"crosshair image file
visiblevisible="1"use crosshair at current marker: 0 or 1, default 0
In <onstart><command> tag:
  param_name=valueplugin commands (NOT FPP commands) that you want to
execute after the map has been initialized. There is
no limit to the number of commands.
<command>panTo=City Hall tower</command>


All tag names must be written in lower case, but attribute names are case independent (panTo is equal to panto).

If omitted, language code is taken from browser settings. NOTE: Google generally advise against specifying this parameter (unless, of course, you want to force using a certain language). For a listing of language codes, see your browser settings.

The position of the map inside the pano window can now be given only relative. The salign parameter works almost like described in the FPP documentation. The difference being that the position is calculated so that all of the map is always visible. The margin parameter can be used to move the map in any desired direction from the calcu- lated position.

Specify one <icon> tag for every DIFFERENT marker image that you want to use. Then you can refer to the proper icon name in the <marker> tag. So if you have ten markers on the map that all look the same, you only have to use one <icon> tag. If you don't specify the icon="..." attribute in the <marker> tag, then you will get the default marker icon. And if you don't specify the iconVisited="..." attribute then you will get the default visited marker icon when the marker is panTo'ed.

Marker type can be set to "pano", "noradar" or "simple". Default is "pano", which when clicked will be centered in the map, and the radar - if used - will be placed at the marker. If type is set to "noradar", the marker will be centered in the map, but the radar will remain at its present position. Finally, when a "simple" marker is clicked, there will be no change in the map - only the onClick command will be executed. "noradar" and "simple" are thought to be used for map POI's other than panos - like pictures, videos or other links.

Certain characters cannot be used directly in an XML file without having to be encoded. Ususally, web encodings (like ' for ' single quote) are used as the data is usually targeted for an HTML page. But here you have to use escape-coding (also called url-encoding) at least for:

" as %22
& as %26 (seems to work as is, but I recommend encoding)

When loading a new XML file with the xmlFile command, only the following tags will be parsed:

All the other tags will be ignored.

The panTo command is useful when you have changed pano in some other way than by clicking on a map marker. It will center the map on a new position, and the radar (if used) will follow the panTo command - but only if you use panTo=marker_name. This is because the radar needs to know the offset value, which is a marker attribute. If you use panTo=lat:long only the map center will be changed. And if the new destination is too far away from the present point, the map will not pan, but make an immediate jump to the new center point. This is of course depending on the zoom level. The plugin keeps track of which marker is active, so if the same marker is clicked twice in a row, it will only execute the marker command(s) the first time. The panTo command makes the map center on a new position, and the radar follows the panTo command - but only if you use panTo=marker_name. This is because the radar needs to know the offset value, which is a marker attribute. If you use panTo=lat:long only the map center will be changed. And if the new destination is too far away from the present point, the map will not pan, but make an immediate jump to the new center point. This is of course depending on the zoom level. The plugin keeps track of which marker is active, so if the same marker is clicked twice in a row, it will only execute the marker command(s) the first time.

The showGroup and hideGroup commands can used to show or hide groups of markers. If you want to change more than one group, you can specify a colon separated list, for example: "showGroup=view:eat". To show or hide all markers use "all".

The click command is added to simulate a click on a marker from FPP, and can be particularly useful when loading a new XML file. The difference from the "panTo" command is that the "click" command will execute the command associated with the marker.

Any number of onStart commands can be given. The syntax is the same as the usual parameter settings. Allowed parameters are those that can be updated dynamically (see the list above). The reason for having the onStart commands is that certain parameters (like panTo) cannot execute before the map has been initialized.

The crosshair can be turned on/off dynamically and moved by setting new coordinates i.e. "crosshair=59.3727:18.0170". The crosshair also always follows the panTo command.

What is said about the crosshair above, is also valid for radar. Don't forget to set the offset attribute in the <marker> tag to synchronize radar direction with the pano pan angle.

Use the collapseTo attribute when you want the map to collapse into a different place than it is originally aligned to.

When using the addMarker command you have to include five colon-separated parameters:
All five parameters must be included.
There is no automatic panning to the new marker.

Infowindow : For markers which have the <infowindow> childtag specified, an information window (often called callout) will appear above the marker at mouse-over. The content of this callout is described by the Adobe HTML subset, and must be written inside a <body> ... </body> tag if you want the attributes of the <infowindowformat> tag to be applied. The data in the <infowindow> tag must also be surrounded by <![CDATA[ ... ]]>, otherwise you will get an XML parsing error. The tooltip window with the marker name will not be shown for markers with a callout.

Setup mode:
Including the parameter "setupMode=1" forces the plugin to enter a setup mode for handling map markers. The following functions are supported:

Create marker:click map where you want the marker placed
Move marker:drag marker to new position
Select marker:click marker
Delete marker:click marker while pressing the Alt key
Setting marker tooltip:change tooltip text in textbox
Setting marker offset:change in spinner or offset text in textbox
You have to enter the other marker attributes afterwards - this is only a help for setting the proper coordinates. NOTE! The plugin does not modify the XML file, you have to copy the <marker> tags that are generated in the textbox yourself to get them into the XML file. Markers you already have in your XML file can of course also be moved (and deleted).

Don't forget to remove the "setupMode=1" line afterwards!

Example plugin xml file:

<?xml version = '1.0'?>

   <controls zoom="mini" position="1" mapType="vertical" overView="left" />
   <maptypes include="NORMAL,SATELLITE,HYBRID" />
   <infowindowformat width="120" borderColor="#CFCFCF" bgColor="#223344" font="Arial" textColor="#FFFFF0" textSize="11" bold="1" italic="0" underline="0" />

   <icons removeOld="1">
      <icon name="red" url="img/dotred3.png" align="CM" shadow="1" />
      <icon name="blue" url="img/dotblue3.png" align="CM" shadow="1" default="1" />
      <icon name="yellow" url="img/dotyellow3.png" align="CM" shadow="1" />
      <icon name="green" url="img/dotgreen3.png" align="CM" shadow="1" defaultVisited="1" />
      <icon name="google" markerColor="#C0C0FF" markerRadius="6" />

   <markers removeOld="1">
      <marker name="The Yacht Club" coords="59.3037:18.0738" offset="-350" command="global.goyachts()" onOver="prev4.visible=1" onOut="prev4.visible=0">
         <infowindow><![CDATA[<body>The Yacht Club<br/><img src="../img/yachtclub.jpg" hspace="0" vspace="3" width="100" height="67" /></body>]]></infowindow>
      <marker name="The train bridge" coords="59.310240:18.042809" offset="-15" onClick="global.gobridge()" onOver="prev2.visible=1" onOut="prev2.visible=0">
         <infowindow><![CDATA[<body>The train bridge<br/><img src="../img/pano3.jpg" hspace="0" vspace="3" width="100" height="67" /></body>]]></infowindow>
      <marker name="I work here" coords="59.3727:18.0170" offset="260" command="global.gowork()" onOver="prev3.visible=1" onOut="prev3.visible=0">
         <infowindow><![CDATA[<body>I work here<br/><img src="../img/work.jpg" hspace="0" vspace="3" width="100" height="67" /></body>]]></infowindow>
      <marker name="City Hall tower" coords="59.327281:18.055522" offset="48" command="global.gotower()" onOver="prev5.visible=1" onOut="prev5.visible=0">
         <infowindow><![CDATA[<body>City Hall tower<br/><img src="../img/cityhall.jpg" hspace="0" vspace="3" width="100" height="67" /></body>]]></infowindow>
      <marker name="I live here" coords="59.3095:18.0738" offset="280" command="global.gohome()" onOver="prev1.visible=1" onOut="prev1.visible=0">
         <infowindow><![CDATA[<body>I live here<br/><img src="../img/home.jpg" hspace="0" vspace="3" width="100" height="67" /></body>]]></infowindow>

   <radar url="img/mapradar12.png" visible="1" />
   <crosshair url="img/crosshair12.png" visible="0" />

      <command>panTo=City Hall tower</command>

Version history:

Removes error message #1069 caused by Google changing the method of sending back copyright message to map.

Attribute margin now also works in "C" and "M" alignment.

Radar can now be drawn with cone width corresponding to zoom level.

Markers can now belong to a group, which can be dynamically shown or hidden.
No map commands are accepted before map is initialized.

Fixed bug when printing IOError message for image not found.

Added attribute type="..." for markers that represent map POI's other than panos.

Fixed bug when loading new plugin XML file.

Fixed bug when not showing a radar and clicking on a marker. Marker icon was never changed to visitedIcon.

Added "addMarker" and "removeMarker" commands for adding and removing a map marker "on the fly".
Changed the effect of the "visible" command. It will now show/hide the map or the map button (and NOT expand/collape the map).

Added "onOver" and "onOut" attributes in <marker> tag.
Added marker InfoWindow (callout) support.
Added support for setting up marker radar offset in setup mode.
Fixed bug in setting radar offset when marker clicked.
Improved behaviour when "return to position" map button pressed.
User newer of Google Flash SDK.
Position of the map open button moved to be completely visible.

Setting size of the maptype control buttons to fix the problem with offset button label texts.

Added "collapseTo" attribute for choosing position into which the map collapses.

Added support for loading new XML file.
Added new parameter "click" for simulating clicking a marker.
Added "removeold" attribute in <icons> and <markers> tags

Fixed bug when map is initialized before xml file parsing is completed.

Plugin is now controlled by a separate XML file.
Automatic changing of marker icon when visited is now supported.
Large parts of plugin recoded to make the plugin code better structured.

1.56 beta:
Fixed a copy & paste bug where "closeButton" mysteriously became "openButton".

1.55 beta:
Parameter "setupMode" added for entering setup mode where map markers can be created and positioned.

1.54 beta:
Parameter "closeButton=0" added for removal of map close button.

1.53 beta:
Map radar and crosshair always below markers.

1.52 beta:
Parameter "clearMarkers" added for removing all map markers.

1.40 beta:
Support for map "radar" (following panTo).
Parameter "removeType" added for removing map type button from map type control.
Alignment subparameter added to the "icon" parameter.

Support for map crosshair (following panTo).

Fixed possible timing problem again(?) when initializing map and getting pano size.

Fixed possible timing problem when initializing map and getting pano size.

Parameters "width" and "height" can be set in percentage of pano size, ie. "height=40%"

Parameter "lang" added.

If, for some reason, the plugin can't load your custom map markers, you will get the Google default marker instead.