FIXED:defaultview node not working
Submitted by samirme on February 10, 2005 - 23:47.
Hi there,
The <Defaultview> tag is somehow not doing anything!
Can you please show the proper use of it, the how to article does not work!
PS. I am trying to use it along with a global camera limit tag.
Attempt 1:
<scene id="hattan01">
<panoelement id="hh01_pano">
<defaultview pan="90" tilt="70" fov="90" />
Attempt 2:
<scene id="hattan01">
< M e t a >
<defaultview pan="90" tilt="70" fov="90" />
< / M e t a >
<panoelement id="hh01_pano">
Any help will be greatly appreciated!
Sam
fieldOfView | SPi-V dev
Looking into it
The second attempt should work (though meta should be written with a lowercase m and no spaces, but I think you may have been fighting the SPi-V dev filtering system there... Sorry about that).
Under certain conditions the cameralimits node will not work either. I will look in to it next week.
Fixed in 1.2.7
The issue was fixed in SPi-V 1.2.7 which will be released later this week
Spi-V 1.2.11b defaultview broken?
Hello Aldo
I've tried to set a defaultview for a 2-node panorama. Should take effect when changing to 'other' node.
My XML code-snippet for node2:
<M e t a><defaultview pan="180" tilt="70" fov="90" />
<cameralimits tiltmin="-60" tiltmax="200" fovmin="46" fovmax="120" />
</M e t a>
Tried different variations with no luck.
The URL is: http://bernie.x-net.at/ebensee/page02.html
Is the bug in the code or in my brain?
The bug is in *my* brain
The bug is sort of in my brain, let me explain...
The idea is that when you switch to another scene using a setview action, you specify the view in the setview action (I really have to write these things down in the docs section):
If you do not specify a pan/tilt/fov in the setview action, these values are kept at what they are when you click the element. If you keep a consistent orientation of your scenes (eg: north facing to pan=0), you don't have to specify pan/tilt/fov values.
The defaultview node in the global section of a tour is used to set the initial view and scene of the tour. But then what does a defaultview node do for a normal scene? See, that's where my brain is buggy.
I will probably implement the defaultview node for scenes as follows: If no pan/tilt/fov is specified in the setview action, the viewer will see if it can get these values from the defaultview of the scene. If the scene has no defaultview, it will keep the pan/tilt/fov values as they are. Though this sounds logical I realise it will be of little use. This will not work of there is more than one hotspot leading to a single scene; logically you would want to use different entry views for different entries into the scene...
To make a long story short, use the pan/tilt/fov attributes of the setview action as outlined above.
defaultview in global
I wrote this code (I deleted "<" because browser doesn't allow me to use them - last time I wrote that function CODE doesn't work in this Forum)
tour>
global>
m e t a>
title>TITLE /title>
defaultview scene="scene4" pan="10" tilt="10" fov="90">
/meta>
.............
.............
scene id="scene4">
meta>
cameralimits
panmin="-180" panmax="180"
tiltmin="-44" tiltmax="44"
fovmin="10" fovmax="60" />
/meta>
panoelement id="pano"................
and it doesn't work.
I have a message in viewer:
Error parsing XML; unexpected end of XML string, open tags: defaultview meta global tour
I want to set the scene4 as the first one with defined pan and tilt.
malformed xml
The error you're getting means that you forgot to 'close' the defaultview tag.
Instead of
<meta><defaultview scene="scene4" pan="10" tilt="10" fov="90">
</meta>
you need to write
<meta><defaultview scene="scene4" pan="10" tilt="10" fov="90" />
</meta>
Notice the / at the end of the defaultview tag. In XML you HAVE to close a tag, either by doing something like <tag> ... </tag> OR by closing the tag by itself: <tag />
/ missing in nodes specification
Aldo,
please have a look on Nodes Specification:
http://fieldofview.nl/spv-dev/docs/nodes/defaultview
there is no "/"
Now it works....thanks.