You are not logged in.

myuhanna

Beginner

  • "myuhanna" started this thread

Posts: 31

Location: USA

Occupation: Professional Photographer

  • Send private message

1

Friday, January 22nd 2010, 6:06pm

Adding hotspots

Have Multiple panos.
Do i need to add hotspots code to each and every xml file? Is there a main xml file that can contain all the code for all the hotspots.
Please advise.
*confused*

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

2

Friday, January 22nd 2010, 7:06pm

the hotspots code must reside on xml for the pano you want it displayed in. if you set a hotspot on the primary xml and set keep="true" it will stay when moving to a new pano. it will show up in exactly the same spot as the first pano. if keep is set to false then it is valid only for that xml file.

myuhanna

Beginner

  • "myuhanna" started this thread

Posts: 31

Location: USA

Occupation: Professional Photographer

  • Send private message

3

Sunday, January 24th 2010, 12:05am

So what you are saying is i need to have the code in each XML file? If I have 10 panos does that mean i need to add the code to 10 xml(generated) files?
Is there an easier way perhaps? Or I have it misunderstood.
Thanks for responding.

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

4

Sunday, January 24th 2010, 4:48am

you may have misunderstood.

there are plugins and hotspots. plugins are based of screen coordiantes. hotspots are based on poalr coordiantes inside the pano. they each have a setting called "keep" if that is set to true you will not need the code on each xml. if that is set to false, ie will not be kept when changing panos, it would need to be declared in both xml's.

Tourvista

Intermediate

Posts: 258

Location: Leicester UK

  • Send private message

5

Wednesday, January 27th 2010, 11:28am

If you have, for example, a Zoom button (plugin) that you would like to keep in al your panoramas, write the following in the first panorama it's going to be loaded:

Source code

1
2
3
4
5
<plugin name="foo">
        ...
        keep="true"
        ...
</plugin>


If you would like to have a button (plugin) in every panorama, which does a different thing depending the room displayed, you need to write its code in every single xml file.

If there are different hotspots for every room, you have to edit every single xml file too. It is not the most efficient way but as far as I know that's the only way.
I need to do a research to avoid this, because in my last virtual tour I have to add 72 hotspots, and edit 31 different xml files. Like you , I would like to have all my hotspots in a single file ('hotspots.xml')

In order to have everything tidy I use the 'include' command

All my plugins code, actions, etc... are written in a file called 'plugins.xml
When I load a new room, the xml flie looks like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
<krpano version="1.0.8"> 

<include url="../plugins.xml"/>

<view></view>
<preview><preview>
<image></image>

...plugins...
...hotspots...

</krpano>


This include all the plugins.xml code in the panorama xml file

Hope this helps

Rafael

6

Wednesday, January 27th 2010, 11:35am

Hi,
If there are different hotspots for every room, you have to edit every single xml file too. It is not the most efficient way but as far as I know that's the only way.
to have all panos and all hotspots in one xml file - you coud use "scenes",
see here:
krpano 1.0.8 beta 7

put the content of the other xml files in <scene> tags,
and load the scene via loadscene() instead of loadpano(),

here is an example:
http://krpano.com/examples/108b7/examples/scenes/scenes.html

and here the xml for it:
http://krpano.com/examples/108b7/examples/scenes/scenes.xml

best regards,
Klaus

Tourvista

Intermediate

Posts: 258

Location: Leicester UK

  • Send private message

7

Wednesday, January 27th 2010, 12:45pm

Hello Mr. K!

Since weeks, I've had a post-it in my desk to remind me to take a look to the 'scene' command *rolleyes*

Last interface I've done was quite complicated, involving several 'addplugin' 'if' and 'onstart' and loads of 'action' commands...

EXAMPLE

I'm going to make a cup of tea and spend some time reading latest krpano new features. Scene command looks promising, but also I need to learn more about the use of variables, operators and kprotect Tool.

Really thank you for all your hard work Klaus!

This post has been edited 1 times, last edit by "Tourvista" (Jan 27th 2010, 1:23pm)