News Examples Documentation Download Buy Forum Contact

Documentation

Plugins

XML Extensions

Tools


Third Party Software
for krpano

NOTE: This page is from an older version, see the latest version here.

Bing Maps Plugin bingmaps.swf Version 1.0.8.14

  • The Bing Maps Plugin adds an interactive Bing 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.
  • 'Google Maps' styled controls, like the position and zoom controls can be added.
  • And it's possible to control the whole maps and spots dynamically, e.g. pan/zoom around on the map, add or remove spots...
  • The krpano Bing Maps Plugin is powered by OpenScales.
  • Google Maps / Bing Maps Notes - the XML interfaces of the Bing Maps and the Google Maps plugins are almost the same. To use the Bing Maps plugin just replace the Google Maps plugin and change the Google Maps key with a Bing Maps key.

Plugin documentation topics:

Buy / Order

  • The krpano Bing 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.
  • Note - the krpano license keys for the Google Maps and the Bing Maps are the same! Just rename the googlemaps.license.xml to bingmaps.license.xml.
  • Updates - All updates for the Bing Maps Plugin are free. Just get the newest bingmaps.swf with the newest krpano Viewer Download Package from here.
  • The plugin can be bought here on this page or on the krpano Buy page.

krpano Bing Maps Plugin License
  • A license the krpano Bing Maps Plugin.
  • Can be used also for the krpano Google Maps Plugin.
29 € plus sales tax/VAT*

Usage Syntax

The Bing Maps Plugin embedding with all attributes / sub-nodes and their default values:
<plugin name="map"
        url="bingmaps.swf"
        align="leftbottom" width="400" height="300" x="0" y="0"
        keep="true"
        key="...your Bing Maps API key..."
        maptype="satellite"
        lat="..."
        lng="..."
        zoom="1"
        maphandcursor="false"
        activespotenabled="false"
        dragging="true"
        scrollwheel="true"
        dbclicking="false"
        onmapready=""
        onmaptypechanged=""
        onmapmoved=""
        onmapzoomed=""
>
  <spotstyle name="style1" ... />
  ...
  
  <spot name="spot1" ... active="true" />
  <spot name="spot2" ... />
  <spot name="spot3" ... />
  ...
  
  <radar visible="true" ... />
  
  <positioncontrol    visible="false" ... />
  <zoomcontrol        visible="false" ... />
  <maptypecontrol     visible="false" ... />
</plugin>

Plugin Attributes

  • key
    • The Bing Maps API key.
    • To be able to use the Bing Maps services a Bing Maps API key is needed!
    • Sign up here for a Bing Maps API key...

    • Multi-Domain-Key-Pairs
      • It is possible to use several domain-key pairs as key-attribute to use different keys for different domains.
      • Just separate all the domains and keys by pipe | characters.
      • To set a key for local testing (file://) there is the special domain name "local" available.
      • Syntax / usage example:
        key="yourdomain1.com|key1|yourdomain2.com|key2|local|key1"
  • maptype
    • Select the type of the map:
      • satellite (default)
      • normal
      • hybrid
  • lat / lng
  • zoom
    • Set zoom level of the map.
    • Can be from 1 to 25.
  • 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?
  • dbclicking
    • Should it be possible to use double clicking to zoom in?

Plugin Attributes - Events

  • onmapready
    • Will be called when the Bing 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.

Plugin Subnodes - <spotstyle>

  • 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"
           />

<spotstyle> Attributes

  • 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.

Plugin Subnodes - <spot>

  • 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=""
      />

<spot> Attributes

  • 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.
  • 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.

<spot> Events

  • 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.

<spot> Actions

Plugin Subnodes - <radar>

  • Add and style a radar.
  • The radar will be shown at the active spot position.

The <radar> node with all settings and their default values:
<radar visible="true"
       dragable="true"
       size="100"
       zoomwithmap="false"
       alpha="0.5"
       fillcolor="0xFFFFFF"
       fillalpha="1.0"
       linewidth="0.0"
       linecolor="0xFFFFFF"
       linealpha="0.0"
       glow="true"
       glowcolor="0xFFFFFF"
       glowwidth="4"
       glowstrength="4"
       />

<radar> Attributes

Bing Maps Controls

  • These Controls are available:
  • Note - beside of these included controls it's possible to use own images as controls by using normal krpano plugin elements and adding them with the parent setting to the map.

All controls with all settings and their default values:


Position Control:
<positioncontrol visible="true" align="lefttop" x="2" y="2" />

Zoom Control:
<zoomcontrol visible="true" align="righttop" x="2" y="2" 
             hasscrolltrack="true"
             />

Map-Type Control:
<maptypecontrol visible="true" align="rightbottom" x="2" y="2"
                buttonalign="H"
                />

Control Attributes

  • visible
    • Show or hide the control.
  • align
    • Alignment of the control.
      Possible settings: lefttop, righttop, leftbottom, rightbottom.
  • x / y
    • Offset in pixels from the alignment point.

  • zoomcontrol.hasscrolltrack
    • Show zoom scroll track or not.
  • maptypecontrol.buttonalign
    • Alignment of the map type buttons. Possible settings: "H" or "V".

Plugin Actions

Actions of the Bing Maps Plugin object.

Usage example:
plugin[map].activatespot(spot1);
plugin[map].pantospot(spot1);

Actions documenation:

Examples

Full example xml code: (also included in the viewer download package)
<krpano onstart="loadscene(stpeterssquare,null,MERGE);">

    <area width="70%" x="30%" />

    <plugin name="map" url="bingmaps.swf" parent="BGLAYER" keep="true"
            align="lefttop" x="0" y="0" width="30%" height="100%"
            key="...your Bing Maps API key for your domain..."
            maptype="satellite"
            lat="41.90050" lng="12.46705" zoom="15"
    >

        <spotstyle name="DEFAULT"
                   url="mapspot.png"
                   overurl="mapspot_over.png"
                   activeurl="mapspot_active.png"
                   edge="bottom" x="0" y="0"
                   />

        <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" />

        <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>