v-ol-map 1.0.1 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/examples/main.ts CHANGED
@@ -1,9 +1,12 @@
1
1
  import Vue from "vue";
2
2
  import App from "./App.vue";
3
3
  import router from "./router";
4
+ import olMap from "@/index";
4
5
 
5
6
  Vue.config.productionTip = false;
6
7
 
8
+ Vue.use(olMap);
9
+
7
10
  new Vue({
8
11
  router,
9
12
  render: (h) => h(App),
@@ -8,10 +8,7 @@
8
8
 
9
9
  <script lang="ts">
10
10
  import { Component, Vue } from "vue-property-decorator";
11
- import { VMap, VTile } from "@/index";
12
- @Component({
13
- components: { VMap, VTile },
14
- })
11
+ @Component
15
12
  export default class Home extends Vue {
16
13
  height = "960px";
17
14
  width = "1080px";
@@ -26209,8 +26209,8 @@ if (typeof window !== 'undefined') {
26209
26209
  // Indicate to webpack that this file can be concatenated
26210
26210
  /* harmony default export */ var setPublicPath = (null);
26211
26211
 
26212
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"f68daf18-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VMap/src/VMap.vue?vue&type=template&id=0bfa819f&scoped=true&
26213
- var VMapvue_type_template_id_0bfa819f_scoped_true_render = function render() {
26212
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"f68daf18-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VMap/src/VMap.vue?vue&type=template&id=46d083ac&scoped=true&
26213
+ var VMapvue_type_template_id_46d083ac_scoped_true_render = function render() {
26214
26214
  var _vm = this,
26215
26215
  _c = _vm._self._c,
26216
26216
  _setup = _vm._self._setupProxy;
@@ -26228,7 +26228,7 @@ var VMapvue_type_template_id_0bfa819f_scoped_true_render = function render() {
26228
26228
 
26229
26229
  var staticRenderFns = [];
26230
26230
 
26231
- // CONCATENATED MODULE: ./src/components/VMap/src/VMap.vue?vue&type=template&id=0bfa819f&scoped=true&
26231
+ // CONCATENATED MODULE: ./src/components/VMap/src/VMap.vue?vue&type=template&id=46d083ac&scoped=true&
26232
26232
 
26233
26233
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
26234
26234
  var es_error_cause = __webpack_require__("d9e2");
@@ -27256,9 +27256,7 @@ __decorate([PropSync("height", {
27256
27256
  default: "100%"
27257
27257
  })], VMapvue_type_script_lang_ts_VMap.prototype, "mapHeight", void 0);
27258
27258
 
27259
- VMapvue_type_script_lang_ts_VMap = __decorate([vue_class_component_esm({
27260
- components: {}
27261
- })], VMapvue_type_script_lang_ts_VMap);
27259
+ VMapvue_type_script_lang_ts_VMap = __decorate([vue_class_component_esm], VMapvue_type_script_lang_ts_VMap);
27262
27260
  /* harmony default export */ var VMapvue_type_script_lang_ts_ = (VMapvue_type_script_lang_ts_VMap);
27263
27261
  // CONCATENATED MODULE: ./src/components/VMap/src/VMap.vue?vue&type=script&lang=ts&
27264
27262
  /* harmony default export */ var src_VMapvue_type_script_lang_ts_ = (VMapvue_type_script_lang_ts_);
@@ -27370,11 +27368,11 @@ function normalizeComponent(
27370
27368
 
27371
27369
  var component = normalizeComponent(
27372
27370
  src_VMapvue_type_script_lang_ts_,
27373
- VMapvue_type_template_id_0bfa819f_scoped_true_render,
27371
+ VMapvue_type_template_id_46d083ac_scoped_true_render,
27374
27372
  staticRenderFns,
27375
27373
  false,
27376
27374
  null,
27377
- "0bfa819f",
27375
+ "46d083ac",
27378
27376
  null
27379
27377
 
27380
27378
  )
@@ -29442,7 +29440,6 @@ var layer_Tile = __webpack_require__("480c");
29442
29440
 
29443
29441
 
29444
29442
 
29445
- // Vue.extend(BaseLayer);};
29446
29443
 
29447
29444
  let srcvue_type_script_lang_ts_VTile = class VTile extends Layers_BaseLayer {
29448
29445
  constructor() {
@@ -29516,7 +29513,7 @@ var src_component = normalizeComponent(
29516
29513
  src_staticRenderFns,
29517
29514
  false,
29518
29515
  null,
29519
- "5e634ae0",
29516
+ "c1f87780",
29520
29517
  null
29521
29518
 
29522
29519
  )
@@ -29526,20 +29523,27 @@ var src_component = normalizeComponent(
29526
29523
 
29527
29524
 
29528
29525
  TileLayer_src.install = Vue => {
29529
- Vue.component(TileLayer_src.name, TileLayer_src);
29526
+ Vue.component("v-tile", TileLayer_src);
29530
29527
  };
29531
29528
 
29532
29529
  /* harmony default export */ var TileLayer = (TileLayer_src);
29533
29530
  // CONCATENATED MODULE: ./src/index.ts
29534
29531
 
29535
29532
 
29536
- const components = [src_VMap, TileLayer];
29533
+ const components = [{
29534
+ name: "v-map",
29535
+ component: src_VMap
29536
+ }, {
29537
+ name: "v-tile",
29538
+ component: TileLayer
29539
+ }];
29537
29540
 
29538
29541
  const install = Vue => {
29539
29542
  if (install.installed) return;
29540
29543
  install.installed = true;
29541
- components.map(component => {
29542
- Vue.component(component.name, component);
29544
+ components.forEach(component => {
29545
+ console.log(component.name);
29546
+ Vue.component(component.name, component.component);
29543
29547
  });
29544
29548
  }; // 这一步判断window.Vue是否存在,因为直接引用vue.min.js, 它会把Vue绑到Window上,我们直接引用打包好的js才能正常跑起来。
29545
29549
 
@@ -26218,8 +26218,8 @@ if (typeof window !== 'undefined') {
26218
26218
  // Indicate to webpack that this file can be concatenated
26219
26219
  /* harmony default export */ var setPublicPath = (null);
26220
26220
 
26221
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"f68daf18-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VMap/src/VMap.vue?vue&type=template&id=0bfa819f&scoped=true&
26222
- var VMapvue_type_template_id_0bfa819f_scoped_true_render = function render() {
26221
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"f68daf18-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VMap/src/VMap.vue?vue&type=template&id=46d083ac&scoped=true&
26222
+ var VMapvue_type_template_id_46d083ac_scoped_true_render = function render() {
26223
26223
  var _vm = this,
26224
26224
  _c = _vm._self._c,
26225
26225
  _setup = _vm._self._setupProxy;
@@ -26237,7 +26237,7 @@ var VMapvue_type_template_id_0bfa819f_scoped_true_render = function render() {
26237
26237
 
26238
26238
  var staticRenderFns = [];
26239
26239
 
26240
- // CONCATENATED MODULE: ./src/components/VMap/src/VMap.vue?vue&type=template&id=0bfa819f&scoped=true&
26240
+ // CONCATENATED MODULE: ./src/components/VMap/src/VMap.vue?vue&type=template&id=46d083ac&scoped=true&
26241
26241
 
26242
26242
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
26243
26243
  var es_error_cause = __webpack_require__("d9e2");
@@ -27265,9 +27265,7 @@ __decorate([PropSync("height", {
27265
27265
  default: "100%"
27266
27266
  })], VMapvue_type_script_lang_ts_VMap.prototype, "mapHeight", void 0);
27267
27267
 
27268
- VMapvue_type_script_lang_ts_VMap = __decorate([vue_class_component_esm({
27269
- components: {}
27270
- })], VMapvue_type_script_lang_ts_VMap);
27268
+ VMapvue_type_script_lang_ts_VMap = __decorate([vue_class_component_esm], VMapvue_type_script_lang_ts_VMap);
27271
27269
  /* harmony default export */ var VMapvue_type_script_lang_ts_ = (VMapvue_type_script_lang_ts_VMap);
27272
27270
  // CONCATENATED MODULE: ./src/components/VMap/src/VMap.vue?vue&type=script&lang=ts&
27273
27271
  /* harmony default export */ var src_VMapvue_type_script_lang_ts_ = (VMapvue_type_script_lang_ts_);
@@ -27379,11 +27377,11 @@ function normalizeComponent(
27379
27377
 
27380
27378
  var component = normalizeComponent(
27381
27379
  src_VMapvue_type_script_lang_ts_,
27382
- VMapvue_type_template_id_0bfa819f_scoped_true_render,
27380
+ VMapvue_type_template_id_46d083ac_scoped_true_render,
27383
27381
  staticRenderFns,
27384
27382
  false,
27385
27383
  null,
27386
- "0bfa819f",
27384
+ "46d083ac",
27387
27385
  null
27388
27386
 
27389
27387
  )
@@ -29451,7 +29449,6 @@ var layer_Tile = __webpack_require__("480c");
29451
29449
 
29452
29450
 
29453
29451
 
29454
- // Vue.extend(BaseLayer);};
29455
29452
 
29456
29453
  let srcvue_type_script_lang_ts_VTile = class VTile extends Layers_BaseLayer {
29457
29454
  constructor() {
@@ -29525,7 +29522,7 @@ var src_component = normalizeComponent(
29525
29522
  src_staticRenderFns,
29526
29523
  false,
29527
29524
  null,
29528
- "5e634ae0",
29525
+ "c1f87780",
29529
29526
  null
29530
29527
 
29531
29528
  )
@@ -29535,20 +29532,27 @@ var src_component = normalizeComponent(
29535
29532
 
29536
29533
 
29537
29534
  TileLayer_src.install = Vue => {
29538
- Vue.component(TileLayer_src.name, TileLayer_src);
29535
+ Vue.component("v-tile", TileLayer_src);
29539
29536
  };
29540
29537
 
29541
29538
  /* harmony default export */ var TileLayer = (TileLayer_src);
29542
29539
  // CONCATENATED MODULE: ./src/index.ts
29543
29540
 
29544
29541
 
29545
- const components = [src_VMap, TileLayer];
29542
+ const components = [{
29543
+ name: "v-map",
29544
+ component: src_VMap
29545
+ }, {
29546
+ name: "v-tile",
29547
+ component: TileLayer
29548
+ }];
29546
29549
 
29547
29550
  const install = Vue => {
29548
29551
  if (install.installed) return;
29549
29552
  install.installed = true;
29550
- components.map(component => {
29551
- Vue.component(component.name, component);
29553
+ components.forEach(component => {
29554
+ console.log(component.name);
29555
+ Vue.component(component.name, component.component);
29552
29556
  });
29553
29557
  }; // 这一步判断window.Vue是否存在,因为直接引用vue.min.js, 它会把Vue绑到Window上,我们直接引用打包好的js才能正常跑起来。
29554
29558
 
@@ -4,4 +4,4 @@
4
4
  * (c) 2015-present Evan You
5
5
  * @license MIT
6
6
  */
7
- function l(t){return l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){return f(t)||d(t)||v()}function f(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function d(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function g(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function y(t,e){_(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){_(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){_(t,e,n)}))}function _(t,e,n){var r=n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e);r.forEach((function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)}))}var m={__proto__:[]},b=m instanceof Array;function O(t){return function(e,n,r){var o="function"===typeof e?e:e.constructor;o.__decorators__||(o.__decorators__=[]),"number"!==typeof r&&(r=void 0),o.__decorators__.push((function(e){return t(e,n,r)}))}}function E(t){var e=l(t);return null==t||"object"!==e&&"function"!==e}function x(t,e){var n=e.prototype._init;e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){t[n]=e},configurable:!0})}))};var r=new e;e.prototype._init=n;var o={};return Object.keys(r).forEach((function(t){void 0!==r[t]&&(o[t]=r[t])})),o}var w=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=e.name||t._componentTag||t.name;var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(t){if("constructor"!==t)if(w.indexOf(t)>-1)e[t]=n[t];else{var r=Object.getOwnPropertyDescriptor(n,t);void 0!==r.value?"function"===typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(e.mixins||(e.mixins=[])).push({data:function(){return h({},t,r.value)}}):(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}})),(e.mixins||(e.mixins=[])).push({data:function(){return x(this,t)}});var r=t.__decorators__;r&&(r.forEach((function(t){return t(e)})),delete t.__decorators__);var o=Object.getPrototypeOf(t.prototype),i=o instanceof u.a?o.constructor:u.a,a=i.extend(e);return T(a,t,i),g()&&y(a,t),a}var C={prototype:!0,arguments:!0,callee:!0,caller:!0};function T(t,e,n){Object.getOwnPropertyNames(e).forEach((function(r){if(!C[r]){var o=Object.getOwnPropertyDescriptor(t,r);if(!o||o.configurable){var i=Object.getOwnPropertyDescriptor(e,r);if(!b){if("cid"===r)return;var a=Object.getOwnPropertyDescriptor(n,r);if(!E(i.value)&&a&&a.value===i.value)return}0,Object.defineProperty(t,r,i)}}}))}function R(t){return"function"===typeof t?j(t):function(e){return j(e,t)}}R.registerHooks=function(t){w.push.apply(w,p(t))};var P=R;function S(t){return O((function(e,n){"undefined"===typeof e.inject&&(e.inject={}),Array.isArray(e.inject)||(e.inject[n]=t||n)}))}function I(t){return"function"!==typeof t||!t.managed&&!t.managedReactive}function A(t){var e=function(){var n=this,r="function"===typeof t?t.call(this):t;for(var o in r=Object.create(r||null),r[M]=Object.create(this[M]||{}),e.managed)r[e.managed[o]]=this[o];var i=function(t){r[e.managedReactive[t]]=a[t],Object.defineProperty(r[M],e.managedReactive[t],{enumerable:!0,configurable:!0,get:function(){return n[t]}})},a=this;for(var o in e.managedReactive)i(o);return r};return e.managed={},e.managedReactive={},e}var M="__reactiveInject__";function L(t){Array.isArray(t.inject)||(t.inject=t.inject||{},t.inject[M]={from:M,default:{}})}var D="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function N(t,e,n){if(D&&!Array.isArray(t)&&"function"!==typeof t&&!t.hasOwnProperty("type")&&"undefined"===typeof t.type){var r=Reflect.getMetadata("design:type",e,n);r!==Object&&(t.type=r)}}function F(t){return void 0===t&&(t={}),function(e,n){N(t,e,n),O((function(e,n){(e.props||(e.props={}))[n]=t}))(e,n)}}function z(t,e){return void 0===e&&(e={}),function(n,r){N(e,n,r),O((function(n,r){(n.props||(n.props={}))[t]=e,(n.computed||(n.computed={}))[r]={get:function(){return this[t]},set:function(e){this.$emit("update:"+t,e)}}}))(n,r)}}function G(t){return O((function(e,n){var r=e.provide;L(e),I(r)&&(r=e.provide=A(r)),r.managed[n]=t||n}))}n("5bc0");var k=n("a2c7"),Z=n("5eee");class K{constructor(t){console.log(t);const e={center:[108.5525,34.3227],zoom:5,constrainResolution:!0,projection:"EPSG:4326"},n={...e},r=new k["a"](n);return K.map=new Z["a"]({target:t.target,view:r}),K.map}}let U=class extends u.a{constructor(){super(...arguments),this.VMap=this,this.load=!1}get map(){return K.map}mounted(){this.init().then(t=>{"success"===t&&(this.load=!0)})}init(){return new Promise((t,e)=>{K.map=new K({target:this.target}),K.map?t("success"):e(new Error("fail"))})}};s([G("VMap")],U.prototype,"VMap",void 0),s([F({default:"map"})],U.prototype,"target",void 0),s([F()],U.prototype,"width",void 0),s([F()],U.prototype,"height",void 0),s([z("width",{default:"100%"})],U.prototype,"mapWidth",void 0),s([z("height",{default:"100%"})],U.prototype,"mapHeight",void 0),U=s([P({components:{}})],U);var X=U,V=X;function Y(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}var W=Y(V,i,a,!1,null,"0bfa819f",null),H=W.exports;let B=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>(e&=63,t+=e<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_",t),"");class q extends u.a{render(){return null}}s([F({default:"ol-layer"})],q.prototype,"className",void 0),s([F({default:1})],q.prototype,"opacity",void 0),s([F({default:!0})],q.prototype,"visible",void 0),s([F({type:Array})],q.prototype,"extent",void 0),s([F()],q.prototype,"zIndex",void 0),s([F()],q.prototype,"minResolution",void 0),s([F()],q.prototype,"maxResolution",void 0),s([F()],q.prototype,"minZoom",void 0),s([F()],q.prototype,"maxZoom",void 0),s([F()],q.prototype,"title",void 0),s([F()],q.prototype,"name",void 0),s([F()],q.prototype,"preview",void 0),s([F()],q.prototype,"baseLayer",void 0),s([F({type:Object,default:()=>({})})],q.prototype,"properties",void 0);var $,Q,J=q,tt=Y(J,$,Q,!1,null,"08b8e5a0",null),et=tt.exports,nt=n("01d4"),rt=n("7f98"),ot=n("2efc"),it=n("92fa"),at=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){while(this.canExpireCache())this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){var e=this.oldest_;while(e)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return Object(it["a"])(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return Object(it["a"])(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){Object(it["a"])(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}(),st=at,ct=n("2c30"),ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.expireCache=function(t){while(this.canExpireCache()){var e=this.peekLast();if(e.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),e=Object(ct["b"])(t),n=e[0];this.forEach(function(t){t.tileCoord[0]!==n&&(this.remove(Object(ct["c"])(t.tileCoord)),t.release())}.bind(this))}},e}(st),ht=lt,pt=n("acc1"),ft={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},dt=n("cef7"),vt=n("e269"),gt=n("1300"),yt=n("256f"),_t=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(t){function e(e){var n=t.call(this)||this;n.projection=Object(yt["g"])(e.projection),n.attributions_=bt(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:"ready",n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var r=n;return n.viewPromise_=new Promise((function(t,e){r.viewResolver=t,r.viewRejector=e})),n}return _t(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Object(gt["b"])()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=bt(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(vt["a"]);function bt(t){return t?Array.isArray(t)?function(e){return t}:"function"===typeof t?t:function(e){return[t]}:null}var Ot=mt,Et=n("089b"),xt=n("345d"),wt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var r=[256,256];return n.tileGrid&&Object(xt["c"])(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),r),n.tileCache=new ht(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return wt(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,r){var o=this.getTileCacheForProjection(t);if(!o)return!1;for(var i,a,s,c=!0,u=n.minX;u<=n.maxX;++u)for(var l=n.minY;l<=n.maxY;++l)a=Object(ct["d"])(e,u,l),s=!1,o.containsKey(a)&&(i=o.get(a),s=i.getState()===pt["a"].LOADED,s&&(s=!1!==r(i))),s||(c=!1);return c},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,r,o){return Object(gt["b"])()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Object(Et["c"])(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return Object(it["a"])(null===e||Object(yt["d"])(e,t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var r=this.getTileGridForProjection(n),o=this.getTilePixelRatio(e),i=Object(xt["c"])(r.getTileSize(t),this.tmpSize);return 1==o?i:Object(xt["b"])(i,o,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=Object(Et["d"])(r,t,n)),Object(ct["f"])(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,r){},e}(Ot),Ct=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tile=n,r}return wt(e,t),e}(dt["a"]),Tt=jt,Rt=n("7fc9");function Pt(t,e){var n=/\{z\}/g,r=/\{x\}/g,o=/\{y\}/g,i=/\{-y\}/g;return function(a,s,c){return a?t.replace(n,a[0].toString()).replace(r,a[1].toString()).replace(o,a[2].toString()).replace(i,(function(){var t=a[0],n=e.getFullTileRange(t);Object(it["a"])(n,55);var r=n.getHeight()-a[2]-1;return r.toString()})):void 0}}function St(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;++o)r[o]=Pt(t[o],e);return It(r)}function It(t){return 1===t.length?t[0]:function(e,n,r){if(e){var o=Object(ct["e"])(e),i=Object(Rt["g"])(o,t.length);return t[i](e,n,r)}}}function At(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var r=n[1].charCodeAt(0),o=n[2].charCodeAt(0),i=void 0;for(i=r;i<=o;++i)e.push(t.replace(n[0],String.fromCharCode(i)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t),n){for(var a=parseInt(n[2],10),s=parseInt(n[1],10);s<=a;s++)e.push(t.replace(n[0],s.toString()));return e}return e.push(t),e}var Mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lt=function(t){function e(n){var r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return r.generateTileUrlFunction_=r.tileUrlFunction===e.prototype.tileUrlFunction,r.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(r.tileUrlFunction=n.tileUrlFunction),r.urls=null,n.urls?r.setUrls(n.urls):n.url&&r.setUrl(n.url),r.tileLoadingKeys_={},r}return Mt(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,r=Object(gt["c"])(n),o=n.getState();o==pt["a"].LOADING?(this.tileLoadingKeys_[r]=!0,e=ft.TILELOADSTART):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=o==pt["a"].ERROR?ft.TILELOADERROR:o==pt["a"].LOADED?ft.TILELOADEND:void 0),void 0!=e&&this.dispatchEvent(new Ct(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),"undefined"!==typeof e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=At(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(St(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var r=Object(ct["d"])(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(Tt),Dt=Lt,Nt=n("a504"),Ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(t){function e(e){var n=this,r=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(r=e.interpolate),n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Gt,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:r,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this,n.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:rt["a"],n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return Ft(e,t),e.prototype.canExpireCache=function(){if(!Nt["a"])return t.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},e.prototype.expireCache=function(e,n){if(Nt["a"]){var r=this.getTileCacheForProjection(e);for(var o in this.tileCache.expireCache(this.tileCache==r?n:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[o];i.expireCache(i==r?n:{})}}else t.prototype.expireCache.call(this,e,n)},e.prototype.getGutterForProjection=function(t){return Nt["a"]&&this.getProjection()&&t&&!Object(yt["d"])(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(Nt["a"]&&this.getProjection()&&e&&!Object(yt["d"])(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(e){if(!Nt["a"])return t.prototype.getTileGridForProjection.call(this,e);var n=this.getProjection();if(!this.tileGrid||n&&!Object(yt["d"])(n,e)){var r=Object(gt["c"])(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Object(Et["c"])(e)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(e){if(!Nt["a"])return t.prototype.getTileCacheForProjection.call(this,e);var n=this.getProjection();if(!n||Object(yt["d"])(n,e))return this.tileCache;var r=Object(gt["c"])(e);return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new ht(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,n,r,o,i){var a=[t,e,n],s=this.getTileCoordForTileUrlFunction(a,o),c=s?this.tileUrlFunction(s,r,o):void 0,u=new this.tileClass(a,void 0!==c?pt["a"].IDLE:pt["a"].EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=i,u.addEventListener(nt["a"].CHANGE,this.handleTileChange.bind(this)),u},e.prototype.getTile=function(t,e,n,r,o){var i=this.getProjection();if(Nt["a"]&&i&&o&&!Object(yt["d"])(i,o)){var a=this.getTileCacheForProjection(o),s=[t,e,n],c=void 0,u=Object(ct["c"])(s);a.containsKey(u)&&(c=a.get(u));var l=this.getKey();if(c&&c.key==l)return c;var h=this.getTileGridForProjection(i),p=this.getTileGridForProjection(o),f=this.getTileCoordForTileUrlFunction(s,o),d=new ot["a"](i,h,o,p,s,f,this.getTilePixelRatio(r),this.getGutter(),function(t,e,n,r){return this.getTileInternal(t,e,n,r,i)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return d.key=l,c?(d.interimTile=c,d.refreshInterimChain(),a.replace(u,d)):a.set(u,d),d}return this.getTileInternal(t,e,n,r,i||o)},e.prototype.getTileInternal=function(t,e,n,r,o){var i=null,a=Object(ct["d"])(t,e,n),s=this.getKey();if(this.tileCache.containsKey(a)){if(i=this.tileCache.get(a),i.key!=s){var c=i;i=this.createTile_(t,e,n,r,o,s),c.getState()==pt["a"].IDLE?i.interimTile=c.interimTile:i.interimTile=c,i.refreshInterimChain(),this.tileCache.replace(a,i)}}else i=this.createTile_(t,e,n,r,o,s),this.tileCache.set(a,i);return i},e.prototype.setRenderReprojectionEdges=function(t){if(Nt["a"]&&this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){if(Nt["a"]){var n=Object(yt["g"])(t);if(n){var r=Object(gt["c"])(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}},e}(Dt);function Gt(t,e){t.getImage().src=e}var kt=zt,Zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kt=function(t){function e(e){var n=this,r=e||{},o=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(o=r.interpolate);var i=void 0!==r.projection?r.projection:"EPSG:3857",a=void 0!==r.tileGrid?r.tileGrid:Object(Et["a"])({extent:Object(Et["b"])(i),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:o,opaque:r.opaque,projection:i,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:a,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this,n.gutter_=void 0!==r.gutter?r.gutter:0,n}return Zt(e,t),e.prototype.getGutter=function(){return this.gutter_},e}(kt),Ut=Kt,Xt=n("480c");let Vt=class extends et{constructor(){super(...arguments),this.layers=[]}render(){return null}mounted(){this.init()}init(){const t=this.initXYZbyURL("http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=88e2f1d5ab64a7477a7361edd6b5f68a"),e=this.initXYZbyURL("http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=88e2f1d5ab64a7477a7361edd6b5f68a");this.layers=[t,e],console.log(this.VMap.map),this.layers.forEach(t=>{this.VMap.map.addLayer(t)})}initXYZbyURL(t){const e={crossOrigin:"anonymous",...this.$props.xyz,url:t},n=new Ut(e);console.log(this.$props);const r={...this.$props,source:n},o=new Xt["a"](r);return o.set("base",!0),o.setZIndex(0),o}};s([S()],Vt.prototype,"VMap",void 0),s([F({default:"tile-layer-"+B()})],Vt.prototype,"layerId",void 0),Vt=s([P],Vt);var Yt,Wt,Ht=Vt,Bt=Ht,qt=Y(Bt,Yt,Wt,!1,null,"5e634ae0",null),$t=qt.exports;$t.install=t=>{t.component($t.name,$t)};var Qt=$t;const Jt=[H,Qt],te=t=>{te.installed||(te.installed=!0,Jt.map(e=>{t.component(e.name,e)}))};"undefined"!==typeof window&&window.Vue&&te(window.Vue);var ee={install:te,VMap:H,VTile:Qt};e["default"]=ee},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fced:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};r.METERS,r.FEET,r.USFEET,r.RADIANS,r.DEGREES;var o={};o[r.RADIANS]=6370997/(2*Math.PI),o[r.DEGREES]=2*Math.PI*6370997/360,o[r.FEET]=.3048,o[r.METERS]=1,o[r.USFEET]=1200/3937,e["b"]=r},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})}));
7
+ function l(t){return l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){return f(t)||d(t)||v()}function f(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function d(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function g(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function y(t,e){_(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){_(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){_(t,e,n)}))}function _(t,e,n){var r=n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e);r.forEach((function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)}))}var m={__proto__:[]},b=m instanceof Array;function O(t){return function(e,n,r){var o="function"===typeof e?e:e.constructor;o.__decorators__||(o.__decorators__=[]),"number"!==typeof r&&(r=void 0),o.__decorators__.push((function(e){return t(e,n,r)}))}}function E(t){var e=l(t);return null==t||"object"!==e&&"function"!==e}function x(t,e){var n=e.prototype._init;e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){t[n]=e},configurable:!0})}))};var r=new e;e.prototype._init=n;var o={};return Object.keys(r).forEach((function(t){void 0!==r[t]&&(o[t]=r[t])})),o}var w=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=e.name||t._componentTag||t.name;var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(t){if("constructor"!==t)if(w.indexOf(t)>-1)e[t]=n[t];else{var r=Object.getOwnPropertyDescriptor(n,t);void 0!==r.value?"function"===typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(e.mixins||(e.mixins=[])).push({data:function(){return h({},t,r.value)}}):(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}})),(e.mixins||(e.mixins=[])).push({data:function(){return x(this,t)}});var r=t.__decorators__;r&&(r.forEach((function(t){return t(e)})),delete t.__decorators__);var o=Object.getPrototypeOf(t.prototype),i=o instanceof u.a?o.constructor:u.a,a=i.extend(e);return T(a,t,i),g()&&y(a,t),a}var C={prototype:!0,arguments:!0,callee:!0,caller:!0};function T(t,e,n){Object.getOwnPropertyNames(e).forEach((function(r){if(!C[r]){var o=Object.getOwnPropertyDescriptor(t,r);if(!o||o.configurable){var i=Object.getOwnPropertyDescriptor(e,r);if(!b){if("cid"===r)return;var a=Object.getOwnPropertyDescriptor(n,r);if(!E(i.value)&&a&&a.value===i.value)return}0,Object.defineProperty(t,r,i)}}}))}function R(t){return"function"===typeof t?j(t):function(e){return j(e,t)}}R.registerHooks=function(t){w.push.apply(w,p(t))};var P=R;function S(t){return O((function(e,n){"undefined"===typeof e.inject&&(e.inject={}),Array.isArray(e.inject)||(e.inject[n]=t||n)}))}function I(t){return"function"!==typeof t||!t.managed&&!t.managedReactive}function A(t){var e=function(){var n=this,r="function"===typeof t?t.call(this):t;for(var o in r=Object.create(r||null),r[M]=Object.create(this[M]||{}),e.managed)r[e.managed[o]]=this[o];var i=function(t){r[e.managedReactive[t]]=a[t],Object.defineProperty(r[M],e.managedReactive[t],{enumerable:!0,configurable:!0,get:function(){return n[t]}})},a=this;for(var o in e.managedReactive)i(o);return r};return e.managed={},e.managedReactive={},e}var M="__reactiveInject__";function L(t){Array.isArray(t.inject)||(t.inject=t.inject||{},t.inject[M]={from:M,default:{}})}var D="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function N(t,e,n){if(D&&!Array.isArray(t)&&"function"!==typeof t&&!t.hasOwnProperty("type")&&"undefined"===typeof t.type){var r=Reflect.getMetadata("design:type",e,n);r!==Object&&(t.type=r)}}function F(t){return void 0===t&&(t={}),function(e,n){N(t,e,n),O((function(e,n){(e.props||(e.props={}))[n]=t}))(e,n)}}function z(t,e){return void 0===e&&(e={}),function(n,r){N(e,n,r),O((function(n,r){(n.props||(n.props={}))[t]=e,(n.computed||(n.computed={}))[r]={get:function(){return this[t]},set:function(e){this.$emit("update:"+t,e)}}}))(n,r)}}function G(t){return O((function(e,n){var r=e.provide;L(e),I(r)&&(r=e.provide=A(r)),r.managed[n]=t||n}))}n("5bc0");var k=n("a2c7"),Z=n("5eee");class K{constructor(t){console.log(t);const e={center:[108.5525,34.3227],zoom:5,constrainResolution:!0,projection:"EPSG:4326"},n={...e},r=new k["a"](n);return K.map=new Z["a"]({target:t.target,view:r}),K.map}}let U=class extends u.a{constructor(){super(...arguments),this.VMap=this,this.load=!1}get map(){return K.map}mounted(){this.init().then(t=>{"success"===t&&(this.load=!0)})}init(){return new Promise((t,e)=>{K.map=new K({target:this.target}),K.map?t("success"):e(new Error("fail"))})}};s([G("VMap")],U.prototype,"VMap",void 0),s([F({default:"map"})],U.prototype,"target",void 0),s([F()],U.prototype,"width",void 0),s([F()],U.prototype,"height",void 0),s([z("width",{default:"100%"})],U.prototype,"mapWidth",void 0),s([z("height",{default:"100%"})],U.prototype,"mapHeight",void 0),U=s([P],U);var X=U,V=X;function Y(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}var W=Y(V,i,a,!1,null,"46d083ac",null),H=W.exports;let B=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>(e&=63,t+=e<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_",t),"");class q extends u.a{render(){return null}}s([F({default:"ol-layer"})],q.prototype,"className",void 0),s([F({default:1})],q.prototype,"opacity",void 0),s([F({default:!0})],q.prototype,"visible",void 0),s([F({type:Array})],q.prototype,"extent",void 0),s([F()],q.prototype,"zIndex",void 0),s([F()],q.prototype,"minResolution",void 0),s([F()],q.prototype,"maxResolution",void 0),s([F()],q.prototype,"minZoom",void 0),s([F()],q.prototype,"maxZoom",void 0),s([F()],q.prototype,"title",void 0),s([F()],q.prototype,"name",void 0),s([F()],q.prototype,"preview",void 0),s([F()],q.prototype,"baseLayer",void 0),s([F({type:Object,default:()=>({})})],q.prototype,"properties",void 0);var $,Q,J=q,tt=Y(J,$,Q,!1,null,"08b8e5a0",null),et=tt.exports,nt=n("01d4"),rt=n("7f98"),ot=n("2efc"),it=n("92fa"),at=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){while(this.canExpireCache())this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){var e=this.oldest_;while(e)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return Object(it["a"])(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return Object(it["a"])(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){Object(it["a"])(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}(),st=at,ct=n("2c30"),ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.expireCache=function(t){while(this.canExpireCache()){var e=this.peekLast();if(e.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),e=Object(ct["b"])(t),n=e[0];this.forEach(function(t){t.tileCoord[0]!==n&&(this.remove(Object(ct["c"])(t.tileCoord)),t.release())}.bind(this))}},e}(st),ht=lt,pt=n("acc1"),ft={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},dt=n("cef7"),vt=n("e269"),gt=n("1300"),yt=n("256f"),_t=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(t){function e(e){var n=t.call(this)||this;n.projection=Object(yt["g"])(e.projection),n.attributions_=bt(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:"ready",n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var r=n;return n.viewPromise_=new Promise((function(t,e){r.viewResolver=t,r.viewRejector=e})),n}return _t(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Object(gt["b"])()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=bt(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(vt["a"]);function bt(t){return t?Array.isArray(t)?function(e){return t}:"function"===typeof t?t:function(e){return[t]}:null}var Ot=mt,Et=n("089b"),xt=n("345d"),wt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var r=[256,256];return n.tileGrid&&Object(xt["c"])(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),r),n.tileCache=new ht(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return wt(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,r){var o=this.getTileCacheForProjection(t);if(!o)return!1;for(var i,a,s,c=!0,u=n.minX;u<=n.maxX;++u)for(var l=n.minY;l<=n.maxY;++l)a=Object(ct["d"])(e,u,l),s=!1,o.containsKey(a)&&(i=o.get(a),s=i.getState()===pt["a"].LOADED,s&&(s=!1!==r(i))),s||(c=!1);return c},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,r,o){return Object(gt["b"])()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Object(Et["c"])(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return Object(it["a"])(null===e||Object(yt["d"])(e,t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var r=this.getTileGridForProjection(n),o=this.getTilePixelRatio(e),i=Object(xt["c"])(r.getTileSize(t),this.tmpSize);return 1==o?i:Object(xt["b"])(i,o,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=Object(Et["d"])(r,t,n)),Object(ct["f"])(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,r){},e}(Ot),Ct=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tile=n,r}return wt(e,t),e}(dt["a"]),Tt=jt,Rt=n("7fc9");function Pt(t,e){var n=/\{z\}/g,r=/\{x\}/g,o=/\{y\}/g,i=/\{-y\}/g;return function(a,s,c){return a?t.replace(n,a[0].toString()).replace(r,a[1].toString()).replace(o,a[2].toString()).replace(i,(function(){var t=a[0],n=e.getFullTileRange(t);Object(it["a"])(n,55);var r=n.getHeight()-a[2]-1;return r.toString()})):void 0}}function St(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;++o)r[o]=Pt(t[o],e);return It(r)}function It(t){return 1===t.length?t[0]:function(e,n,r){if(e){var o=Object(ct["e"])(e),i=Object(Rt["g"])(o,t.length);return t[i](e,n,r)}}}function At(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var r=n[1].charCodeAt(0),o=n[2].charCodeAt(0),i=void 0;for(i=r;i<=o;++i)e.push(t.replace(n[0],String.fromCharCode(i)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t),n){for(var a=parseInt(n[2],10),s=parseInt(n[1],10);s<=a;s++)e.push(t.replace(n[0],s.toString()));return e}return e.push(t),e}var Mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lt=function(t){function e(n){var r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return r.generateTileUrlFunction_=r.tileUrlFunction===e.prototype.tileUrlFunction,r.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(r.tileUrlFunction=n.tileUrlFunction),r.urls=null,n.urls?r.setUrls(n.urls):n.url&&r.setUrl(n.url),r.tileLoadingKeys_={},r}return Mt(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,r=Object(gt["c"])(n),o=n.getState();o==pt["a"].LOADING?(this.tileLoadingKeys_[r]=!0,e=ft.TILELOADSTART):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=o==pt["a"].ERROR?ft.TILELOADERROR:o==pt["a"].LOADED?ft.TILELOADEND:void 0),void 0!=e&&this.dispatchEvent(new Ct(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),"undefined"!==typeof e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=At(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(St(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var r=Object(ct["d"])(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(Tt),Dt=Lt,Nt=n("a504"),Ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(t){function e(e){var n=this,r=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(r=e.interpolate),n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Gt,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:r,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this,n.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:rt["a"],n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return Ft(e,t),e.prototype.canExpireCache=function(){if(!Nt["a"])return t.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},e.prototype.expireCache=function(e,n){if(Nt["a"]){var r=this.getTileCacheForProjection(e);for(var o in this.tileCache.expireCache(this.tileCache==r?n:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[o];i.expireCache(i==r?n:{})}}else t.prototype.expireCache.call(this,e,n)},e.prototype.getGutterForProjection=function(t){return Nt["a"]&&this.getProjection()&&t&&!Object(yt["d"])(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(Nt["a"]&&this.getProjection()&&e&&!Object(yt["d"])(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(e){if(!Nt["a"])return t.prototype.getTileGridForProjection.call(this,e);var n=this.getProjection();if(!this.tileGrid||n&&!Object(yt["d"])(n,e)){var r=Object(gt["c"])(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Object(Et["c"])(e)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(e){if(!Nt["a"])return t.prototype.getTileCacheForProjection.call(this,e);var n=this.getProjection();if(!n||Object(yt["d"])(n,e))return this.tileCache;var r=Object(gt["c"])(e);return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new ht(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,n,r,o,i){var a=[t,e,n],s=this.getTileCoordForTileUrlFunction(a,o),c=s?this.tileUrlFunction(s,r,o):void 0,u=new this.tileClass(a,void 0!==c?pt["a"].IDLE:pt["a"].EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=i,u.addEventListener(nt["a"].CHANGE,this.handleTileChange.bind(this)),u},e.prototype.getTile=function(t,e,n,r,o){var i=this.getProjection();if(Nt["a"]&&i&&o&&!Object(yt["d"])(i,o)){var a=this.getTileCacheForProjection(o),s=[t,e,n],c=void 0,u=Object(ct["c"])(s);a.containsKey(u)&&(c=a.get(u));var l=this.getKey();if(c&&c.key==l)return c;var h=this.getTileGridForProjection(i),p=this.getTileGridForProjection(o),f=this.getTileCoordForTileUrlFunction(s,o),d=new ot["a"](i,h,o,p,s,f,this.getTilePixelRatio(r),this.getGutter(),function(t,e,n,r){return this.getTileInternal(t,e,n,r,i)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return d.key=l,c?(d.interimTile=c,d.refreshInterimChain(),a.replace(u,d)):a.set(u,d),d}return this.getTileInternal(t,e,n,r,i||o)},e.prototype.getTileInternal=function(t,e,n,r,o){var i=null,a=Object(ct["d"])(t,e,n),s=this.getKey();if(this.tileCache.containsKey(a)){if(i=this.tileCache.get(a),i.key!=s){var c=i;i=this.createTile_(t,e,n,r,o,s),c.getState()==pt["a"].IDLE?i.interimTile=c.interimTile:i.interimTile=c,i.refreshInterimChain(),this.tileCache.replace(a,i)}}else i=this.createTile_(t,e,n,r,o,s),this.tileCache.set(a,i);return i},e.prototype.setRenderReprojectionEdges=function(t){if(Nt["a"]&&this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){if(Nt["a"]){var n=Object(yt["g"])(t);if(n){var r=Object(gt["c"])(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}},e}(Dt);function Gt(t,e){t.getImage().src=e}var kt=zt,Zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kt=function(t){function e(e){var n=this,r=e||{},o=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(o=r.interpolate);var i=void 0!==r.projection?r.projection:"EPSG:3857",a=void 0!==r.tileGrid?r.tileGrid:Object(Et["a"])({extent:Object(Et["b"])(i),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:o,opaque:r.opaque,projection:i,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:a,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this,n.gutter_=void 0!==r.gutter?r.gutter:0,n}return Zt(e,t),e.prototype.getGutter=function(){return this.gutter_},e}(kt),Ut=Kt,Xt=n("480c");let Vt=class extends et{constructor(){super(...arguments),this.layers=[]}render(){return null}mounted(){this.init()}init(){const t=this.initXYZbyURL("http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=88e2f1d5ab64a7477a7361edd6b5f68a"),e=this.initXYZbyURL("http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=88e2f1d5ab64a7477a7361edd6b5f68a");this.layers=[t,e],console.log(this.VMap.map),this.layers.forEach(t=>{this.VMap.map.addLayer(t)})}initXYZbyURL(t){const e={crossOrigin:"anonymous",...this.$props.xyz,url:t},n=new Ut(e);console.log(this.$props);const r={...this.$props,source:n},o=new Xt["a"](r);return o.set("base",!0),o.setZIndex(0),o}};s([S()],Vt.prototype,"VMap",void 0),s([F({default:"tile-layer-"+B()})],Vt.prototype,"layerId",void 0),Vt=s([P],Vt);var Yt,Wt,Ht=Vt,Bt=Ht,qt=Y(Bt,Yt,Wt,!1,null,"c1f87780",null),$t=qt.exports;$t.install=t=>{t.component("v-tile",$t)};var Qt=$t;const Jt=[{name:"v-map",component:H},{name:"v-tile",component:Qt}],te=t=>{te.installed||(te.installed=!0,Jt.forEach(e=>{console.log(e.name),t.component(e.name,e.component)}))};"undefined"!==typeof window&&window.Vue&&te(window.Vue);var ee={install:te,VMap:H,VTile:Qt};e["default"]=ee},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fced:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};r.METERS,r.FEET,r.USFEET,r.RADIANS,r.DEGREES;var o={};o[r.RADIANS]=6370997/(2*Math.PI),o[r.DEGREES]=2*Math.PI*6370997/360,o[r.FEET]=.3048,o[r.METERS]=1,o[r.USFEET]=1200/3937,e["b"]=r},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-ol-map",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "private": false,
5
5
  "main": "lib/v-ol-map.umd.min.js",
6
6
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  import VTile from "@/components/Layers/TileLayer/src/index.vue";
2
2
 
3
3
  (VTile as any).install = (Vue: any) => {
4
- Vue.component(VTile.name, VTile);
4
+ Vue.component("v-tile", VTile);
5
5
  };
6
6
 
7
7
  export default VTile;
@@ -4,7 +4,6 @@ import { nanoid } from "nanoid";
4
4
  import BaseLayer from "@/components/Layers/BaseLayer.vue";
5
5
  import { XYZ } from "ol/source";
6
6
  import { Tile as TileLayer } from "ol/layer";
7
- // Vue.extend(BaseLayer);};
8
7
  @Component
9
8
  export default class VTile extends BaseLayer implements Vue {
10
9
  render() {
@@ -14,9 +14,7 @@ import {
14
14
  } from "vue-property-decorator";
15
15
  import { olMap } from "@/utils";
16
16
 
17
- @Component({
18
- components: {},
19
- })
17
+ @Component
20
18
  export default class VMap extends Vue {
21
19
  @Provide("VMap")
22
20
  VMap: this = this;
package/src/index.ts CHANGED
@@ -1,13 +1,23 @@
1
1
  import VMap from "@/components/VMap/src/VMap.vue";
2
2
  import VTile from "@/components/Layers/TileLayer/index";
3
3
 
4
- const components = [VMap, VTile];
4
+ const components = [
5
+ {
6
+ name: "v-map",
7
+ component: VMap,
8
+ },
9
+ {
10
+ name: "v-tile",
11
+ component: VTile,
12
+ },
13
+ ];
5
14
 
6
15
  const install = (Vue: any) => {
7
16
  if ((install as any).installed) return;
8
17
  (install as any).installed = true;
9
- components.map((component) => {
10
- Vue.component(component.name, component);
18
+ components.forEach((component) => {
19
+ console.log(component.name);
20
+ Vue.component(component.name, component.component);
11
21
  });
12
22
  };
13
23
  // 这一步判断window.Vue是否存在,因为直接引用vue.min.js, 它会把Vue绑到Window上,我们直接引用打包好的js才能正常跑起来。
@@ -21,6 +21,6 @@ export class olMap {
21
21
  target: options.target,
22
22
  view: view,
23
23
  });
24
- return olMap.map
24
+ return olMap.map;
25
25
  }
26
26
  }