Javascript access to hotspots

  • Hello

    I am trying to access hotspots in my panos using javascript. Specifically I want to pull out the 'pic' attribute for every hotspot in the current pano. This implementation is being used for a phonegap iOS app. I have tried using ajax to pull the information

    This did not work, for some reason it can not get past the "$(xml).find('scene').each(function(){" line. I think ajax would be the best method for me to access the data and keep it organized.

    I have looked into using the 'get' method on the krpano object

    Code
    var kr = document.getElementById("krpanoSWFObject");
    					var newscenename=kr.get('scenename');
    					alert(newscenename);
    					for (var i=0;i<350;i++){
    						var newhotspotname=kr.get('pic');…

    But my attempts to use this have also been unsuccessful. I get a 'TypeError: Object #<HTMLEmbedElement> has no method 'get'' when testing in chrome.

    Does anyone have advice about how to get one of these methods working or an alternate method of pulling the data?

    Thank you in advance for any help.

  • Hi,

    I get a 'TypeError: Object # has no method 'get'' when testing in chrome.

    When getting this error then there can be normally only two reasons:

    • you are either using the Flash viewer locally (there the Flash security doesn't allow access),
    • or the Javascript Interface was disabled (e.g. in the krpano Protect Tool)...


    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!