Pano2VR 4beta2:links with html5

Q&A about the latest versions
MacHeld
Posts: 20
Joined: Wed Aug 15, 2012 11:26 am

When I'm linking panoramas via hotspots creating only html5 output, I must use the xml file (otherwise I get the error, that the xml file could not be loaded, when I click a hotspot).

When using this method, the new panorama will be loaded but the URL stays the same, just the container with the panorama is replaced by the new panorama.

This has 2 unwanted side effects:
  1. the URL itself stays the same, which is very disturbing (eg. you clicked some hotspots and then do a page reload)
  2. because of the same URL you can not bookmark panoramas
How do I force the reload of the correct page?
(e.g: I'm on 001.html and somebody clicks a hotspot which links to 002.html, after clicking the page is 002.html is loaded and not only 002.xml is used to update the container which runs the panorama).
Last edited by MacHeld on Mon Sep 10, 2012 7:38 pm, edited 1 time in total.
Grüsse,
Clemens
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
You can output each panorama with its own HTML page.
Then in the Hotspot Editor link to the HTML page.

This will then do as you require, there are downsides to doing this:
1 Can not maintain fullscreen going from node to node.
2 Will require a skin in every panorama, however you can externalise the skin so each node uses the same graphics as long as each node uses the same skin.

Regards,
Martin
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
MacHeld
Posts: 20
Joined: Wed Aug 15, 2012 11:26 am

actually I tried this and it yields to:
Error loading panorama XML

Tried:
- only file name.html
- full absolute path
- clearing browser cache
-> does always give above error message

When I enter the URL in the browser it works.
Grüsse,
Clemens
smooth
Posts: 1493
Joined: Sat Sep 09, 2006 7:30 pm

If you wish to link via URL to separate panoramas you must make each tour standalone in it's own directory/folder.

Test each panorama and make sure it works (alone) from it's own folder.

Link will then be via:

http://yourdomain.com/tours/1/index.html
http://yourdomain.com/tours/2/index.html
http://yourdomain.com/tours/3/index.html

Each of these tours will have it own .xml file within it's own directory/folder.

Regards, Smooth 8)
Image
Tong
Posts: 313
Joined: Fri Apr 13, 2012 9:30 pm

If you wish to link via URL to separate panoramas you must make each tour standalone in it's own directory/folder.
no

http://gardengnomesoftware.com/forum/vi ... 948#p28948
MacHeld
Posts: 20
Joined: Wed Aug 15, 2012 11:26 am

Ok, short recap for forum search function:

The following is valid for Pano2VR 4.0beta2

ok, what I understand so far:
  1. html links will work but there is no "session" handover (e.g. fullscreen mode)
  2. to make it work, I need a separate html file for each panorama
  3. instead of linking xml file, the html file must be used
I can live with 1+3 and for 2 my current layout is as follows:
location001
location002
location003
001_location.html
001_location.xml
002_location.html
002_location.xml
003_location.html
003_location.xml
skin

where location001-003 are directories (holding the images), skin is the directory for the shared skin and 00?_location.html/xml are the files generated for each location.

This does currently not work because of issue #536 (issue link does not work for me but might for somebody else).
as workaround I can patch the html files with something like
pano.startNode='node3';
Grüsse,
Clemens
smooth
Posts: 1493
Joined: Sat Sep 09, 2006 7:30 pm

Tong wrote:
If you wish to link via URL to separate panoramas you must make each tour standalone in it's own directory/folder.
no

http://gardengnomesoftware.com/forum/vi ... 948#p28948
That is not totally true. It is true if you are linking via a Hotspot "within the tour" it works perfectly fine if you are linking from outside of the tour via web buttons.
Somethings require a workaround.

You have never been able to "deep link" within the tour. If you need to offer a unique scene URL you will need to follow what I stated. Each in it's own directory/folder.

Deep linking is a feature we all would like to see introduced into Pano2VR.

Regards, Smooth 8)
Image
Tong
Posts: 313
Joined: Fri Apr 13, 2012 9:30 pm

well, it works for me, i use it. :D

ps: pro 4 verison, i made tour with this option with 43 panoramas with one xml and swf file and many html files that move user to specific panorama in tour, all files in one folder.
buddist_hram_vhod_0052.swf
buddist_hram_vhod_0052.xml
buddist_hram_vhod_0052.html
cerkov_blizko_6511.html
cerkov_seredina_5805.html
detskiy_park_ploshadka_6038.html
etc....
outside sime <a href link to specific panorama in tour via link to html file,
inside tour go to url with _self function, if needed.
Last edited by Tong on Mon Sep 10, 2012 8:24 pm, edited 1 time in total.
MacHeld
Posts: 20
Joined: Wed Aug 15, 2012 11:26 am

