Google Maps Plugin
googlemaps.swf
Version 1.0.8.14
The Google Maps Plugin adds a 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.
The standard Google Maps controls, like the position and zoom controls can be also added.
The map can be rotated / viewed in a 3D Perspective View.
And it's possible to control the whole maps and spots dynamically, e.g. pan/zoom around on the map, add or remove spots...
Plugin documentation topics:
The krpano Google Maps Plugin is an additional Commercial Plugin .
To use it a license for the plugin must be bought.
Without license a krpano watermark will be shown in the map.
Additionally there is the AS3 (Actionscript 3) Flash source code for AS3 developers available.
The source code allows further individual customizing but requires good coding knowledge.
Updates - All updates for the Google Maps Plugin are free.
Just get the newest googlemaps.swf with the newest krpano Viewer Download Package from here .
For updates for the Source Code write a short mail .
UPDATE NOTE - for orders before version 1.0.8.14 see here - License Update .
The plugin can be bought here on this page or on the krpano Buy page.
Javascript must be activated for this page!
krpano Google Maps Plugin License
A license the krpano Google Maps Plugin.
19 € plus sales tax/VAT*
19 €
krpano Google Maps Plugin Source Code
The Flash Actionscript 3 Source Code of the Google Maps Plugin.
Note - only for AS3 Flash Developers! .
80€ plus sales tax/VAT*
80 €
Total
plus sales tax/VAT*
The order transaction and the license delivering will be done by the Share‑It E‑Commerce provider.
Note - the "Extended Download" / "Erweiterter Download" option for 6.99 USD/EUR in the Share-It order form is not needed
but enabled by default! It can be removed by clicking the "Trash"-button!
* VAT: Depending on your location or company status VAT may be added to the price.
In the Share‑It order form select your country and enter your VAT/UID number
to remove the VAT. The correct price will be shown on the
next page in the order form.
key
maptype
Select the type of the map:
satellite (default)
normal
physical
hybrid
maptypes
Set the avialable /chouseable map types.
Can be any combinations of the map type values.
Default: normal|satellite|physical|hybrid
lat /
lng
Latitude and Longitude in degrees.
The geographic coordinates of the current map center position.
How / where to get?
Either directly from the Google Maps page.
Or from here: Get Lat Lon (www.getlatlon.com)
A nice webpage which allows getting the coordinates in the right format in an easy and simple way.
zoom
Set zoom level of the map.
Can be from 0 to 32.
viewmode
Select a 2D or a 3D view of the map.
Possible settings: 2D or 3D .
pitch /
roll /
yaw
The 3D camera rotation when using viewmode ="3D".
maphandcursor
Show a hand cursor when the mouse is over the map.
activespotenabled
Should the active spot be enabeld?
That means - should the active spot react to click or over events.
dragging
Should it be possible to drag the map by the mouse?
scrollwheel
Should it be possible to zoom in the map by the mouse wheel?
continuouszoom
Should the zooming in the map be stepwise or continuous?
dbclicking
Should it be possible to use double clicking to zoom in?
keyboard
Allow moving in the map by the keyboard?
crosshairs
Show a crosshairs at the map center.
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"
shadow ="true"
/>
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.
shadow
Should a shadow by added to the spot image?
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
Latitude and Longitude in degrees.
The geographic coordinates of the spot.
How / where to get?
Either directly from the Google Maps page.
Or from here: Get Lat Lon (www.getlatlon.com)
A nice webpage which allows getting the coordinates in the right format in an easy and simple way.
heading
The heading of the pano in degrees, needed to align the pano orientation with the radar on the map.
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, shadow )
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.
shadow = add shadow?
addstylespot(name, lat, lng, heading, style, active, onclick, onhover, onover, onout )
cancelflyto()
Cancel a previous flyto or flytohotspot call.
flyto(lat, lng, zoom, yaw, pitch, roll, duration )
Fly to the given coordinates with the given zoom and camera position.
flytospot(name, zoom, yaw, pitch, roll, duration )
Fly to the given spot with the given camera zoom and position.
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, continuous )
Set a new zoom level for the map.
continuous = continuous zoom to the new zoom level.
zoomin(lat, lng, center, continuous )
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.
continuous = continuous zoom to the new zoom level.
zoomout(lat, lng, continuous )
Zoom out the map by one zoom level.
Can be used for own controls.
lat / lng = zoom toward this coordinates.
continuous = continuous zoom to the new zoom level.
Full example xml code:
<krpano onstart="loadscene(stpeterssquare,null,MERGE);">
<area width="70%" x="30%" />
<plugin name="map" url="googlemaps.swf" parent="BGLAYER" keep="true"
align="lefttop" x="0" y="0" width="30%" height="100%"
key="...your Google Maps API key for your domain..."
maptype="satellite"
lat="41.90050" lng="12.46705" zoom="15"
viewmode="3D" pitch="45.0" roll="0.0" yaw="-90.0"
>
<spotstyle name="DEFAULT"
url="mapspot.png"
overurl="mapspot_over.png"
activeurl="mapspot_active.png"
edge="bottom" x="0" y="0" shadow="true"
/>
<spot name="stpeterssquare" active="true"
lat="41.90255" lng="12.45708" heading="64.5"
onhover="showtext('St. Peters[sq]s Square');"
onclick="loadscene(stpeterssquare,null,MERGE,BLEND(1));
activatespot();"
/>
<spot name="fourrivers"
lat="41.89877" lng="12.47311" heading="270.0"
onhover="showtext('Fountain of the Four Rivers');"
onclick="loadscene(fourrivers,null,MERGE,BLEND(1));
activatespot();"
/>
<radar visible="true" zoomwithmap="true" size="50" />
<navigationcontrol visible="true" />
<maptypecontrol visible="true" buttonalign="V" />
</plugin>
<scene name="stpeterssquare">
<view hlookat="103" vlookat="-2" fov="100" />
<preview type="stpeterssquare_preview.jpg" />
<image>
<cube url="stpeterssquare_%s.jpg" />
</image>
</scene>
<scene name="fourrivers">
<view hlookat="-1" vlookat="-4" fov="100" />
<preview type="fourrivers_preview.jpg" />
<image>
<cube url="fourrivers_%s.jpg" />
</image>
</scene>
</krpano>