how to get the mouse on over event to show an image for the active spot in Bing Maps

  • What I want to achieve is to get an image to popup when hovering over the Bing Map active spot so that I can show something like a logo, or possible contact information or addresses.

    Problem is the mapspots are automatically generated when adding long and lat to the scene tag while using the generic tour creation scenario of the latest krpano update 8/2012. And while documentation for creating plugins and such are clearly understandable, the new interface options are not clearly defined (at least I haven't found them), so...

    So where does the "overurl=someImage" go?


    Tony

    2 Mal editiert, zuletzt von nefar1ous (4. September 2012 um 06:40)

  • I changed the style markup to include an overurl="someImage":

    Code
    <spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" overurl="logo_sm.png" />

    But nothing happened.
    Then I added an extra mapspot, though it is not needed...

    Now the inactive spot shows the image, but not the activespot... I only really want the active spot to show an image, as in this tour there will only be one spot on the map anyway.

    Ideas are welcome :)

    2 Mal editiert, zuletzt von nefar1ous (4. September 2012 um 06:45)

  • Hi,

    you could try to set an image directly to the specific spot,

    e.g. just:

    Code
    <spot ... url="spotimage.png" />

    in this case the url/overurl/activeurl setting from the spotstyle are ignored,

    Have already set a spot manually (sortof) and disregarded the lat and lng option in the scene tag. I say "sortof" because for some reason the spot wouldn't show up unless I ran the skin_addmapspots() action.

    Code
    <layer name="skin_map"  activespotenabled="true" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="0" lng="0" zoom="15" bgalpha="0" maptype="normal" onmapready="skin_addmapspots();">
      <maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" />
      <spot name="flowhouse" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" visible="true" Edge="bottom" x="-5" y="-8" scale=".5" lat="13.720176844529918" lng="100.56796252727509" onclick="switch(layer[callout].visible)" />
      <layer name="callout" url="logo_sm.png" parent="flowhouse" x="20" y="20" edge="bottomleft" align="bottomleft" visible="false" scale="1" onclick="switch(layer[callout].visible);" />
      <spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" onclick="switch(layer[callout].visible)" />
      <layer name="skin_map_androidzoom_in"  url="vtourskin.png" effect="glow(0,0.5);" crop="9|512|46|64"  align="right" x="0" y="-40" zorder="2" ondown="layer[skin_map].zoomin();  skin_buttonglow(get(name));" onup="skin_buttonglow(null);"   devices="Android+Tablet+Flash" />
      <layer name="skin_map_androidzoom_out" url="vtourskin.png" effect="glow(0,0.5);" crop="73|512|46|64" align="right" x="0" y="+40" zorder="2" ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />
    </layer>

    Now the question is how to append the popup image to the spot... as shown here, I tried parent="theSpot" but it didn't work. I want to replicate something similar to a callout that popsup close to the mapspot. Any idea's how I can append the popup image to the mapspot?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!