• Hi,
    I'm would like to make my virtual tours iOS-html5 compatible.
    My problem is that "loadpano" action is not working with the "&" character, because of XML formatting problems.

    Code
    loadpano(pano2.xml,view.hlookat=180&view.vlookat=-1&view.fov=98,KEEPBASE,BLEND(1));


    I tried to use it like this:

    Code
    loadpano(pano2.xml,null,KEEPBASE,BLEND(1),lookat(180,-1,80);wait(load););


    but when the pano is loading its looking to some different direction, and after 1-2 seconds its switching into the good position :(
    i tried this is too:

    Code
    loadpano(pano2.xml,null,KEEPBASE,BLEND(1));lookat(180,-1,80);wait(load);


    Like this its working only the second time when i do this action, first time its ignoring the lookat action :(
    I've seen this function working in the examples with the loadscene, but with the loadpano it's not working good for me.
    Is it any possibility to load my panos in a direction like with the "&" character before in the only flash version?

    Edited 3 times, last by zsolt (February 2, 2011 at 6:05 PM).

  • I would like to use different view settings from different spots. My goal is to show from where i come to the next spot.
    Thats why i want to set the view dynamically.

  • I just encountered the very same problem here, I got a hotspot which should load a pano at a specific viewing angle, and works on desktops (flash), but on iOS renders the whole panorama unviewable.
    It just shows a black screen and says that XML parsing failed with a fatal error instead of displaying the pano on iOS. In the flash version it does exactly 100% the thing I want it to do. Here is the code line:

    onclick="looktohotspot(get(name)); loadscene('pano1',view.hlookat=210&view.vlookat=0,MERGE,BLEND(1));"

    When I remove the &view.vlookat=0 portion, it works somewhat on iOS (shows the pano but doesn't set the view correctly)
    This is essential for virtual tours if you don't want to have thousands of copies of the same room for entering from different directions.
    I hope this obvious bug gets squashed soon! I am otherwise very very happy with krpano, it's easily the best thing that could happen to me *smile*

  • May be after your first post you should ask your self .. maybe it's to early to say..

    quote:"I hope this obvious bug gets squashed soon! "

    Read and learn and try to understand.. when possible.


    or just ask.


    Tuur

  • Sorry, I didn't mean to be rude or aggressive or anything. I already read the krpano documentation for hours and already built some impressive tours and intros this way. I never encountered any bug and everything was very well documented
    and very user-friendly, even to a level you seldom see these days. If the described behavior isn't a bug, can you tell me what to do in my situation then? To me it seems like a clear bug in the jspano because it works without any problems in
    the flash with the same XML, and just doesn't work in iOS when using the & in the loadscene command to concat more than one view setting there. And even with just one setting like "view.hlookat=210" it doesn't look into the desired direction
    on iOS, but works perfectly on flash. I already tried a lot of things, including making copies of scenes with altered default views, altering the thumb creating function to only show one copy per scene, but this is not a good thing to do and also pretty
    time consuming when programming a lot of vtours. To my understanding the HTML5 version should just work the same as the flash version, except for the documented functions that don't work, and loadscene is not in there.
    I don't think that one should judge people solely by their post count. It's not that I am too lazy to look for a solution, I already spent many hours and found one, but it's a very dirty workaround and I would like to have the same XML code for flash and
    HTML5 working the same, without making it like twice as long and much more complicated to edit. And that's why I am looking for a possible fix here. In case anyone has any questions, feel free to ask, and I'll gladly answer anything regarding my issue
    or show some examples.

  • Hi,

    I'm on iPhone now, so i keep It short.
    Actualy, most of THE time we like to do more in onclick / go to NeXT pano action.
    Do most of THE time we do onclick moveto1();
    That's action you say for example which pano to load/lookat/lookto/when user van interact/wait blend etc.

    Look for set(view,hlookat, 0);set(etcetc
    Instead of THE thing with the &
    Perhaps you are right about bug, but i think not.

    Can u show some of your tours?

    Cheers
    Tuur

  • I guess there are several ways to do this.
    IBut I really can not undderstand why zsolt complicates it with the "&" character,

    Here is ademo and it works perfect also on the iPad

    There are several hotspots with different views than the standard set you get from the thumbnails.
    http://www.panoramas.dk/panorama/krpano/vtour1/tour.html


    I just made some actions with the views and used them in the loadpano event.
    like this.

    <action name="view2">

    set(view.hlookat,90);
    </action>

    <hotspot name="spot2" style="hotspot_ani_white"
    ath="-35"
    atv="5"
    zoom="false"
    onclick="looktohotspot(get(name)); loadscene(scene_03,null,MERGE,BLEND(1));view2());"
    />

    Somedthing else is that I found that it must be a bug with the stopallsounds.
    I can not get it working for pano 2.

    Hans

  • Hey, thanks for your fast replies! I will look into your solution, Tuur, thanks for giving me this hint - but I still think it's a bit of a workaround
    to the real problem involved here. I like to keep my code as short as possible without any unnecessary functions, and I like the thing with the &
    because everything is in one line with no additional functions, which keeps the code very clean to me. I used it like this here:

    http://blende12.ch/360/

    You can see that it works perfectly on a computer in flash, and the hotspots always leave the viewer facing the same direction after the transition to the new scene.
    This is just an example, and I know the image are overexposed and stuff, but I think it's a good simple example of what I want to achieve. It works on computers
    but on iOS just gives that error message and doesn't run at all. There are other things I have to sort out on iOS as well, like the fullscreen button not working for some
    reason (works perfectly on computers as well) but this might have to do with the iframe involved there, and is not part of the discussion of this thread here.

    HansNyb, thanks for showing your example. I enjoyed it, especially because it even had sound in it! But I think that the transition between the views is a bit
    confusing because you don't enter a new scene at the same angle as you leave the old one, and that's what I wanted to accomplish with my "problematic" code here.

  • usabell you will have to do it the way hans showed you for it to work in idevices. i tried to use thickbox to open some iframes but its url also has a & in it and it will not parse at all on the idevices.

    also you may want to view your website on a 1024x768 resolution it is too big and had verticel and hortizontal scroll bars. unfortunalty lots of people still use this resolution so we have to optimze our websites for the lowest res. nothing i hate more than having to scroll a webpage left and right as i read.

  • Look, I did not do it to show how it should be done in real with correct angles. I just made some completely random directions just to show you the code you should use to make it work.
    In reality with my way you can reuse the same action in different hotspots if the direction is the same.

    You can of course set the direction exactly in the one you want it. And the only thing you need in the loadpano event is view1, view2 or what ever you want to call the actions.
    You could just say v1(); v2(); if you want to make it short.

    Regarding how to enter a new scene the correct way is that you should look back to the place you came from. That is the least confusing.
    Hotspots has always been a very bad way to navigate with and I never understood why so many people want to do it because the normal user can never figure out how to navigate with them.

    The only time I used it was a museum in which I just put a one way walk through.

    Hans

  • OK, I tried what you two were saying and it works on iPhone for me now, yay! Thanks a lot for the help on this one,
    you saved me a headache! I however still think that the behavior on iPhone (black screen with parsing error) when using
    the & symbol which works in flash is not intentional, so IMO either it should work in both of them or in none of them.
    Well, for the time being, I have a workaround that is not too complicated (I uploaded it to the site I showed you too).

    VN2011: Thanks for the comment on the website as a whole! I'll look into it to get it fixed, as I also hate horizontal scrolling
    on websites. I for myself am spoiled a bit with a 2560x1600 resolution screen, so I never encounter any scrolling issues with
    any sites, and I think that most people today have at least 1440x900 or something like that, but I might be wrong.
    I'll try to make the website a bit smaller so it will fit in 1024, if possible. Also, the website is really new and only a week
    or so old, so everything will still undergo heavy changes, so a resolution change is still pretty much possible. Thanks for the hint!

    HansNyb: I understand your point and I also think that hotspots aren't a good way to navigate through space, but if you offer
    panoramic images, it's the best way to me to link between them. I know there are different philosophies of "how to enter a scene
    the correct way" and ther eisn't just one solution that makes sense. It's a matter of preference, I think. To me, the most logical
    way to do it is to look at the same object after the transition like I was looking at before, so I instantly have an orientation point
    after the transition. Of course this is not always possible (for example with closed doors or paths that go around corners), but I try
    to keep this visual guideline when creating vtours with panoramic images. It is the most intuitive and logical thing for me to do.
    I can understand that it also makes sense to set the view in the direction you are coming from, but since you see no visual sign
    of a 180 degree rotation, I think it is pretty confusing, especially when zooming in like in both our examples.
    Your mileage may vary, of course *smile*

    Anyway, thanks for helping me out of this trouble, and for the rest of the problems with the iframes and stuff I'll just open
    a new thread because that stuff is WAY off topic here *smile*

  • Hi,

    this is a basic limitation of the used xml parser,
    the build-in xml parser in the Flashplayer is more tolerant and there using the '&' characters is okay in many cases,
    but the build-in xml parsers of the Browsers are much more strict, there it would be necessary to use '&amp;' to get am '&' character,

    so try using &amp; instead of &, then it should work in both situations (Flash and Javascript),

    best regards,
    Klaus

Participate now!

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