iPad simulator , should it work.

  • The iPhone simulator work fine and is easy to use but why does the simulator not work for iPad.

    I do have an iPad but no iPhone so its OK for me even if it would be faster to check in the simulator.

    I only get a black screen when i change to iPad.
    The only parameters to set is this.
    <!-- path to the xml file -->
    if (device == "iphone")
    viewer.addVariable("xml", "data/tour.xml");
    else if (device == "ipad")
    viewer.addVariable("xml", "data/tour.xml");

    viewer.embed("krpanoDIV");
    }

  • Ok I have figured it out myself.

    The problem is that the simulator seems to be made for people that use separate .js files for everyting.
    However I guess that many of us do as I do include them all in 1 single tour.js file.

    In the simulator the template says.
    <!-- path to the krpano viewer files (keep the file order!) -->
    <script src="../../swfkrpano.js"></script>
    <script src="../../krpanoiphone.license.js"></script>
    <script src="../../krpanoiphone.js"></script>

    I replaced that with this as all 3 javascript files are included in the tour.js.
    <script src="data/tou.js"></script>

    This works perfect using the iphone simulation but only gives a black screen for iPad.
    I had to copy my license and my swfkrpano.js to my folder to get it working.
    Like this
    <script src="data/tour.js"></script>
    <script src="krpanoiphone.license.js"></script>
    <script src="swfkrpano.js"></script>


    Klaus can you explain why iPhone but not iPad simulation works fine just with the tour.js file?

    Hans

  • Hi,

    hmm, normally that should work...

    is your 'tour.js' up to date?

    the tour.js is typically a combination of the swfkrpano.js + krpanoiphone.license.js + krpanoiphone.js,
    but when the swfkrpano.js that is embedded in your tour.js is too old, it's possible that it doesn't work,

    in older versions of the swfkrpano.js file the dynamic embedding of the krpanoJS wasn't possible, but this is necessary in the iPhone/iPad simulator when switching from iPhone to iPad,

    but when you include a newer swfkrpano.js after the tour.js then the newer swfkrpano.js functions overrides the old ones from the tour.js,

    you can use the krpano Update Tool on your tour.js to make sure that it is fully updated, then it should also work just when using a single .js file,

    best regards,
    Klaus

  • I think I found the problem.

    I have my templates in different folders containing all files .
    I had updated the plugins in this folder but I can see now that for embedding the swfkrpano.js you use a special swfkrpano.js which is i the html folder.
    I had not updated this folder.

    Hans

  • Hi,

    right, at the moment still a different file was used as base by default - it's the 'swfkrpano_embedded_krpanojs.js' (which is now the same as the swfkrpano.js, in version 1.0.8.12 it was bit a different),

    see that part in the kmakemultires.config:

    Code
    # embedded swfkrpano.js + krpanoJS template
    # 
    # - for usage with embedlicenses=true
    # - only one output javascript file 
    # - krpano license embedded (if available)
    # - krpanoJS license embedded (if available)
    #
    htmltemplate=templates/html/swfkrpano_embedded_krpanojs.html
    htmltemplate_js=templates/html/swfkrpano_embedded_krpanojs.js

    best regards,
    Klaus

Participate now!

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