Aaaah, that makes sense. I'll give that a shot right now. Thanks!
Beiträge von zulaica
-
-
Aaaaahhh, yes, I see. Well, luckily that part of the code gets created dynamically with an include file. Removing that erroneous DIV fixed the issue. Thanks for the insight!
-
Aaaaah, that makes sense.
Here's a sample tour: http://visitingmedia.com/site/the-pearl-studio/
All tours on this site were built with Panotour 1 (we're testing the 2.0 beta internally—it's great so far!). To make updating the viewer easier (as there are many tours hosted here), the viewer files are stored in an include folder and we use htaccess to point each tour to the correct files.
-
I'm only running into this issue when initially launching a site in Safari with an iPad (iPad2) in landscape mode. If I load the same tour in portrait mode, the viewport resizes correctly and displays as it should. Additionally, if I load the tour in landscape, tilt to portrait (which causes the viewport to fix), and then go back to landscape, the viewport remains fixed. I'm not having any issues with this on the iPhone (iPhone 4) at all. Both are running iOS 7.0.3.
-
After some time away—had to work on other things—I made sure the viewer was up-to-date... still no dice.
I'll post a link online and send you the test project and PM it to you in the next couple days, if you can still take a look at it. Thanks!
-
-
Huh. Well, now that I know it works, I just need to sort out where the disconnect is happening on my end. I pushed my code onto my server (instead of just testing on my localhost) and I'm still getting the same error. Thanks for taking the time to give it a go. I guess at this point I need to strip my code down to bare minimum to see where it fails.
I found it in the XML reference document: http://www.krpano.com/docu/xml/#url-notes
-
No luck, it gives me the same Loading Failed (400) error. :-/
-
Well, having spent some time away from this, came to realize I was sending query parameters incorrectly. Changed that line to
and still getting a Loading Failed (400) error.
Here's the revised code again in case anyone has any ideas
PHP
Javascript
PHPvar viewer = createPanoViewer({swf:"virtualtour.swf", xml:"virtualtour.xml", target:"panoDIV"}); viewer.passQueryParameters(); viewer.addVariable("VMScene", <?php echo $loadVMScene; ?>); viewer.embed();
xml
-
Additional note: when I pull up the error console in Safari, I get the following:
ZitatReferenceError: Can't find variable: passQueryParameters
-
Update: I added passQueryParameters to my javascript.
PHPvar viewer = createPanoViewer({swf:"virtualtour.swf", xml:"virtualtour.xml", target:"panoDIV"}); viewer.addParam(passQueryParameters, true); viewer.addVariable("asdf", '<?php echo $loadScene; ?>'); viewer.embed();
That looks like it's starting to do the trick. When loading the page, the pano doesn't load—I just get a white viewport—but viewing the source shows the viewer div and the appropriate embed content.
-
More information on how I've got things set up: I'm currently running this on my dev machine with MAMP using a virtualhost, browsing with Safari in HTML5. When browsing in Chrome with Flash, I get a Loading Error (IO Error).
-
Well, I finally got around to trying that and it didn't work. I renamed the variable in the php and javascript to "asdf" and made the appropriate change in the xml file. Now I'm getting a Loading Failed (400) error. Any ideas?
-
Ha! I totally didn't even consider that. Thanks!
-
The way it's been set up, the chrome and scenes are in a separate xml files. They've been using PanotourPro for a while now with a lot of tours already built. I'm trying to extend functionality further (gonna need to insert code manually into some existing tours, then use my injection points with PanotourPro's theming to have this built-in moving forward). They work like this:
index.php -- loads the main virtualtour.xml file
virtualtour.xml -- contains the stage and all the UI chrome. This also loads the first scene, virtualtour0.xml, by default via include
virtualtour#.xml -- any number of individual scenes, loaded dynamically through hotspots or a combo boxThe client is looking for a way to take a multi-scene tour and be able to specify a starting point by passing that through a variable in the URL. So, for example, if they want to embed or link a tour and start with a specific scene, the could pass that with a URL structured like http://domain.com/tour.php?scene=1
-
Thanks for the reply!
I've seen posts where people pass variables into the include, most commonly as a cache buster. Perhaps I'm missing a step somewhere?
That method would work, but unfortunately not in my case. It would require a HUGE overhaul/rewrite for my client and that's just not currently feasible.
-
I'm attempting to dynamically add the ability to load a specific scene by passing a variable through the URL. (E.G. http://domain.com/tour.php?scene=1) Everything seems to be working fine up until I try to have the xml file parse the variable; it returns "[object Object]" instead of the value I'm passing.
Here's the pertinent code:
PHPCode// Grab the variable from the URL. If not present, default to scene 0 if (isset($_GET['scene'])) { $loadScene = $_GET['scene']; } else { $loadScene = "0"; }
to Javascript
PHP// Create Viewer var viewer = createPanoViewer({swf:"virtualtour.swf", xml:"virtualtour.xml", target:"panoDIV"}); viewer.addVariable("scene", '<?php echo $loadScene; ?>'); viewer.embed();
to virtualtour.xml
results in "FATAL ERROR: virtualtour[object Object].xml - loading failed! (404)" ... which makes sense because, well, that file doesn't exist.
Any ideas why the variable doesn't pass through correctly? Thanks!