Source/DataSources/KmlTour.js
// This function is called recursevly with playNext and iterates over all entries from playlist.
This function is called recursevly with playNext and iterates over all entries from playlist.
This function is called recursevly with playNext and iterates over all entries from playlist .
function playEntry(viewer, cameraOptions, allDone) {
  var entry = this.playlist[this.playlistIndex];
  if (entry) {
    var _playNext = playNext.bind(this, viewer, cameraOptions, allDone);
    this._activeEntries.push(entry);
    this.entryStart.raiseEvent(entry);
    if (entry.blocking) {
      entry.play(_playNext, viewer.scene.camera, cameraOptions);
    } else {
      var tour = this;
      entry.play(function () {
        tour.entryEnd.raiseEvent(entry);
        var indx = tour._activeEntries.indexOf(entry);
        if (indx >= 0) {
          tour._activeEntries.splice(indx, 1);
        }
      });
      _playNext(viewer, cameraOptions, allDone);
    }
  } else if (defined(allDone)) {
    allDone(false);
  }
}
function playEntry ( viewer , cameraOptions , allDone ) { var entry = this . playlist [ this . playlistIndex ] ; if ( entry ) { var _playNext = playNext . bind ( this , viewer , cameraOptions , allDone ) ; this . _activeEntries . push ( entry ) ; this . entryStart . raiseEvent ( entry ) ; if ( entry . blocking ) { entry . play ( _playNext , viewer . scene . camera , cameraOptions ) ; } else { var tour = this ; entry . play ( function ( ) { tour . entryEnd . raiseEvent ( entry ) ; var indx = tour . _activeEntries . indexOf ( entry ) ; if ( indx >= 0 ) { tour . _activeEntries . splice ( indx , 1 ) ; } } ) ; _playNext ( viewer , cameraOptions , allDone ) ; } } else if ( defined ( allDone ) ) { allDone ( false ) ; } }
This function is called recursevly with playNext and iterates over all entries from playlist.
This function is called recursevly with playNext and iterates over all entries from playlist .