Javascript must be activated for this page!
NOTE: This page is from an older version, see the latest version
here .
The Google Maps Plugin adds an interactive Google Map to the viewer.
The map can be freely placed and sized anywhere on the screen.
It's possible to place spots on the map and link them to krpano actions like loadpano to load a new panoramas when clicking a spot.
The plugin has an integrated customizable radar which can apear on the activatted spot.
And it's possible to control the whole maps and spots dynamically, e.g. pan/zoom around on the map, add or remove spots...
Google Maps / Bing Maps Notes - the XML interfaces of the Bing Maps and the Google Maps plugins are almost the same. Just replace the plugin files.
Plugin documentation topics:
The krpano Google Maps Plugin is an additional Commercial Plugin .
To use it a license for the plugin must be bought.
The license is valid for the Flash and HTML5 plugin.
Without license a krpano watermark will be shown in the map.
The plugin can be bought here on this page or on the krpano Buy page.
krpano Maps Plugin License
29 € plus sales tax/VAT*
maptype
Select the type of the map:
satellite (default)
normal
hybrid
lat /
lng
Latitude and Longitude in degrees.
The geographic coordinates of the current map center position.
How / where to get?
zoom
Set zoom level of the map.
Can be from 1 to 25.
activespotenabled
Should the active spot be enabeld?
That means - should the active spot react to click or over events.
bgcolor /
bgalpha
The color and alpha of the map background.
onmapready
Will be called when the Google Maps Plugin is loaded and ready for usage.
onmaptypechanged
Will be called when the map type was changed.
onmapmoved
Will be called when the map was moved.
onmapzoomed
Will be called when the map was zoomed.
With the <spotstyle> subnode it is possible to define styles for the spots.
A spot can be assigned to a spotstyle by the style attribute.
There is a predefined style named "DEFAULT".
The <spotstyle> node with all settings and their default values:
<spotstyle name ="DEFAULT"
url =""
overurl =""
activeurl =""
edge ="center"
x ="0"
y ="0"
scale ="1.0"
/>
name
The name of the spotstyle.
Use this name in the style attribute of a spot .
url
The url / path to an image that should be used for the spot.
When not defined the default image (a blue dot) will be used.
overurl
The url / path to an image that will be used for the spot when it mouse is over the spot.
When not defined the default image (a blue dot) will be used.
activeurl
The url / path to an image that will be used when the spot is activated.
When not defined the default image (a green dot) will be used.
edge
The alignment edge / anchor point of the spot image.
Possible values: lefttop, left, leftbottom, top, center, bottom, righttop, right, rightbottom.
x /
y
The offset in pixels from the edge point to the image.
scale
Scaling for the spotstyle images.
Can be used to use higher resolution (2x scaled) images for the iPad 3 retina screen. Use the bigger image and scale="0.5" to
get a 1:1 display of the image on the iPad 3.
With the <spot> subnode it is possible to define spots on the map.
A spot will be placed at lat/lng coordinates and can be linked to panos
by using the loadpano / loadscene actions in the onclick event.
The <spot> node with all settings and their default values:
<spot name ="..."
style ="DEFAULT"
url ="..."
lat ="..."
lng ="..."
heading ="0"
active ="false"
onover =""
onhover =""
onout =""
onclick =""
/>
name
style
The name of the spotstyle that should be used for that spot.
url
The url / path to an image that should be used for the spot.
When not defined the image from the spotstyle will be used.
lat /
lng
heading
The heading of the pano in degrees, needed to align the pano orientation with the radar on the map.
See also the radar headingoffset setting for details.
active
State of the spot. When set to true the spot will be activated.
That means the spot will show the active spotstyle image (when no url was set) and that
the radar will be shown at the spot location.
To activate a spot dynamically use the activatespot() action.
onover
Actions / functions that will be called when the mouse moves over the spot element.
onhover
Actions / functions that will be called in intervals (10 times per second) when the mouse stays over / hovers the spot element.
onout
Actions / functions that will be called when the mouse moves out of the spot element.
onclick
Actions / functions that will be called when there is a mouse click on the spot element.
Actions of the Google Maps Plugin object.
Usage example:
plugin[map].activatespot(spot1);
plugin[map].pantospot(spot1);
Actions documenation:
activatespot(name)
Activate the spot wih the given name.
That means the spot will show the active spotstyle image (when no url was set) and that
the radar will be shown at the spot location.
addimagespot(name, lat, lng, heading, style, url, onclick, onhover, onover, onout )
addspot(name, lat, lng, heading, active, onclick, onhover, onover, onout )
addspotstyle(name, url, overurl, activeurl, edge, x, y )
Add a new spotstyle .
name = name of the new spotstyle.
url = url of the default image.
overurl = url of the over image.
activeurl = url of the active image.
edge = alignment edge / anchor point of the spot images.
x / y = pixeloffset from the edge point.
addstylespot(name, lat, lng, heading, style, active, onclick, onhover, onover, onout )
panby(dx,dy)
Pan the map.
dx / dy = distance in pixels to pan.
panto(lat,lng)
Pan to the given coordinates.
lat / lng = the map coordinates.
pantospot(name)
Pan to the coordinates of the given spot.
name = name of the spot.
removeallspots()
Remove all spots from the map.
removespot(name)
Remove the given spot.
name = name of the spot to be removed.
setcenter(lat,lng)
Set a new center for the map.
lat / lng = the map center coordinates.
setmaptype(maptype)
setzoom(zoom)
Set a new zoom level for the map.
zoomin(lat, lng, center )
Zoom in the map by one zoom level.
Can be used for own controls.
lat / lng = zoom toward this coordinates.
zoom = set to true to center the map at the lat/lng coordinates.
zoomout(lat, lng )
Zoom out the map by one zoom level.
Can be used for own controls.
lat / lng = zoom toward this coordinates.
zoomtospotsextent()
Zoom and pan the map automatically to show all spots.