module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// 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 });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "lib/leaflet/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 498);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/interopRequireDefault");

/***/ }),

/***/ 1:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
        injectStyles.call(
          this,
          (options.functional ? this.parent : this).$root.$options.shadowRoot
        )
      }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 12:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/extends");

/***/ }),

/***/ 15:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _Message = _interopRequireDefault(__webpack_require__(16));

var _default = _Message.default;
exports.default = _default;

/***/ }),

/***/ 16:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _extends2 = _interopRequireDefault(__webpack_require__(12));

var _message = _interopRequireDefault(__webpack_require__(17));

var defaultPrefixCls = 'sm-component-message';
var configCallback = _message.default.config;
configCallback({
  prefixCls: defaultPrefixCls
});

_message.default.config = function (options) {
  if (options.prefixCls && options.prefixCls !== defaultPrefixCls) {
    _message.default.destroy();
  }

  configCallback((0, _extends2.default)({}, options, {
    prefixCls: options.prefixCls || defaultPrefixCls
  }));
};

var _default = _message.default;
exports.default = _default;

/***/ }),

/***/ 17:
/***/ (function(module, exports) {

module.exports = require("ant-design-vue/es/message");

/***/ }),

/***/ 18:
/***/ (function(module, exports) {

module.exports = require("lodash.clonedeep");

/***/ }),

/***/ 19:
/***/ (function(module, exports) {

module.exports = require("leaflet");

/***/ }),

/***/ 2:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/lib/_mixin/Theme.js");

/***/ }),

/***/ 225:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 226:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _mapGetter = _interopRequireDefault(__webpack_require__(28));

var _Theme = _interopRequireDefault(__webpack_require__(2));

var _IdentifyViewModel = _interopRequireDefault(__webpack_require__(500));

var _lodash = _interopRequireDefault(__webpack_require__(43));

var _util = __webpack_require__(9);

var _index = _interopRequireDefault(__webpack_require__(15));

