You are not logged in.

Dear visitor, welcome to 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.


Monday, March 27th 2017, 1:34pm

Controlling pano from another window


it's an interesting fact that you can control your pano from another window. That of course requires that you are in an environment where you can show more that one window.

I made this little "remote controller" as a test.

Test page:
Zip file:




Posts: 509

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message


Monday, March 27th 2017, 2:15pm

Great tool Tommy !! step beyond 360


Tuesday, March 28th 2017, 9:17am

That´s frickin awesome *thumbsup*


Tuesday, March 28th 2017, 10:53am

Well, it's the power of a Javascript interface...



Monday, April 3rd 2017, 3:52am

좋은 ~, 고마워 ~~


Monday, April 3rd 2017, 10:20am


좋은 ~, 고마워 ~~

I agree - eh, I think...



Posts: 279

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message


Monday, April 3rd 2017, 12:26pm




Posts: 509

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message


Monday, April 3rd 2017, 4:04pm

Would be nice to do it from another device ;) step beyond 360


Monday, April 3rd 2017, 4:59pm

Hi Jordi,

I gave it some thought earlier, but I'm not an expert at these things. As long as you keep your communication inside the browser, you can use the DOM (or BOM) tree.

But I think as soon as you want to communicate outside the browser, you have to use something like a Web socket. However, these communicate with an URL, so you probably have to go through a web server application - or maybe something like how Internet gaming works.




Posts: 509

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message


Wednesday, April 5th 2017, 11:58am

Yes exactlly is about web sockets, just like a chat step beyond 360


Thursday, April 6th 2017, 9:40am

So if I understand that correctly, we could establish a JS-connection between two krpano-instances via websocket?! One instance would send the js-commands to the node.js-server and the other instance receives these commands, just like it does in Tommys example? And just like a simple chat-system the node.js-server could even be used for a two way-communication where the second krpano-instance returns permanently the actual scene-status like ath, atv and fov? *blink*


Friday, April 7th 2017, 2:03am

Yes, the two (or several) instances would open a websocket connection to the server application, which only acts as a transfer node between the instances. If all of them are krpano instances, I guess it would be wiser if one is the master and the other slaves - at least if you want to coordinate pano movement.

And you would probably prefer to have an Apache module in your webserver to get quick response, but my own homepage is in a web-hotel, so I don't have that possibility. On the other hand, I run an Apache server in my home PC, but I have forgotten how to write an Apache module.

In the meantime, I made another test page, where you can see that it's possible to control two separate panos with the same remote control:


Friday, April 7th 2017, 8:49am

Great example, Tommy...again *thumbsup*
Would it be possible within your example to control the second pano not with the tool but the ath, atv and fov-values from the first pano?

We really need an websocket/Apache-expert here! This is just to darn good not to be done *g*


Friday, April 7th 2017, 11:30am

You can of course always trap all movements in the first pano with the "onviewchange" event, and then send it with javascript to the second pano. But I can't find any way to stop all mouse or keyboard input for moving the second pano directly. I thought I could do it when I found the stopmovements() command, but this only interrupts already ongoing movements. Maybe you can place a transparent <div> over the pano window to prevent any mouse action.



Friday, April 7th 2017, 1:04pm

Just putting a transparent layer above all in the 2nd krpano-instance would be my first choice, because it´s simple and effective! And with the zorder it´s even possible to put some buttons in top of that, to activate or deactivate direct user input. That´s how I de- and reactivate all user inputs after starting the "Autotour" in my virtual tours.