how to get loadpano to load a new xml completely? and a bug found it looks like.

  • It looks like loadpano won't ever call your <krpano onstart="" code...
    Seems like there should be a parameter for loading a new xml clean.
    also loadpano can not remove any plugins that were added with addplugin.
    I tried ignorekeep, null etc,, and all my xml thumbnails were still there from the last xml.
    For now it looks like the best way is openurl instead.
    *cry*

  • wouldnt keep="false" prevent the xml thumbs from carrying into the next pano?

    or

    couldnt you also set a variable in the plugins you want removed then use the remove plugin looping code to take them out?

    i currently use the onstart with loadpano to do the second option in certain tours but i have not upgraded to the newest krpano verison yet so maybe it is broken now.

  • The thumbs are tour/XML specific. Basically I was try to load a completely new tour without a page refresh. It looks like loadpano can't remove dynamically added plugins. For onstart I guess I can program around it. I don't know why load Pano can't run the new onstart but oh well.

  • Hi,

    the onstart will be only executed when there are no addtional calls after the loadpano() call,
    see the notes here:
    https://krpano.com/docu/actions/#loadpano

    but when loading new panos the removing of plugins or hotspots, regardless if defined statically or added dynamically should work,
    are you maybe adding the hotspots in a global event? (note - the events will be kept set),

    the krpano.xml in the main folder in the viewer download package contains an example for loading complete new xml files - see there the back button and "resetkrpano" action code,

    best regards,
    Klaus

  • I think the main problem is that for professional plugins, they set variables. Number of items, whether it's been completed etc.
    So upon loading a new XML, all these custom variables are STILL set, so previous plugins, might be RECREATED, based on settings from a previous XML.
    Is there a way to CLEAR out all previously set variables?

    Also, the below first example does NOT work per documentation. There are no additional commands after loadpano. No worries, I worked around it with a delayed call. So the only issue now, is how to remove, reset krpano to "factory defaults"...
    without going through a series troubleshooting session, to see which variables need to be RESET to null.

    <hotspot name="arrow1124c" ... ondown="fade_hotspots(get(name),0,1,default,WAIT);looktohotspot(get(name),42);loadpano(204,null,IGNOREKEEP,ZOOMBLEND(1,10));" ... />

    <hotspot name="arrow1124d" ... ondown="fade_hotspots(get(name),0,1,default,WAIT);looktohotspot(get(name),42);delayedcall(0.1,loadpano(204,null,IGNOREKEEP,ZOOMBLEND(1,10)));" ... />

  • For example,

    <thumbnails name="thumbs1" width="750" edge="leftbottom" align="leftbottom" x="35" y="-6" thumb_width="135" thumb_height="60" thumb_margin="12" frame_width="151" frame_height="72" folow_mouse="false" skin_url="%SWFPATH%/skin/" thumb_url="http://www.seeit360.com/files2/imagecache/krpanothumb" scroll_speed="2" visited_auto="false" >
    <thumb name="tn1" url="/volcanbaru360_001.jpg" onclick="loadscene(get(scene[0].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - Expedition sart from Cerro Punta', buttonstyle);" />
    <thumb name="tn2" url="/volcanbaru360_003.jpg" onclick="loadscene(get(scene[1].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - First Overlook', buttonstyle);" />
    <thumb name="tn3" url="/volcanbaru360_002.jpg" onclick="loadscene(get(scene[2].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - Halfway Point ', buttonstyle);" />
    <thumb name="tn4" url="/vp11.jpg" onclick="loadscene(get(scene[3].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru Summit', buttonstyle);" />
    <thumb name="tn5" url="/volcanbaru360_005.jpg" onclick="loadscene(get(scene[4].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - Summit After Sunrise', buttonstyle);" />
    </thumbnails>

    would supposed to be overwritten by a new one but instead, they only replace the first two in the array, I'm assuming..
    I don't think there is a solution here except for using unique names for every single xml.

    <thumbnails name="thumbs1" width="750" edge="leftbottom" align="leftbottom" x="35" y="-6" thumb_width="135" thumb_height="60" thumb_margin="12" frame_width="151" frame_height="72" folow_mouse="false" skin_url="%SWFPATH%/skin/" thumb_url="http://www.seeit360.com/files2/imagecache/krpanothumb" scroll_speed="2" visited_auto="false" >
    <thumb name="tn1" url="/cerro_brujo.jpg" onclick="loadscene(get(scene[0].name),null,MERGE,BLEND(1));" onhover="showtext('Cerro Brujo Gourmet', buttonstyle);" />
    <thumb name="tn2" url="/cerro_brujo2.jpg" onclick="loadscene(get(scene[1].name),null,MERGE,BLEND(1));" onhover="showtext('Cerro Brujo Gourmet: Exterior', buttonstyle);" />
    </thumbnails>

    I also just tried nesting these INSIDE the SCENE. But it still did not prevent the data from existing beyond its scope.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!