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

Tuesday, February 20th 2018, 11:34am

Unloading a krpano instance (the removepano function)

Sorry if I'm missing something obvious here, but I'm trying to unload/destroy a krpano instance using the removepano function, but "removepano" appears to be undefined, even after krpano has set itself up.

I wondered if it was supposed to accessed on the element itself (eg, document.getElementById("krpanorv").removepano()) but that doesn't seem to work either.

Is the documentation on this outdated, or am I doing something stupid?

Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Tuesday, February 20th 2018, 12:09pm

Hi!
This one works for me:

Source code

1
<script>			embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", id:"pano1", html5:"auto", mobilescale:1.0, passQueryParameters:true});						removepano("pano1");		</script>
Regards,

Alexey

3

Tuesday, February 20th 2018, 12:32pm

Thanks Alexey, your code pointed me in the right direction!

Weirdly, my krpano.js file had the krpano HTML5 Viewer without the krpano Embedding Script - which is why both embedpano (I was using embedpanoJS) and removepano weren't defined. I added the script back in and it's now working perfectly.

Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Tuesday, February 20th 2018, 12:42pm

Embedding script is usually inside the 'tour.html' file. (if you use standard KRpano tools)
Regards,

Alexey

5

Tuesday, February 20th 2018, 12:54pm

That's probably why! We don't use the default tools any more and we've built on top of the krpano embed process so much over the years that I'm guessing that part of the script got lost along the way somewhere.

Thanks again for your help.