//
//
//
//
//
//
//
//
//
var _default2 = {
  name: 'SmIdentify',
  mixins: [_mapGetter.default, _Theme.default],
  props: {
    layerNames: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    fields: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    layerStyle: {
      type: Object,
      default: function _default() {
        return {};
      }
    }
  },
  data: function data() {
    return {
      popupProps: {},
      layers: [],
      layerType: false,
      popupLayers: []
    };
  },
  watch: {
    layerNames: function layerNames(val, oldval) {
      if (val && !(0, _lodash.default)(val, oldval)) {
        this.$options.removed.call(this);
        this.setLayers();
      }
    },
    getBackground: function getBackground() {
      this.changeStyle();
    }
  },
  loaded: function loaded() {
    this.setViewModel();
    this.setLayers();
  },
  removed: function removed() {
    // 清除点击事件和popup
    this.popupLayers && this.popupLayers.forEach(function (layer) {
      layer.closePopup();
      layer.off('click');
      layer.off('popupclose');
    });
    this.layers && this.layers.forEach(function (layer) {
      layer.off('click');
    }); // 清除高亮的图层

    this.viewModel && this.viewModel.removed(); // 重置

    this.popupLayers = [];
    this.layers = [];
  },
  beforeDestroy: function beforeDestroy() {
    this.$options.removed.call(this);
  },
  methods: {
    setViewModel: function setViewModel() {
      this.viewModel = new _IdentifyViewModel.default(this.map, {
        mapTarget: this.getTargetName(),
        layerNames: this.layerNames,
        layerStyle: this.layerStyle
      });
    },
    // 通过layerName设置layers
    setLayers: function setLayers() {
      var _this = this;

      // 重置layers
      this.layers = [];
      this.layerNames.forEach(function (layerName) {
        var layer = _this.getLayerByName(layerName);

        layer && _this.layers.push(layer);
      });

      if (this.layers && this.layers.length > 0) {
        this.layers.forEach(function (layer) {
          var layerType = _this.viewModel.getLayerType(layer);

          _this.bindLayerClick(layer, layerType);
        });
      }
    },
    // 通过layerName获取layer
    getLayerByName: function getLayerByName(layerName) {
      var layer = this.viewModel.getLayerByName(layerName);

      if (!layer) {
        // @ts-ignore
        _index.default.error(this.$t('identify.layerNotExit', {
          layer: layerName
        }));
      }

      return layer;
    },
    // 给选中图层绑定click
    bindLayerClick: function bindLayerClick(layer, layerType) {
      if (layerType) {
        // 如果是geojson
        this.bindGeojsonLayer(layer);
      } else if (layer.TFEvents) {
        // 如果是客户端专题图
        this.bindThemeLayer(layer);
      } else {
        // 如果是其他的图层(marker,polygon,polyline,隐藏的客户端专题图)
        this.bindOtherLayer(layer);
      }
    },
    // geojsonlayer绑定click事件
    bindGeojsonLayer: function bindGeojsonLayer(geojsonLayer) {
      var _this2 = this;

      geojsonLayer.on('click', function (e) {
        // e.layer是被选中的某个要素
        _this2.bindPopupLayer(e.layer.feature, e.layer);
      });
    },
    // 给客户端专题图绑定click事件
    bindThemeLayer: function bindThemeLayer(themeLayer) {
      var _this3 = this;

      themeLayer.on('click', function (e) {
        if (e.target && e.target.refDataID) {
          var themeFeature = themeLayer.getFeatureById(e.target.refDataID); // 将矢量要素转换成geojson

          var feature = _this3.viewModel.formatGeoJSON(themeFeature); // 因为线坐标等要素不准确，所以用地图的点击的坐标点


          _this3.bindPopupLayer(feature, themeLayer);
        }
      });
    },
    // 其他layer(layergroup等)绑定click事件
    bindOtherLayer: function bindOtherLayer(otherLayer) {
      var _this4 = this;

      if (otherLayer._layers) {
        for (var key in otherLayer._layers) {
          var layer = otherLayer._layers[key];

          if (layer.TFEvents) {
            // 说明是客户端专题图
            this.bindThemeLayer(otherLayer._layers[key]);
          } else if (this.viewModel.getLayerType(layer)) {
            this.bindGeojsonLayer(layer);
          } else {
            (function () {
              // 普通图层
              var popupLayer = void 0;
              var feature = void 0;
              layer.on('click', function (e) {
                // geojson点线面图层marker,image-marker、 RANK_SYMBOL:等级符号专题图(返回的是layergroup);
                var coordinates = e.sourceTarget && e.sourceTarget._point && _this4.map.layerPointToLatLng(e.sourceTarget._point) || e.target && e.target._latlng || e.latlng;
                feature = {
                  type: 'Feature',
                  properties: coordinates,
                  geometry: {
                    type: 'Point',
                    coordinates: [coordinates.lng, coordinates.lat]
                  }
                };
                e.sourceTarget.feature = feature;
                popupLayer = e.sourceTarget;

                _this4.bindPopupLayer(feature, popupLayer);
              });
            })();
          }
        }
      }
    },
    // 绑定popup
    bindPopupLayer: function bindPopupLayer(feature, popupLayer) {
      var _this5 = this;

      if (!feature) {
        return;
      }

      this.filterFeature(feature);
      var latlng = ((0, _util.getFeatureCenter)(feature) || []).reverse();
      this.$nextTick(function () {
        // 这个定时器是避免和专题图的点击事件（要清空popup）冲突
        setTimeout(function () {
          var popupDom = _this5.$refs.Popup;
          popupDom.style.display = 'block';
          popupLayer.bindPopup(popupDom);
          popupLayer.openPopup(latlng); // popupclose(点击地图的时候，清除最后一次的高亮)

          popupLayer.on('popupclose', function () {
            return _this5.viewModel.removed();
          });

          if (!popupLayer.feature) {
            popupLayer.feature = feature;
          }

          _this5.viewModel.addOverlayToMap(popupLayer, feature, _this5.layerStyle);

          _this5.popupLayers.push(popupLayer);
        }, 0);
      });
    },
    // 过滤用户传入的字段
    filterFeature: function filterFeature(feature) {
      var _this6 = this;

      // 重置popupProps
      this.popupProps = {};

      if (feature.properties) {
        // 过滤字段
        if (this.fields.length > 0) {
          this.fields.forEach(function (field) {
            if (Object.prototype.hasOwnProperty.call(feature.properties, field)) {
              _this6.popupProps[field] = feature.properties[field];
            }
          });
        } else {
          // 默认是读取layer的全部字段
          this.popupProps = feature.properties;
        }
      }
    },
    // 根据主题改变样式
    changeStyle: function changeStyle() {
      var wrapper = document.querySelector('.leaflet-popup-content-wrapper');
      var tip = document.querySelector('.leaflet-popup-tip');
      wrapper && (wrapper.style.background = this.getBackground);
      tip && (tip.style.background = this.getBackground);
    }
  }
};
exports.default = _default2;

