• Using the radar plugin as a great reference, I was able to hack together a JS plugin that animates some custom SVG graphics for Map/plan spots. They look a lot better, less aliasing, etc than a rasterized jpeg/png graphic.
    I'm not a Javascript programmer so before I head down a worm hole, I wanted to know if it is possible to do the same with hotspots? If so, does anyone know of or have any examples I'd be able to use as a reference?
    Thanks.

  • We're under an NDA so I can't post a current example but I'll try and find time to pull together a non-project specific example next week.

    Basically though, I just started with the radar source code and stripped out everything related to the dragging, lookat functionality, etc. It's a couple of SVG circles with the radius animated to "pulse" back and forth. I really sort of expected it to work with hotspots too but once I started trying to implement it, I realized it wasn't going to be so straightforward for a couple of various reasons. I still don't have my head completely wrapped around how all the KRPano internals work to really tackle something like that without an example which is why deconstructing the radar plugin was so helpful. *thumbsup*

  • I wanted to add a little more info to this that I can post without violating our NDA. Basically the radar plugin can be substituted for our SVG mapspot plugin. The radar source code is available at the very bottom of this page... https://krpano.com/plugins/radar


    In the tour.xml file in the appropriate place...

    <hotspot name="spot1b" style="hotspot_radar" ath="90" atv="-10" linkedscene="xxx" linkedscene_lookat="0,0"/>>

    In the skin.xml file...
    <style name="hotspot_radar" scale="1.0" align="center" x="0" y="0" keep="true" url.html5="%SWFPATH%/plugins/radar_source.js" zorder="1" fillalpha="0.15" fillcolor="0xFFFFFF" linewidth="0.75" linecolor="0xFFFFFF" linealpha="0.5"/>

    Ok, the graphics don't show up but what is interesting is that the viewer knows there is "something" there and will switch the cursor out to the hand icon per the radar code in the appropriate polar location per the ath and atv values. I really feel like there is probably a solution here since I can't imagine there is anything unique about the radar plugin overlaying the SVG graphics over a flat PNG image in the plan/map area vs in polar coordinates over the pano image. I just don't have deep enough experience to see an easy solution here but perhaps this can point some of the smarter people towards a solution?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!