You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, November 16th 2011, 4:51pm

How to link to a pano.xml from an existing map

The picture shows the content of a Virtual Tour folder: usually I create only one HTML file and it is the index.html. Each pano is just an xml file and its tile folder.



My client has already its own map so it needs only the links to each pano.
I know how to do this but I don't want to give an html for each pano, I just want to give the list of panos with the combobox plugin and yet let the possibility to start from any pan.

- Is this doable on a single html file?
- Is it possible to create a link to each pano.xml from an existing map using only a single html?

If I got it right, I have to prepare all the pano.xml file.
Inside each pano.xml I have to put an "include url" to the global.xml, with navigation buttons, combobox list…
They don't need any html from me: they have to use their own html and map.
But, at least, I have to give them instructions on how to link to each pano.xml. Could someone help on this, please?

Also, everything should work also on iphones/ipads: does combobox work on iphones/ipads?
I still don't have such license. Do I just need to buy it and everything is, as usual, automatic?
Thanks in advance,

Marco
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

2

Wednesday, November 16th 2011, 11:36pm

try linking like this:

Source code

1
2
3
4
5
index.html?xml=villaflora1.xml&

index.html?xml=villaflora2.xml&

index.html?xml=villaflora3.xml&


you can even direct to a certain view:

Source code

1
index.html?xml=villaflora1.xml&view.fov=40&view.vlookat=90&view.hlookat=40

3

Sunday, November 20th 2011, 7:21pm

I tried to copy and paste the address to a specific pano on the address bar but doesn't work:

http://www.marcolanciani.com/villaflora/…illaflora2.xml&

It just goes to the first pano.
Am I doing something wrong?
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

4

Sunday, November 20th 2011, 9:37pm

try:

Source code

1
2
3
4
 var viewer = createPanoViewer({swf:"krpano.swf",target:"pano"});
 viewer.addVariable("xml", "index.xml");
viewer.passQueryParameters();
  viewer.embed();


in your html, instead of embedpano({swf:"index.swf", xml:"index.xml", target:"pano"});

I thought with the new method, passQueryParameters(); , was automatic

5

Sunday, November 20th 2011, 11:54pm

I copied your code but doesn't work. Am I doing something wrong?

using the following link I'm still pointed to the first pano:
http://www.marcolanciani.com/villaflora/…illaflora2.xml&
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

6

Monday, November 21st 2011, 11:18am

hmm then im out of ideas.

This code:

Source code

1
2
3
4
5
6
7
8
9
10
11
<script type="text/javascript" src="assets/swfkrpano.js"></script>

<script type="text/javascript">
	var swf = createswf("krpano.swf", "krpanoSWFObject","100%", "100%", "#000000");
	swf.addVariable("xml", "pano/photo_start.xml");
	swf.addParam("wmode", 	"window");
	swf.addParam("allowfullscreen", "true");
	swf.addParam("allowscriptaccess", "always");
	swf.passQueryParameters();
	swf.embed("krpano");
</script>


works perfectly for my Game example. It uses an older krpano version though

Tuur

Sage

Posts: 3,825

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

7

Monday, November 21st 2011, 12:02pm

or do you mean like:

http://www.suncamp.nl/flash/360/camping/…view.fovmax=90&

P/suncamp10b11.swf is the path to the swf

?pano=../104881/local/14.xml is the path to the xml of that pano relative to the swf

wich is one of the pano's from :

http://www.suncamp.nl/flash/360/camping/104881/it

I believe you can use the swf adres plugin to use also the interface for this purpose..

Tuur *thumbsup*

This post has been edited 1 times, last edit by "Tuur" (Nov 21st 2011, 12:21pm)


Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

8

Monday, November 21st 2011, 12:22pm

You dont have to link in to the swf. Passing them to index.html would pass through the swf. If you pass it to the swf directly, you'll miss the html design around it.

SWFAddress/JSAddress just translates ?xml=test.xml to #/test but in the backend it does exactly the same. It only looks nicer and its easier to remember for clients

http://www.marcolanciani.com/villaflora/villaflora2.xml does not exist btw...

9

Monday, November 21st 2011, 2:12pm

I decrypted the files...

You didn't see the xml files because they were embedded.
Does this mean that going to a specific pano.xml doesn't work with encrypted files?
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

10

Monday, November 21st 2011, 2:48pm

Not sure... Perhaps if you enabled javascript in krprotect.