/***/ }),

/***/ 272:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ render; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ staticRenderFns; });

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/identify/Identify.vue?vue&type=template&id=2d571f34&
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "ul",
    {
      directives: [
        { name: "show", rawName: "v-show", value: false, expression: "false" },
      ],
      ref: "Popup",
      class: ["sm-component-identify"],
      style: [_vm.getTextColorStyle],
    },
    _vm._l(_vm.popupProps, function (value, key, index) {
      return _c(
        "li",
        { key: index, staticClass: "sm-component-identify__body" },
        [
          _c(
            "div",
            {
              staticClass: "sm-component-identify__left",
              attrs: { title: key },
            },
            [_vm._v(_vm._s(key))]
          ),
          _c(
            "div",
            {
              staticClass: "sm-component-identify__right",
              attrs: { title: value },
            },
            [_vm._v(_vm._s(value))]
          ),
        ]
      )
    }),
    0
  )
}
var staticRenderFns = []
render._withStripped = true


// CONCATENATED MODULE: ./src/leaflet/identify/Identify.vue?vue&type=template&id=2d571f34&


/***/ }),

/***/ 28:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/lib/_mixin/map-getter.js");

/***/ }),

/***/ 29:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _leaflet = _interopRequireDefault(__webpack_require__(19));

// @property lastId: Number
// Last unique ID used by [`stamp()`](#util-stamp)
var lastId = 0; // @function stamp(obj: Object): Number
// Returns the unique ID of an object, assigning it one if it doesn't have it.

function stamp(obj) {
  /*eslint-disable */
  obj._leaflet_id = obj._leaflet_id || ++lastId;
  return obj._leaflet_id;
  /* eslint-enable */
}

_leaflet.default.Map.prototype.addLayer = function (layer, name) {
  if (!layer._layerAdd) {
    throw new Error('The provided object is not a Layer.');
  }

  var id = stamp(layer); // 如果layer已存在，返回this

  if (this._layers[id] || this._layers[name]) {
    return this;
  } // 如果用户没有传入name，就生成一个name


  if (!name) {
    name = 'sm-custom' + id;
  } // 如果该name已存在，就生成新的name


  if (this._layers[name]) {
    this.fire('addLayerFailed', 'layer name重复,请输入唯一的name');
    return this;
  } // 将layer和name添加到layersOnMap


  layer.name = name; // 不要将featureLayer加入layersOnMap
  // let _layersId = {};
  // for (let key in this._layers) {
  //   if (this._layers[key]._layers) {
  //     _layersId[key] = [];
  //     for (let key2 in this._layers[key]._layers) {
  //       _layersId[key].push(key2);
  //     }
  //   }
  // }
  // let layersOnMapFlag = true;
  // for (let key in _layersId) {
  //   if (_layersId[key].indexOf(id + '') > -1) {
  //     layersOnMapFlag = false;
  //   }
  // }

  if (!this.layersOnMap) {
    this.layersOnMap = [];
  }

  this.layersOnMap.push({
    name: name,
    layer: layer
  }); // if (layersOnMapFlag) {
  //   this.layersOnMap.push({ name, layer });
  // }

  this._layers[id] = layer;
  layer._mapToAdd = this;

  if (layer.beforeAdd) {
    layer.beforeAdd(this);
  }

  this.whenReady(layer._layerAdd, layer);
  return this;
};

