Take hlookat vlookat and fov from the url ?

  • Hi, I'm trying to reproduce what has been done on http://www.paris-26-gigapixels.com and it's "Share you position' feature (naughty me...)
    It's allright to record the position, create an url and send it on facebook, but the problem is that the params in the url aren't read by the player...
    the url goes like this :

    Code
    http://www.360images.fr/360/angers_haute_def/angers.html?x=27&y=3&z=19


    and x , y and z doesn't mean anything to krpano !
    I'm missing something but I just can't find what...
    Thanx for your help in advance !!!

    PS: you can try the share your position button here :http://www.360images.fr/360/angers_haute_def/angers.html

  • Not sure that this will work but try this:

    Code
    var so = createswf('krpano.swf'); // this line might be different for you
    so.addVariable('xml', 'your.xml'); // this line might be different for you
    so.addVariable('view.hlookat', qs_params['x']);
    so.addVariable('view.vlookat', qs_params['y']);
    so.addVariable('view.fov', qs_params['z']);
  • Wouhouuuuuuuuuuuuuuuuuuuu, brilliant srisa !!!!
    It's almost working !!!
    Works perfect if the paramas x y z are in the url, but if there is no paramas then it displays a black screen loading and loading again...
    Guess it needs a "if" somewhere ?

  • Hi Guys,


    I'm just landing here in this thread and loved the solution.

    How can I implement here in my end, with an aditional that I have a tour with several panos (xml) and the link to facebook or twitter should get also the current xml url?

    Jeromebg!! Congratulations!! Really nice work!!!!

    Using that Javascript, how did you call it inside krpano xml??

    Thanks,

    Daniel

  • Add another variable to the query string, like so, url=mypano.xml. Using the above mentioned javascript, you can access it as qs_params['url'].

    Code
    so.addVariable('xml', qs_params['url']);

Participate now!

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