import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
/**
 * @文件说明: 构建Map.Layers地图图层对象
 * @创建人: pjtools@vip.qq.com
 * @创建时间: 2020-05-22 14:50:56
 */

import BasicMapApi from '../util/basicMapApiClass';
import BackgroundLayer from './vector/backgroundLayer';
import CirclePointLayer from './vector/circlePointLayer';
import LineLayer from './vector/lineLayer';
import PolygonLayer from './vector/polygonLayer';
import FillExtrusionLayer from './vector/fillExtrusionLayer';
import SymbolLayer, { TextSymbolLayer, IconSymbolLayer } from './vector/symbolLayer';

var Layers = function (_BasicMapApi) {
  _inherits(Layers, _BasicMapApi);

  function Layers() {
    _classCallCheck(this, Layers);

    return _possibleConstructorReturn(this, (Layers.__proto__ || Object.getPrototypeOf(Layers)).apply(this, arguments));
  }

  _createClass(Layers, [{
    key: 'addBackgroundLayer',

    /**
     * 实例背景色图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */
    value: function addBackgroundLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new BackgroundLayer(this.iMapApi, id, layerOptions, options);
    }

    /**
     * 实例圆点图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */

  }, {
    key: 'addCirclePointLayer',
    value: function addCirclePointLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new CirclePointLayer(this.iMapApi, id, layerOptions, options);
    }

    /**
     * 实例线图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */

  }, {
    key: 'addLineLayer',
    value: function addLineLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new LineLayer(this.iMapApi, id, layerOptions, options);
    }

    /**
     * 实例面图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */

  }, {
    key: 'addPolygonLayer',
    value: function addPolygonLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new PolygonLayer(this.iMapApi, id, layerOptions, options);
    }

    /**
     * 实例3D填充图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */

  }, {
    key: 'addFillExtrusionLayer',
    value: function addFillExtrusionLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new FillExtrusionLayer(this.iMapApi, id, layerOptions, options);
    }

    /**
     * 实例符号图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */

  }, {
    key: 'addSymbolLayer',
    value: function addSymbolLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new SymbolLayer(this.iMapApi, id, layerOptions, options);
    }

    /**
     * 实例矢量文本图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */

  }, {
    key: 'addTextSymbolLayer',
    value: function addTextSymbolLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new TextSymbolLayer(this.iMapApi, id, layerOptions, options);
    }

    /**
     * 实例矢量图标图层到地图Map中
     * @param {string} id 图层名称
     * @param {Object} layerOptions 原生MapboxGL图层的参数选项
     * @param {Object} options 图层参数选项
     */

  }, {
    key: 'addIconSymbolLayer',
    value: function addIconSymbolLayer(id) {
      var layerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

      return new IconSymbolLayer(this.iMapApi, id, layerOptions, options);
    }
  }]);

  return Layers;
}(BasicMapApi);

export default Layers;