JS looktohotspot get screen x,y

  • Hi again..

    This time I have a problem with getting the correct x,y position of a hotspot. I have no problem getting the x,y when i click a hotspot. But then I have a looktohotspot function that zooms and center the hotspot. The problem comes that i cant seem to get the correct screen x,y after the zoom/center. I want to call a javascipt that positions a infobox/modal in the proximity of the hotspot when a user clicks the hotspot. But with the wrong x.y the infobox gets not position correctly.

    My onclick funtion is

    Code
    onclick="looktohotspot(get(name),get(view.fovmin),smooth(400,20,100));js(showInfo(get(logo),get(title),get(description),get(opentime),get(closetime),get(homepage),get(filter),get(mouse.x),get(mouse.y),get(name)));" tooltip="Portalia AS" url="/360Alesund/graphics/spots/Severdigheter.png" ath="-152.328" atv="11.9605" style="tooltip" alpha="1.0"

    Or is it that simple that I just can use javascriptfunctions to get the screen height/width and center my infobox. Without the knowledge of the hotspots correctly x/y

Participate now!

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