/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	// The require scope
/******/ 	var __webpack_require__ = {};
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Hawkeye": function() { return /* reexport */ Hawkeye; }
});

;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/_utils/gis-utils"
var gis_utils_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/gis-utils");
;// CONCATENATED MODULE: ./src/leaflet/hawkeye/Hawkeye.js

function Hawkeye(mapTarget, layerData, options) {
  let _webMap = null;
  gis_utils_namespaceObject.utils.getWebMap(mapTarget, webmap => {
    _webMap = webmap;

    _webMap.mapControl.startMiniMap(layerData, options);
  });
  return {
    remove,
    changeLayer,
    bindEvents
  };

  function bindEvents(type, fn) {
    if (_webMap) {
      _webMap.mapControl.miniMap.on(type, fn);
    } else {
      gis_utils_namespaceObject.utils.getWebMap(mapTarget, webmap => {
        webmap.mapControl.miniMap.on(type, fn);
      });
    }
  }

  function changeLayer(layerData) {
    if (_webMap) {
      _webMap.mapControl.miniMap.changeLayer2MiniMap(layerData);
    }
  }

  function remove() {
    if (_webMap) {
      _webMap.mapControl.miniMap.remove();
    }
  }
}
;// CONCATENATED MODULE: ./src/leaflet/hawkeye/index.js


module.exports = __webpack_exports__;
/******/ })()
;