load() {
    if (this.state == ImageState.IDLE) {
      this.state = ImageState.LOADING;
      this.changed();

      const sourceState = this.sourceImage_.getState();
      if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {
        this.reproject_();
      } else {
        this.sourceListenerKey_ = listen(
          this.sourceImage_,
          EventType.CHANGE,
          function (e) {
            const sourceState = this.sourceImage_.getState();
            if (
              sourceState == ImageState.LOADED ||
              sourceState == ImageState.ERROR
            ) {
              this.unlistenSource_();
              this.reproject_();
            }
          },
          this
        );
        this.sourceImage_.load();
      }
    }
  }
/**
   * Load not yet loaded URI.
   */
Load not yet loaded URI.
Load not yet loaded URI .
load() {
    if (this.state == ImageState.IDLE) {
      this.state = ImageState.LOADING;
      this.changed();
      const sourceState = this.sourceImage_.getState();
      if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {
        this.reproject_();
      } else {
        this.sourceListenerKey_ = listen(
          this.sourceImage_,
          EventType.CHANGE,
          function (e) {
            const sourceState = this.sourceImage_.getState();
            if (
              sourceState == ImageState.LOADED ||
              sourceState == ImageState.ERROR
            ) {
              this.unlistenSource_();
              this.reproject_();
            }
          },
          this
        );
        this.sourceImage_.load();
      }
    }
  }
load ( ) { if ( this . state == ImageState . IDLE ) { this . state = ImageState . LOADING ; this . changed ( ) ; const sourceState = this . sourceImage_ . getState ( ) ; if ( sourceState == ImageState . LOADED || sourceState == ImageState . ERROR ) { this . reproject_ ( ) ; } else { this . sourceListenerKey_ = listen ( this . sourceImage_ , EventType . CHANGE , function ( e ) { const sourceState = this . sourceImage_ . getState ( ) ; if ( sourceState == ImageState . LOADED || sourceState == ImageState . ERROR ) { this . unlistenSource_ ( ) ; this . reproject_ ( ) ; } } , this ) ; this . sourceImage_ . load ( ) ; } } }
Load not yet loaded URI.
Load not yet loaded URI .