You are not logged in.

1

Tuesday, September 9th 2014, 10:06pm

limitview value changes to "auto" after loadpano() call

Hello.

In the .xml file I wrote:

Quoted

<view fovtype="MFOV" fov="90" fovmin="100" fovmax="100" limitview="fullrange" vlookatmin="0" vlookatmax="0" />
then after loadpano call

Quoted

loadpano(kgen.php?sv=01,null,merge,blend(0.7));
view.limitview becomes "auto" and view.vlooatmin="-90" and view.lookatmax="90".

Why is it so? How to save startup values?

This is xml content that kgen.php returns:

<krpano>
<mapspot pano="01" title="01" lat="50.00116782" lng="8.65180569" heading="122"/>

<preview url="%$tilespath%/01.tiles/preview.jpg" />

<image type="CUBE" multires="true" tilesize="512" progressive="false">
<level tiledimagewidth="2608" tiledimageheight="2608">
<cube url="%$tilespath%/01.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
</level>
<level tiledimagewidth="1304" tiledimageheight="1304">
<cube url="%$tilespath%/01.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
</level>
<level tiledimagewidth="652" tiledimageheight="652">
<cube url="%$tilespath%/01.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
</level>
<mobile>
<cube url="%$tilespath%/01.tiles/mobile_%s.jpg" />
</mobile>
</image>

<hotspot name="spot3" style="hs_arrow" direction="154" linkedpano="02" description="" imagetype="normal"/>
<hotspot name="spot1" style="hs_arrow" direction="142" linkedpano="03" description="" imagetype="sequence"/>
<hotspot name="spot2" style="hs_arrow" direction="115" linkedpano="04" description="" imagetype="sequence"/>

</krpano>

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

2

Tuesday, September 9th 2014, 10:35pm

Look here.
http://www.krpano.com/docu/actions/#loadpano
I think a combination like MERGE|KEEPVIEW will do.

Hope it helps
Tuur *thumbsup*

3

Wednesday, September 10th 2014, 6:33am

Hello Tuur.

Unfortunately it does not help. Somehow it does nothing.

This post has been edited 1 times, last edit by "cvisto" (Sep 10th 2014, 6:50am)


Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

4

Wednesday, September 10th 2014, 10:28am

Did you try to put the view also in the xml that you copied in the first post?
that should work.

Tuur *thumbsup*

5

Wednesday, September 10th 2014, 11:09am

Yeah, and tried to avoid that because I want that settings be set in main xml file so customer can set it.

Solved the problem by setting values in onnewpano event.

Thanks.

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

6

Wednesday, September 10th 2014, 4:58pm

Smart!
You could mayba also use KEEPBASE..(?)
edit:.. i think maybe not .. haha

Tuur *thumbsup*

This post has been edited 1 times, last edit by "Tuur" (Sep 10th 2014, 6:42pm)


7

Wednesday, September 10th 2014, 10:23pm

Hi,

it's an intended behavior that the view setting will be set back to default for each pano.
That means each pano would need to define also it's viewing limits.

This behavior is necessary, otherwise it wouldn't be possible to switch between panos with different viewing limitation settings.

Best regards,
Klaus

8

Tuesday, September 16th 2014, 7:15am

Hi.

I understand that. In this case maybe you can include setting (like KEEPVIEWLIMITS) to loadpano function that will control how view limits are set: from new pano settings or are kept without any changes

9

Thursday, September 18th 2014, 6:36pm

Hi,

one possibility would be using a custom loadpano/loadscene action that would save and restore the viewing limits,

e.g. like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<action name="loadscene_keepviewlimits">
  copy(backup_limitview, view.limitview);
  copy(backup_hlookatmin, view.hlookatmin);
  copy(backup_hlookatmax, view.hlookatmax);
  copy(backup_vlookatmin, view.hvookatmin);
  copy(backup_vlookatmax, view.vlookatmax);
  copy(backup_hlookat, view.hlookat);
  copy(backup_vlookat, view.vlookat);
  loadscene(%1, null, MERGE|KEEPVIEW, BLEND(1));
  copy(view.limitview, backup_limitview);
  copy(view.hlookatmin, backup_hlookatmin);
  copy(view.hlookatmax, backup_hlookatmax);
  copy(view.vlookatmin, backup_vlookatmin);
  copy(view.vlookatmin, backup_vlookatmax);
  copy(view.hlookat, backup_hlookat);
  copy(view.vlookat, backup_vlookat);
</action>


Best regards,
Klaus