# MapGIS Client for JavaScript API

Cesium MapboxGL Leaflet OpenLayers
API文档

    import { LayerView } from './index'

    class BaseRendererLayerView extends LayerView {
      constructor(options) {
        super(options)
        this._initInstance(options)
        this._initHandlers()
      }

      /**
       * @description: 初始化实例
       * @return {*}
       */
      _initInstance(options) {}

      /**
       * @description: 初始化监听
       * @return {*}
       */
      _initHandlers() {
        this._layerChangeAction = this._layerChangeAction.bind(this)
        this.layer.on('set', this._layerChangeAction)
      }

      /**
       * @description: 移除监听
       * @return {*}
       */
      _removeHandlers() {
        this.layer.off('set', this._layerChangeAction)
      }

      /**
       * @description: 图层变化action
       * @param {*} event
       * @return {*}
       */
      _layerChangeAction(event) {
        const { key } = event.eventData
        if (key === 'renderer') {
          this._rendererChangeAction(event)
        }
      }

      /**
       * @description: renderer变化action
       * @param {*} event
       * @return {*}
       */
      _rendererChangeAction(event) {}
    }

    export default BaseRendererLayerView

构造函数
成员变量
方法
事件