How to display small thumbnail image with the onhover/onover on a polygon hotspot

  • Greetings all :)

    I would like to show an info icon for some painting polygon hotspots, I previosly tried to do with graydons excellent code here

    https://krpano.com/forum/wbb/inde…ight=#post26386

    It works on image hotspots but not polygon hotspots :( - so I tried using the hotspot-onover-change code in the examples folder, and made a test and got it to work

    http://bit.ly/gJuRWD

    but because hotspots do not have an x and y value like plugins, I could not get to a uniform code I could use for many paintings (I got 400), hotspots have ath and atv which apply to panorama coord's, maybe there is some way to do + 15 atv and ath from the hotspot polygon center.

    I hope this makes sense and I would be uber grateful if anybody has any solutions or good ideas on how i could do this for polygon hotspots.

    Many thanks in advance for any help.

    best wishes,

    tom

  • Hi tommo77funk ^^
    Have you solved your problem yet ?
    I've flown over xml documentation about polygonal hotspots, maybe you can use the edge parameters to indicate
    the origin of your hotspot...
    But using lots of them will be binding...
    And the main problem is that your hotspots won't be all the same size... so using +15atv is not going
    to do the same effect for all...
    Tricky one here!!! If you get a solution might interest me !!!
    I'm going to search more my own and tell you if i get it to work ^^
    Regards.

  • Hi again !!
    Just to recomand you to use the style attribute for your hotspots ^^

    Code
    <style name="style1" alpha="0.5" scale="0.5" ... />
    
    
    <plugin  name="p1" ... style="style1" />
    <plugin  name="p2" ... style="style1" />
    <hotspot name="h1" ... style="style1" />

    To dry the code cause it's hard to read in fact ^^
    For your problem, have you tried something like :

    Code
    <action name="show_over_png">
    set(plugin[hover_image].parent,hotspot[%1]);
    set(plugin[hover_image].ox, 50);
    set(plugin[hover_image].oy, 50);
    </action>

    The ox value will reffer to your hotspot edge position, maybe could work...
    Havn't tested it but will ^^

  • Hi Yomas,

    Thanks so much for looking, advice and your reccomendation.

    I have made a new example using styles *thumbup*

    http://bit.ly/k9ZyZ7


    The problem I am finding is a plugin just wont dipslay with a polygon hotspot in this way. A hotspot icon will display, but I need it to appear outside of the polygon area top right. I have experiemented with the edge settings and ox and oy but cant seem to get the icon to appear out of the polygon, so thats when i started to think about atv and ath settings.

    I am mega grateful for any solutions or ideas, a tricky problem indeed *wacko*

    Thanks and best wishes,

    tom

  • Hi !
    You're welcome, it's always a pleasure to help ^^
    For your problem, I'll take a further look tomorow but sure there's a solution !
    (maybe you won't have to ask Klaus *wink* )
    The worry is that I got the same thing to do and got it to work but I skipped it for a AS3 solution
    and so lost that tricky code :'(
    I'll keep you informed !!
    PS: I went on your website, great job !!!
    I loved the 3D stuff walking in a pano, can you tell me more about ? ( in private message if you want to preserve technic secret ^^ )
    Also great aerial photography, using a drone or baloon ?
    See ya !!

  • Hey Yomas,

    Thats really great news - THANK YOU for your help - I hope you manage to replicate the missing code and thanks so much for trying on my behalf. I am really looking forward to showing this tour when finished, as I have recieved some some great help on this forum since I started it (about 2 months ago), and it is nearly ready, just this last remaining request from the client I cant fullfill, so your help has been really appreciated - nice one *thumbup*

    The 3d pano on my site, is quite a bit old and was made with realviz vtour (now autodesk I think) and SPi-V 3d (aldo's excellent viewer). Vtour interface was a bit erm time consuming and pernickety so I put it down along time ago. If I was to do anything like that now, I would have a look at some of the new 3d scanners, to do the job much easier. The aerial work is from helicopter or drone depending on heights needed and aviation laws.

    thanks and best wishes,

    tom

  • Hi ^^
    I'm trying to find the solution and I didn't remember it was so tricky ^^
    A least there's a parameter I used and can't find wich one is...
    I'm trying with the hotspot[name].getcenter(ath,atv) fonction but I'm not sure it works for polygonal hotspots...
    Working on it ^^
    Let you know if i find the answer, and if you got it first let me know too ^^
    @++

Participate now!

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