hmm, I'm now somewhat confused, I can not imagine what is the difference between placing all files into one directory or creating a directory for each
(I think as soon as you click the link, the other files can/are be referenced locally and at this point it should work, no matter where you are - different directory or not).

If there is anything, that stops deep linking, it should not be the fact, that I use different directories or not (given that all files which must be unique are unique).

With your post, is something I need to correct in my above post?
Grüsse,
Clemens
Tong
Posts: 313
Joined: Fri Apr 13, 2012 9:30 pm

hm, maybe some misunderstanding, but i don`t see problem in that at all

link to node3 in html file in tour

Code: Select all

<script type="text/javascript">
<!--
			var flashvars = {};
			var params = {};
			params.quality = "high";
			params.bgcolor = "#ffffff";
			params.allowscriptaccess = "sameDomain";
			params.allowfullscreen = "true";
			params.base=".";
			flashvars.startnode='node3';
			var attributes = {};
			attributes.id = "pano";
			attributes.name = "pano";
			attributes.align = "middle";
			swfobject.embedSWF(
				"http://sitename.com/tours/city/buddist_hram_vhod_0052.swf", "flashContent", 
				"100%", "100%", 
				"9.0.0", "expressInstall.swf", 
				flashvars, params, attributes);
//-->
		</script>
another html file with link to node2 in tour

Code: Select all

<script type="text/javascript">
<!--
			var flashvars = {};
			var params = {};
			params.quality = "high";
			params.bgcolor = "#ffffff";
			params.allowscriptaccess = "sameDomain";
			params.allowfullscreen = "true";
			params.base=".";
			flashvars.startnode='node2';
			var attributes = {};
			attributes.id = "pano";
			attributes.name = "pano";
			attributes.align = "middle";
			swfobject.embedSWF(
				"http://sitename.com/tours/city/buddist_hram_vhod_0052.swf", "flashContent", 
				"100%", "100%", 
				"9.0.0", "expressInstall.swf", 
				flashvars, params, attributes);
//-->
		</script>
node number is number of panorama in list, in 4pro tour in Tour Browser
MacHeld
Posts: 20
Joined: Wed Aug 15, 2012 11:26 am

Hmm ok - and this solves my original problem?

(linking within a panorana (html5 only) to a different panorama, and on clicking the hotspot, the html page gets reloaded with the new URL aka the URL changes)
Grüsse,
Clemens
Tong
Posts: 313
Joined: Fri Apr 13, 2012 9:30 pm

i think it will work, try it.

you make second file html, copy of first one, and add line pano.startNode='node2';
where node number of specific panorama in tour and then use hotspot with go to url with link to new html file that will open the same tour but different panorama and new url in adress line in browser, also use target _self

Code: Select all

	<body onorientationchange="hideUrlBar();">
		<script type="text/javascript" src="pano2vr_player.js">
		</script>
		<script type="text/javascript" src="skin.js">
		</script>
		<script type="text/javascript" src="pano2vrgyro.js">
		</script>
		<div id="container" style="width:100%;height:100%;">
		This content requires HTML5/CSS3, WebGL, or Adobe Flash Player Version 9 or higher.
		</div>
		<script type="text/javascript">
	
			// create the panorama player with the container
			pano=new pano2vrPlayer("container");
			// add the skin object
			skin=new pano2vrSkin(pano);
			// load specific panorama in tour
			pano.startNode='node3';
			// load the configuration
			pano.readConfigUrl("zoopark_vhod_6440.xml");
			// hide the URL bar on the iPhone
			hideUrlBar();
			// add gyroscope controller
			gyro=new pano2vrGyro(pano,"container");
			
		</script>
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Tong,
This is only for Pano2VR Pro which produces a single xml file for the complete tour.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
smooth
Posts: 1493
Joined: Sat Sep 09, 2006 7:30 pm

I think I'm also missing something here.

If you have to make multiple html files with specific node reference this is not deep linking. (At least not how I see it).

I would expect to point a URL address to any node from a single published tour.

Like:

http://yourdomain.com/tours/mytour/index.html#node3
http://yourdomain.com/tours/mytour/index.html#scene3
http://yourdomain.com/tours/mytour/index.html#pano3

Writing a html with a selected start node isn't the answer.

Regards, Smooth 8)
Image
MacHeld
Posts: 20
Joined: Wed Aug 15, 2012 11:26 am

What Tong said, does not work (unfortunately) but that seems to be logical as his approach seems to be quite different (one XML on multiple panoramas where I have one XML for each panorama).

It was mentioned above, that deeplinking never worked before (but that is what I'm currently trying, because I'm new and did not know better ;-) ).
Since all these problems I think I'm doing something that is not intended ?
Grüsse,
Clemens
Post Reply