setState(state) {
    if (this.state === TileState.EMPTY) {
      // no more state changes
      return;
    }
    if (this.state !== TileState.ERROR && this.state > state) {
      throw new Error('Tile load sequence violation');
    }
    this.state = state;
    this.changed();
  }
Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,
it is important to set the state correctly to {@link module:ol/TileState~ERROR}
when the tile cannot be loaded. Otherwise the tile cannot be removed from
the tile queue and will block other requests.
@param {import("./TileState.js").default} state State.
@api