Skip to content Skip to sidebar Skip to footer

Detect When Google Earth Plugin Crash

There is a way to detect from javascript if the google earth plugin is crashed, so I can reload automatically the page without user action? Thanks

Solution 1:

I don't think you can directly assess whether the plug-in has crashed. However, you could set up an endless timer that is constantly checking something like getView()

functionhasCrashed() {
     try {
          var view = ge.getView();
          if (view) {
          // plugin good
          } else {
          // plugin not good
          }
     } catch (e) {
         // plugin not good
     }
     // a timer that checks every secondsetTimeout('hasCrashed()', 1000);
}

I haven't tested that, but it should work. If not, try other options besides from getView() - perhaps getWindow() or getGlobe() options

Post a Comment for "Detect When Google Earth Plugin Crash"