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.Interfaces地图交互接口对象
 * @创建人: pjtools@vip.qq.com
 * @创建时间: 2020-05-21 10:09:45
 */

import BasicMapApi from '../util/basicMapApiClass';
import Fullscreen from './fullscreen';
import Draw from './draw';
import Measure from './measure';

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

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

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

  _createClass(Interfaces, [{
    key: 'fullscreen',

    /**
     * 获取地图“全屏”实例对象
     */
    value: function fullscreen() {
      return new Fullscreen(this.iMapApi);
    }

    /**
     * 获取地图“绘制矢量图形”实例对象
     * @param {Object} options “绘制”交互的初始参数选项
     */

  }, {
    key: 'draw',
    value: function draw() {
      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

      return new Draw(this.iMapApi, options);
    }

    /**
     * 获取地图“测量”实例对象
     */

  }, {
    key: 'measure',
    value: function measure() {
      return new Measure(this.iMapApi);
    }
  }]);

  return Interfaces;
}(BasicMapApi);

export default Interfaces;