    import { LayerView } from '@mapgis/webclient-common'
    import ApplyLayerUpdateUtil from './support/ApplyLayerUpdateUtil'
    import { addIGSMapImageTileLayer } from '../view/MapViewUtils'

    class IGSMapImageTileLayerView extends LayerView {
      /**
       * 添加图层视图
       * @param {LayerEvent} 图层事件
       * @return {Promise<LayerView>} 图层视图
       */
      onAdd(event) {
        const layer = this.layer
        const innerView = this.innerView
        this.innerLayer = addIGSMapImageTileLayer(layer, innerView)
        this.innerLayer.commonLayerId = layer.id
        return Promise.resolve(this)
      }

      /**
       * 移除图层视图
       * @param {LayerEvent} 图层事件
       * @return {Promise<LayerView>} 图层视图
       */
      onRemove(event) {
        this.innerView.removeLayer(this.innerLayer)
        return Promise.resolve(this)
      }

      /**
       * 更新图层视图
       * @param {LayerViewUpdateEvent} 图层事件
       * @return {Promise<LayerView>} 图层视图
       */
      onUpdate(event) {
        const _layer = this.innerLayer
        ApplyLayerUpdateUtil.applyUpdate(this.view, this.layer, _layer, event)
        return Promise.resolve(this)
      }
    }
    export default IGSMapImageTileLayerView