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

Friday, March 22nd 2019, 12:38pm

Show H/V coordinates of a pano in the 'parent' web page?

I'd really like to be able to obtain the current H and V view coordinates of a scene, so I can do something with them 'outside' of the actual KRPano panorama. For example, someone looks around a scene, and the H and V values of their current point of view are displayed in a field elsewhere in the web page, outside the panorama.

Is this possible? It could be either on a user-invoked trigger (clicking a button to fetch the values) or as a constant feed of the values as someone looks around. I can deal with what happens next, if it's possible... but if anyone has suggestions for how to try this I'd love to hear them!

Keith

Tuur

Sage

Posts: 3,186

Location: Netherlands

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

  • Send private message

2

Friday, March 22nd 2019, 1:53pm

Hi Keith,

Here a simple example.

http://www.virtualtuur.com/krpano/html_panonumbers/1/

krpano xml:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
    <events name="ShowViewInHtml" keep="true" onviewchange="DoNumbers();" />
    
    <action name="DoNumbers" type="Javascript" devices="html5">
    <![CDATA[
        var h = krpano.get("view.hlookat");
        var v = krpano.get("view.vlookat");
        var f = krpano.get("view.fov");
        
        document.getElementById("showhlookat").innerHTML = "Hlookat = " + h; 
        document.getElementById("showvlookat").innerHTML = "Vlookat = " + v; 
        document.getElementById("showfov").innerHTML = "FOV = " + f;  
        
    ]]>
    </action>


html:

Source code

1
2
3
4
5
                        <div id="showhlookat"></div>
                        <br>
                        <div id="showvlookat"></div>
                        <br>
                        <div id="showfov"></div>


Hope it helps,

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

3

Friday, March 22nd 2019, 4:38pm

or the other way around,
from outside of krpano simply do:

Source code

1
2
3
var krpano = document.getElementById("krpanoSWFObject");
console.log("view.hlookat=" + krpano.get("view.hlookat"));
console.log("view.vlookat=" + krpano.get("view.vlookat"));


as klaus always embarrasses me ... its all in the docs :))
https://krpano.com/docu/js/#top

4

Wednesday, April 17th 2019, 11:50am

Flat panorama

and flat pano?
Thanks
Suso

Tuur

Sage

Posts: 3,186

Location: Netherlands

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

  • Send private message

5

Wednesday, April 17th 2019, 12:47pm

Did you try?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

6

Wednesday, April 17th 2019, 7:01pm

Hi Tuur

I try to click on a menu item the panorama navigate to the selected hotspot from the menu



http://www.mellor.es/lagoa/


For example, from the menu click "Museo das aves" show in the center of the panaroma this hotspot


Thanks
Suso

Tuur

Sage

Posts: 3,186

Location: Netherlands

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

  • Send private message

7

Thursday, April 18th 2019, 12:18pm

Hi,

good to see you use my ToolBox *thumbup*

When you zoom in a bit and place that hotspot in the center, the toolbox gives you:

hlookat="-0.22792269220822176" vlookat="0.04182374726934495" fov="0.35086650680667203"

now you could do from combobox onclick like lookto(blabla....
https://krpano.com/docu/actions/#lookto

And i suppose an onclick on the hotspot could be convenient as well to visit it ;-)

Hope it helps,
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

8

Friday, April 19th 2019, 12:32pm

Yes, Toolbox is a very useful tool, it is a great contribution on your part, so we should all be very grateful. Thank you very much tuur Great job!!

Best
Suso