I'm working on a very specific use case for a single pano (at this stage, more panos down the track) and in this use case the XML files are being blocked from loading. I'm wondering if it is possible to put all the XML data (which is pretty minimal) directly into the main HTML file?
Is it possible to not use XML files?
-
-
Yes, it is possible
you can do like this :
Codevar your_xml = "<krpano><preview type='grid()'/></krpano>'; embedpano({xml:null, target:"pano", onready:function(krpano) { krpano.call("loadxml(" + escape(your_xml) + ")"); }});
from that post
-
Hi,
yes, and by using the loadpanoimage() action:
https://krpano.com/docu/actions/#loadpanoimageit's even possible to avoid any xml-file or xml-string usage.
Here an example for loading a multires flat-pano:
Codekrpano.image.reset(); krpano.image.flat = { url : "tile_%l_%v_%h.jpg", multires : "512,1024x512,2048x1024,4096x2048" }; krpano.actions.loadpanoimage('MERGE','BLEND(0.5)',function() { console.log('load call done'); });
Best regards,
Klaus
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!