_leaflet.default.Map.prototype.removeLayer = function (layer, name) {
  // 重新构造layersOnMap
  this.layersOnMap = this.layersOnMap.filter(function (l) {
    return l.name !== (layer.name || name);
  }); // 如果是传入图层，就用图层id; 如果传入name,通过name去获取图层id

  var id = stamp(layer) || this._layers[name].id;

  if (!this._layers[id]) {
    return this;
  }

  if (this._loaded) {
    layer.onRemove(this);
  }

  if (layer.getAttribution && this.attributionControl) {
    this.attributionControl.removeAttribution(layer.getAttribution());
  }

  delete this._layers[id];

  if (this._loaded) {
    this.fire('layerremove', {
      layer: layer,
      name: name
    });
    layer.fire('remove');
  }

  layer._map = layer._mapToAdd = null;
  return this;
};

_leaflet.default.Map.include({
  getLayersOnMap: function getLayersOnMap() {
    return this.layersOnMap;
  },
  getLayerById: function getLayerById(id) {
    return this._layers[id];
  },
  getLayerByName: function getLayerByName(name) {
    for (var key in this._layers) {
      if (name === this._layers[key].name) {
        return this._layers[key];
      }
    }
  },
  getAllLayers: function getAllLayers() {
    return this._layers;
  }
});

delete _leaflet.default.Icon.Default.prototype._getIconUrl;

_leaflet.default.Icon.Default.mergeOptions({
  iconRetinaUrl: __webpack_require__(30),
  iconUrl: __webpack_require__(31),
  shadowUrl: __webpack_require__(32)
});

window.L = _leaflet.default;
var _default = _leaflet.default;
exports.default = _default;

/***/ }),

/***/ 3:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/lib/init.js");

/***/ }),

/***/ 30:
/***/ (function(module, exports) {

module.exports = require("leaflet/dist/images/marker-icon-2x.png");

/***/ }),

/***/ 31:
/***/ (function(module, exports) {

module.exports = require("leaflet/dist/images/marker-icon.png");

/***/ }),

/***/ 32:
/***/ (function(module, exports) {

module.exports = require("leaflet/dist/images/marker-shadow.png");

/***/ }),

/***/ 33:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/static/libs/iclient-leaflet/iclient-leaflet.min.js");

/***/ }),

/***/ 43:
/***/ (function(module, exports) {

module.exports = require("lodash.isequal");

/***/ }),

/***/ 498:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _Identify = _interopRequireDefault(__webpack_require__(499));

var _init = _interopRequireDefault(__webpack_require__(3));

_Identify.default.install = function (Vue, opts) {
  (0, _init.default)(Vue, opts);
  Vue.component(_Identify.default.options ? _Identify.default.options.name : _Identify.default.name, _Identify.default);
};

var _default = _Identify.default;
exports.default = _default;

/***/ }),

/***/ 499:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Identify_vue_vue_type_template_id_2d571f34___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(272);
/* harmony import */ var _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(225);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);





/* normalize component */

var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _Identify_vue_vue_type_template_id_2d571f34___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  _Identify_vue_vue_type_template_id_2d571f34___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var api; }
component.options.__file = "src/leaflet/identify/Identify.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 500:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));

var _leafletWrapper = _interopRequireDefault(__webpack_require__(29));

__webpack_require__(33);

var _lodash = _interopRequireDefault(__webpack_require__(18));

/**
 * @class IdentifyViewModel
 * @description 点选 viewModel.
 * @param {Object} map - map 对象。
 * @param {String} [options.layerName] - 图层名。
 * @param {Object} [options.layerStyle] - 查询结果图层样式配置。
 * @extends L.Evented
 */