11

Monday, November 21st 2011, 2:54pm



This is all I do in krprotect...
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

12

Monday, November 21st 2011, 3:28pm

then im not sure... I dont have much experience with krprotect/embedded tours.

you could enable the logkey so you'll see what error you get.

add in a xml thats add in every location something like this:

<krpano logkey="true">

you then can press o in the tour. Perhaps it wil say something about file not found...

13

Monday, November 21st 2011, 7:54pm

I added the log key but no errors.

You do can test.
I think the only solution for now is to provide a pano.html file for each pano.xml.

But I hope to find a cleaner solution.
Thanks again for the support.
Marco
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

14

Monday, November 21st 2011, 8:56pm

I don't know :(

I just made a test with the latest krpano version.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script>

	var viewer = createPanoViewer({swf:"krpano.swf", id:"krpanoSWFObject", target:"krpanoDIV"});
	
	//viewer.useHTML5("whenpossible");		// uncomment to use the HTML5 krpanoJS viewer always when possible (Safari5)

	if( viewer.isDevice("iPhone|iPod|Android") )
		viewer.addVariable("xml", "krpano_mobile.xml");
	else
		viewer.addVariable("xml", "krpano.xml");

	viewer.passQueryParameters();
	viewer.embed();

</script>


this is all I need, the view.isDevice etc is not nessesary. the passQueryParameters would be enough. The only thing I can think of is that somehow your .htaccess rewrites the part of the url

15

Thursday, April 26th 2012, 12:32am

New Virtual Tour, Same Problem

Here's my new VT:

http://www.marcolanciani.com/bioparco/

the global XML is index.xml and then all the panos, that is index1.xml, index2.xml, index3.xml...

1)
Let's say I want to link directly to the pano index5.xml... I tried the following link:

http://www.marcolanciani.com/bioparco/in…xml=index5.xml&

but doesn't work. Any solution?

2)
Also, I'm using an 800px wide map because it seems a fair compromise for all screen sizes but how to fit the map, at the same time, into the iphone LCD?

Thanks in advance,
Marco

16

Friday, April 27th 2012, 2:15pm

It seems as

index.html?xml=index5.xml&

works only when I "include" the index.xml (which is the "global" file) in the index5.xml (or index2.xml or index7.xml, which are the "pano" files)... but Virtual Tours with more than 1 pano works the other way: a global.xml that "include" only the first pano.xml and this is also my case.

Any solution to link directly to any pano just writing the address url?
Marco

17

Sunday, April 29th 2012, 2:44am

Any Idea? No one?
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

18

Tuesday, May 1st 2012, 11:59am

try

?xml=global.xml&scene=test_scene

I'm not sure. What I normally do is, create a photo_1.xml with basic image,preview and hotspots information. And let that xml include a global.xml. that way every photo has the same global.xml. then the xml=photo_1.xml works.

You could alsoo buy the SWFAdress plugin. You then have cleaner urls, and alsoo more control what happens when a url changes. http://krpano.com/plugins/userplugins/swfaddress/

19

Tuesday, May 1st 2012, 1:28pm

I still don't use scenes but I'll try: I think it might work with everything in the same xml.

I already tried the demo of swfaddress: doesn't work in my case. It works only when including the global.xm in each pano.xml. same thing for the string you suggested on a previous post of this thread. Something like:

index.html?xml=index5.xml&

Meanwhile, looking for a solution I've found this page:

http://krpano.com/examples/10814/example…nk/getlink.html

So I copied the javascript code into my html file and started a new thread with this new request:

Get a link to current pano and view

But I think it doesn't work either.
Marco

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

20

Tuesday, May 1st 2012, 2:31pm

Can you explain how your xml structure looks like?

Do you start with global.xml (xml with settings) which include index1.xml (xml with the photo information), and then do a MERGE loadpano to load index2.xml?

In this case, it wouldnt work nicely. I think this is Panotour pro's output if I remember correctly (they have a weird file structure imho). The problem is, when you load index2.xml, it will miss the global settings. You could try to load global.xml and as soon it's loaded, load index2.xml, but it wouldve already loaded index1.xml too (since it got included in global.xml). How you would make it work in this example, I don't know. I think you can call actions from within a url, but I forgot the syntax

If you include global.xml inside of index1.xml, index2.xml, etc then the first suggestion should work, since every photo would load the global.xml
This is the structure krpano uses in it's examples.