Sie sind nicht angemeldet.

1

Dienstag, 9. September 2014, 22:06

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

Hello.

In the .xml file I wrote:

Zitat

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

Zitat

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

2

Dienstag, 9. September 2014, 22:35

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

Hope it helps
Tuur *thumbsup*

3

Mittwoch, 10. September 2014, 06:33

Hello Tuur.

Unfortunately it does not help. Somehow it does nothing.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »cvisto« (10. September 2014, 06:50)


Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

4

Mittwoch, 10. September 2014, 10:28

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

Tuur *thumbsup*

5

Mittwoch, 10. September 2014, 11:09

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

6

Mittwoch, 10. September 2014, 16:58

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

Tuur *thumbsup*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tuur« (10. September 2014, 18:42)


7

Mittwoch, 10. September 2014, 22:23

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

Dienstag, 16. September 2014, 07:15

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

Donnerstag, 18. September 2014, 18:36

Hi,

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

e.g. like this:

Quellcode

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