var IdentifyViewModel = /*#__PURE__*/function (_L$Evented) {
  (0, _inheritsLoose2.default)(IdentifyViewModel, _L$Evented);

  function IdentifyViewModel(map, options) {
    var _this;

    _this = _L$Evented.call(this) || this;
    _this.map = map;
    _this.layerNames = options.layerNames;
    _this.layerStyle = options.layerStyle || {};
    _this.popup = null;
    _this.lastLayerName = '';
    return _this;
  }
  /**
   * @function IdentifyViewModel.prototype.getLayerByName
   * @desc 获取。
   * @param {Array} name - 图层名。
   */


  var _proto = IdentifyViewModel.prototype;

  _proto.getLayerByName = function getLayerByName(name) {
    return this.map.getLayerByName(name);
  }
  /**
   * @function IdentifyViewModel.prototype.getLayerById
   * @desc 获取。
   * @param {Array} id - 图层名。
   */
  ;

  _proto.getLayerById = function getLayerById(id) {
    return this.map.getLayerById(id);
  }
  /**
   * @function IdentifyViewModel.prototype.getLayerType
   * @desc 判断是否是geojson
   * @param {Array} layer - 图层名。
   */
  ;

  _proto.getLayerType = function getLayerType(layer) {
    return layer instanceof _leafletWrapper.default.GeoJSON;
  }
  /**
   * @function IdentifyViewModel.prototype.addOverlayToMap
   * @desc 添加高亮图层。
   * @param {Object} layer - layer。
   * @param {Object} feature - geojson
   * @param {Object} customStyle - 用户自定义样式
   */
  ;

  _proto.addOverlayToMap = function addOverlayToMap(layer, feature, customStyle) {
    if (customStyle === void 0) {
      customStyle = this.layerStyle;
    }

    // 高亮前，清除之前的高亮
    this.lastLayerName && this.removed(this.lastLayerName); // 默认样式

    var defaultStyle = {
      color: '#409eff',
      fillColor: '#409eff',
      fillOpacity: 1,
      opacity: 0.6,
      renderer: _leafletWrapper.default.svg()
    }; // new layer

    var styleOptions = Object.assign((0, _lodash.default)(layer.options), defaultStyle, customStyle);
    var overlayer;
    var type = feature.geometry.type;

    if (type === 'Point' || type === 'MultiPoint') {
      var geoCoordinates = (0, _lodash.default)(feature.geometry.coordinates);
      overlayer = _leafletWrapper.default.circleMarker(geoCoordinates.reverse(), styleOptions);
    } else {
      overlayer = _leafletWrapper.default.geoJSON(feature, {
        style: function style() {
          return styleOptions;
        }
      });
    } // 上图，记录图层名


    this.map.addLayer(overlayer, layer.name + '-SM-highlighted');
    this.lastLayerName = layer.name;
  }
  /**
   * @function IdentifyViewModel.prototype.removed
   * @desc 将客户端专题图的矢量要素转换成geojson。
   * @param {Object} themeFeature - themeFeature。
   */
  ;

  _proto.formatGeoJSON = function formatGeoJSON(themeFeature) {
    var formatObj = new SuperMap.Format.GeoJSON();
    var serverGeometry = SuperMap.ServerGeometry.fromGeometry(themeFeature.geometry);
    var geojson = formatObj.toGeoJSON(serverGeometry);
    geojson.properties = themeFeature.attributes;
    return geojson;
  }
  /**
   * @function IdentifyViewModel.prototype.removed
   * @desc 清除高亮图层。
   * @param {String} lastLayerName - 图层名。
   */
  ;

  _proto.removed = function removed(lastLayerName) {
    if (lastLayerName === void 0) {
      lastLayerName = this.lastLayerName;
    }

    // 移除高亮图层
    if (lastLayerName && this.getLayerByName(lastLayerName + '-SM-highlighted')) {
      this.map.removeLayer(this.getLayerByName(lastLayerName + '-SM-highlighted'));
      this.lastLayerName = '';
    }
  };

  return IdentifyViewModel;
}(_leafletWrapper.default.Evented);

exports.default = IdentifyViewModel;

/***/ }),

/***/ 6:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/inheritsLoose");

/***/ }),

/***/ 9:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-leaflet/lib/_utils/util.js");

/***/ })

/******/ });