gis-map-universal 0.3.0 → 0.3.2

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.
Files changed (2) hide show
  1. package/gismap.umd.js +238 -91
  2. package/package.json +1 -1
package/gismap.umd.js CHANGED
@@ -17038,17 +17038,6 @@ class Canvg {
17038
17038
 
17039
17039
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
17040
17040
 
17041
- /***/ }),
17042
-
17043
- /***/ "0dbb":
17044
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
17045
-
17046
- "use strict";
17047
- /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ClusterList_vue_vue_type_style_index_0_id_576bc755_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4b75");
17048
- /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ClusterList_vue_vue_type_style_index_0_id_576bc755_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ClusterList_vue_vue_type_style_index_0_id_576bc755_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
17049
- /* unused harmony reexport * */
17050
-
17051
-
17052
17041
  /***/ }),
17053
17042
 
17054
17043
  /***/ "0df5":
@@ -80388,22 +80377,6 @@ exports.toNumber = toNumber;
80388
80377
 
80389
80378
  /***/ }),
80390
80379
 
80391
- /***/ "4b75":
80392
- /***/ (function(module, exports, __webpack_require__) {
80393
-
80394
- // style-loader: Adds some css to the DOM by adding a <style> tag
80395
-
80396
- // load the styles
80397
- var content = __webpack_require__("9784");
80398
- if(content.__esModule) content = content.default;
80399
- if(typeof content === 'string') content = [[module.i, content, '']];
80400
- if(content.locals) module.exports = content.locals;
80401
- // add the styles to the DOM
80402
- var add = __webpack_require__("499e").default
80403
- var update = add("0839ff90", content, true, {"sourceMap":false,"shadowMode":false});
80404
-
80405
- /***/ }),
80406
-
80407
80380
  /***/ "4cdf":
80408
80381
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
80409
80382
 
@@ -101228,6 +101201,20 @@ module.exports = {
101228
101201
  };
101229
101202
 
101230
101203
 
101204
+ /***/ }),
101205
+
101206
+ /***/ "6b64":
101207
+ /***/ (function(module, exports, __webpack_require__) {
101208
+
101209
+ // Imports
101210
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
101211
+ exports = ___CSS_LOADER_API_IMPORT___(false);
101212
+ // Module
101213
+ exports.push([module.i, ".clusterListPopup[data-v-0634475e]{width:300px;height:170px}ul li[data-v-0634475e]{list-style-type:none}.paginate-list[data-v-0634475e]{height:83%;padding:0 3%;margin:4% 1% 0 1%;overflow:auto;max-height:83%}.list-item[data-v-0634475e]{padding:1.3% 0;cursor:pointer;display:flex;align-items:normal}.list-item[data-v-0634475e]:hover{color:#21c8ff}.item-icon[data-v-0634475e]{width:20px;height:20px;margin-right:10px}.paginate-links[data-v-0634475e]{list-style-type:none;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;margin:1% 0 0 0}.paginate-links[data-v-0634475e] .left-arrow{color:#fff;border-radius:2px;text-align:center;margin:0 2px}.paginate-links[data-v-0634475e] .left-arrow a{display:inline-block;width:20px;height:20px;align-content:center}.paginate-links[data-v-0634475e] .left-arrow:hover{background-color:#217996;transition:all .2s cubic-bezier(.82,0,1,.9)}.paginate-links[data-v-0634475e] .number{border:1px solid #217996;text-align:center;border-radius:2px;margin:0 2px}.paginate-links[data-v-0634475e] .number a{display:inline-block;width:20px;height:20px;align-content:center}.paginate-links[data-v-0634475e] .number:hover{background-color:#217996;transition:all .2s cubic-bezier(.82,0,1,.9)}.paginate-links[data-v-0634475e] .right-arrow{color:#fff;border-radius:2px;text-align:center;margin:0 2px}.paginate-links[data-v-0634475e] .right-arrow a{display:inline-block;width:20px;height:20px;align-content:center}.paginate-links[data-v-0634475e] .right-arrow:hover{background-color:#217996;transition:all .2s cubic-bezier(.82,0,1,.9)}.paginate-links[data-v-0634475e] .active{color:#fff;background-color:#217996}.paginate-links[data-v-0634475e] .disabled,.paginate-links[data-v-0634475e] .disabled:hover{cursor:not-allowed;background:none;color:#a7a7a7}.item-content[data-v-0634475e]{letter-spacing:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}", ""]);
101214
+ // Exports
101215
+ module.exports = exports;
101216
+
101217
+
101231
101218
  /***/ }),
101232
101219
 
101233
101220
  /***/ "6c59":
@@ -130850,20 +130837,6 @@ function assignClosestMultiArrayPoint(flatCoordinates, offset, endss, stride, ma
130850
130837
  }
130851
130838
  //# sourceMappingURL=closest.js.map
130852
130839
 
130853
- /***/ }),
130854
-
130855
- /***/ "9784":
130856
- /***/ (function(module, exports, __webpack_require__) {
130857
-
130858
- // Imports
130859
- var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
130860
- exports = ___CSS_LOADER_API_IMPORT___(false);
130861
- // Module
130862
- exports.push([module.i, ".clusterListPopup[data-v-576bc755]{width:300px;height:170px}ul li[data-v-576bc755]{list-style-type:none}.paginate-list[data-v-576bc755]{height:83%;padding:0 3%;margin:4% 1% 0 1%;overflow:auto;max-height:83%}.list-item[data-v-576bc755]{padding:1.3% 0;cursor:pointer;display:flex;align-items:normal}.list-item[data-v-576bc755]:hover{color:#21c8ff}.item-icon[data-v-576bc755]{width:20px;height:20px;margin-right:10px}.paginate-links[data-v-576bc755]{list-style-type:none;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;margin:1% 0 0 0}.paginate-links[data-v-576bc755] .left-arrow{padding:1% 2%!important;color:#fff;border-radius:2px;margin:0 2px}.paginate-links[data-v-576bc755] .left-arrow:hover{background-color:#217996;transition:all .2s cubic-bezier(.82,0,1,.9)}.paginate-links[data-v-576bc755] .number{padding:1% 2%!important;border:1px solid #217996;text-align:center;border-radius:2px;margin:0 2px}.paginate-links[data-v-576bc755] .number:hover{background-color:#217996;transition:all .2s cubic-bezier(.82,0,1,.9)}.paginate-links[data-v-576bc755] .right-arrow{padding:1% 2%!important;color:#fff;border-radius:2px;margin:0 2px}.paginate-links[data-v-576bc755] .right-arrow:hover{background-color:#217996;transition:all .2s cubic-bezier(.82,0,1,.9)}.paginate-links[data-v-576bc755] .active{color:#fff;background-color:#217996}.paginate-links[data-v-576bc755] .disabled,.paginate-links[data-v-576bc755] .disabled:hover{cursor:not-allowed;background:none;color:#a7a7a7}.item-content[data-v-576bc755]{letter-spacing:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}", ""]);
130863
- // Exports
130864
- module.exports = exports;
130865
-
130866
-
130867
130840
  /***/ }),
130868
130841
 
130869
130842
  /***/ "97e6":
@@ -155210,6 +155183,17 @@ function transformExtentWithOptions(extent, opt_options) {
155210
155183
  }
155211
155184
  //# sourceMappingURL=Feature.js.map
155212
155185
 
155186
+ /***/ }),
155187
+
155188
+ /***/ "b83e":
155189
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
155190
+
155191
+ "use strict";
155192
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ClusterList_vue_vue_type_style_index_0_id_0634475e_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fae9");
155193
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ClusterList_vue_vue_type_style_index_0_id_0634475e_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ClusterList_vue_vue_type_style_index_0_id_0634475e_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
155194
+ /* unused harmony reexport * */
155195
+
155196
+
155213
155197
  /***/ }),
155214
155198
 
155215
155199
  /***/ "b88d":
@@ -456968,16 +456952,16 @@ var TypeB_component = normalizeComponent(
456968
456952
  )
456969
456953
 
456970
456954
  /* harmony default export */ var TypeB = (TypeB_component.exports);
456971
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"50d482b6-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/gisMap2d/src/component/netLayer/ClusterList.vue?vue&type=template&id=576bc755&scoped=true
456972
- var ClusterListvue_type_template_id_576bc755_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"clusterListPopup"},[_c('paginate',{staticClass:"paginate-list",attrs:{"name":"clusterList","list":_vm.clusterList,"per":5}},_vm._l((_vm.paginated('clusterList')),function(item,index){return _c('li',{key:index,staticClass:"list-item",on:{"click":function($event){return _vm.danji(item)}}},[_c('img',{staticClass:"item-icon",attrs:{"src":item.iconUrl}}),_c('div',{staticClass:"item-content",attrs:{"title":item.otherInfo.name}},[_vm._v(" "+_vm._s(item.otherInfo.name)+" ")])])}),0),_c('paginate-links',{directives:[{name:"show",rawName:"v-show",value:(_vm.exceed),expression:"exceed"}],attrs:{"async":true,"for":"clusterList","limit":2,"show-step-links":true,"step-links":{
456955
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"50d482b6-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/gisMap2d/src/component/netLayer/ClusterList.vue?vue&type=template&id=0634475e&scoped=true
456956
+ var ClusterListvue_type_template_id_0634475e_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"clusterListPopup"},[_c('paginate',{staticClass:"paginate-list",attrs:{"name":"clusterList","list":_vm.clusterList,"per":5}},_vm._l((_vm.paginated('clusterList')),function(item,index){return _c('li',{key:index,staticClass:"list-item",on:{"click":function($event){return _vm.danji(item)}}},[_c('img',{staticClass:"item-icon",attrs:{"src":item.iconUrl}}),_c('div',{staticClass:"item-content",attrs:{"title":item.otherInfo.name}},[_vm._v(" "+_vm._s(item.otherInfo.name)+" ")])])}),0),_c('paginate-links',{directives:[{name:"show",rawName:"v-show",value:(_vm.exceed),expression:"exceed"}],attrs:{"async":true,"for":"clusterList","limit":2,"show-step-links":true,"step-links":{
456973
456957
  next: '>',
456974
456958
  prev: '<',
456975
456959
  }}})],1)
456976
456960
  }
456977
- var ClusterListvue_type_template_id_576bc755_scoped_true_staticRenderFns = []
456961
+ var ClusterListvue_type_template_id_0634475e_scoped_true_staticRenderFns = []
456978
456962
 
456979
456963
 
456980
- // CONCATENATED MODULE: ./packages/gisMap2d/src/component/netLayer/ClusterList.vue?vue&type=template&id=576bc755&scoped=true
456964
+ // CONCATENATED MODULE: ./packages/gisMap2d/src/component/netLayer/ClusterList.vue?vue&type=template&id=0634475e&scoped=true
456981
456965
 
456982
456966
  // EXTERNAL MODULE: ./node_modules/vue-paginate/dist/vue-paginate.js
456983
456967
  var vue_paginate = __webpack_require__("baff");
@@ -457026,8 +457010,8 @@ external_commonjs_vue_commonjs2_vue_root_Vue_default.a.use(vue_paginate_default.
457026
457010
 
457027
457011
  // CONCATENATED MODULE: ./packages/gisMap2d/src/component/netLayer/ClusterList.vue?vue&type=script&lang=js
457028
457012
  /* harmony default export */ var netLayer_ClusterListvue_type_script_lang_js = (ClusterListvue_type_script_lang_js);
457029
- // EXTERNAL MODULE: ./packages/gisMap2d/src/component/netLayer/ClusterList.vue?vue&type=style&index=0&id=576bc755&prod&scoped=true&lang=css
457030
- var ClusterListvue_type_style_index_0_id_576bc755_prod_scoped_true_lang_css = __webpack_require__("0dbb");
457013
+ // EXTERNAL MODULE: ./packages/gisMap2d/src/component/netLayer/ClusterList.vue?vue&type=style&index=0&id=0634475e&prod&scoped=true&lang=css
457014
+ var ClusterListvue_type_style_index_0_id_0634475e_prod_scoped_true_lang_css = __webpack_require__("b83e");
457031
457015
 
457032
457016
  // CONCATENATED MODULE: ./packages/gisMap2d/src/component/netLayer/ClusterList.vue
457033
457017
 
@@ -457040,11 +457024,11 @@ var ClusterListvue_type_style_index_0_id_576bc755_prod_scoped_true_lang_css = __
457040
457024
 
457041
457025
  var ClusterList_component = normalizeComponent(
457042
457026
  netLayer_ClusterListvue_type_script_lang_js,
457043
- ClusterListvue_type_template_id_576bc755_scoped_true_render,
457044
- ClusterListvue_type_template_id_576bc755_scoped_true_staticRenderFns,
457027
+ ClusterListvue_type_template_id_0634475e_scoped_true_render,
457028
+ ClusterListvue_type_template_id_0634475e_scoped_true_staticRenderFns,
457045
457029
  false,
457046
457030
  null,
457047
- "576bc755",
457031
+ "0634475e",
457048
457032
  null
457049
457033
 
457050
457034
  )
@@ -457236,7 +457220,7 @@ var LatlonPick_component = normalizeComponent(
457236
457220
  zIndex: 1,
457237
457221
  projection: "EPSG:3857",
457238
457222
  });
457239
- // this.map.addLayer(baselayer);
457223
+ this.map.addLayer(baselayer);
457240
457224
  // 加载4市区划高亮WMS服务
457241
457225
  let wmslayer = new Tile["default"]({
457242
457226
  layerName: "wmslayer",
@@ -457249,9 +457233,9 @@ var LatlonPick_component = normalizeComponent(
457249
457233
  }),
457250
457234
  zIndex: 2,
457251
457235
  projection: "EPSG:3857",
457252
- opacity: 0.2,
457236
+ opacity: 0.7,
457253
457237
  });
457254
- // this.map.addLayer(wmslayer);
457238
+ this.map.addLayer(wmslayer);
457255
457239
  // 加载全省道路线
457256
457240
  let baseRoadlayer = new Tile["default"]({
457257
457241
  layerName: "baseRoadlayer",
@@ -457265,7 +457249,7 @@ var LatlonPick_component = normalizeComponent(
457265
457249
  zIndex: 4,
457266
457250
  projection: "EPSG:3857",
457267
457251
  });
457268
- // this.map.addLayer(baseRoadlayer);
457252
+ this.map.addLayer(baseRoadlayer);
457269
457253
  // 加载G35高亮线
457270
457254
  let G35layer = new Tile["default"]({
457271
457255
  layerName: "G35layer",
@@ -457327,20 +457311,10 @@ var LatlonPick_component = normalizeComponent(
457327
457311
  element: elPopup,
457328
457312
  positioning: "bottom-center",
457329
457313
  stopEvent: true,
457330
- autoPan: false,
457331
- // autoPanAnimation: {
457332
- // duration: 250,
457333
- // },
457314
+ autoPan: false
457334
457315
  });
457335
457316
  this.map.addOverlay(this.overlayPopup);
457336
457317
  this.map.on("click", (e) => {
457337
- // e.preventDefault();
457338
- // this.map.getView().animate({
457339
- // center: this.mapCenter,
457340
- // zoom: this.map.getView().getZoom(),
457341
- // duration: 10
457342
- // });
457343
- console.log('点击事件',this.map.getView().getCenter(),this.map.getView().getZoom());
457344
457318
  if (
457345
457319
  !this.map.getInteractions().getArray().includes(this.measuredraw) &&
457346
457320
  // !this.$refs.measureTool.measuredraw.getActive() &&
@@ -457375,6 +457349,7 @@ var LatlonPick_component = normalizeComponent(
457375
457349
  -this.popupWidth / 2,
457376
457350
  -this.popupHeight,
457377
457351
  ]);
457352
+ this.overlayPopup.set('popupBS','clusterList')
457378
457353
  } else {
457379
457354
  this.map.getView().animate({
457380
457355
  center: feature.getGeometry().getCoordinates(),
@@ -457503,6 +457478,25 @@ var LatlonPick_component = normalizeComponent(
457503
457478
  }
457504
457479
  }
457505
457480
  });
457481
+ this.map.getView().on('change', (event) => {
457482
+ if (this.map.getView().getZoom() < 18) {
457483
+ let popupBS = this.overlayPopup.get('popupBS')
457484
+ if (popupBS === 'clusterList') {
457485
+ this.closePopup()
457486
+ }
457487
+ this.gongganTextLayerList.forEach(e => {
457488
+ e.setVisible(false)
457489
+ });
457490
+ }else{
457491
+ if(this.gongganTextLayerShow){
457492
+ this.gongganTextLayerList.forEach(e => {
457493
+ if(e.get("isvis")){
457494
+ e.setVisible(true)
457495
+ }
457496
+ });
457497
+ }
457498
+ }
457499
+ });
457506
457500
  },
457507
457501
  initRadarLayers(url) {
457508
457502
  let radarLayer = new layer_Image["default"]({
@@ -457871,7 +457865,12 @@ var Cluster_Cluster = /** @class */ (function (_super) {
457871
457865
 
457872
457866
  /* harmony default export */ var utills = ({
457873
457867
  data() {
457874
- return {};
457868
+ return {
457869
+ gongganTextLayerShow: false,
457870
+ gongganTextLayerList: [],
457871
+ sourceWithoutTextList: [],
457872
+ sourceWithTextList: [],
457873
+ };
457875
457874
  },
457876
457875
  methods: {
457877
457876
  openPopupByattr(LayerType, attr) {
@@ -457928,6 +457927,7 @@ var Cluster_Cluster = /** @class */ (function (_super) {
457928
457927
  });
457929
457928
  },
457930
457929
  addPointByArr(pointsObj, id, isCluster) {
457930
+ let that = this;
457931
457931
  this.isCluster = isCluster;
457932
457932
  let arry = this.map.getLayers().getArray();
457933
457933
  let foundLayer = null;
@@ -457938,8 +457938,17 @@ var Cluster_Cluster = /** @class */ (function (_super) {
457938
457938
  break;
457939
457939
  }
457940
457940
  }
457941
- this.sourceWithoutText = new source_Vector["default"]();
457942
- this.sourceWithText = new source_Vector["default"]();
457941
+ let sourceWithoutText = new source_Vector["default"]();
457942
+ let sourceWithText = new source_Vector["default"]();
457943
+ let gongganTextLayer = new layer_Vector["default"]({
457944
+ layerName: id + "_Text",
457945
+ zIndex: 999,
457946
+ visible: false,
457947
+ });
457948
+ gongganTextLayer.set("isvis", false)
457949
+ let gongganTextSource = new source_Vector["default"]();
457950
+ this.gongganTextLayerList.push(gongganTextLayer);
457951
+ this.map.addLayer(gongganTextLayer);
457943
457952
  pointsObj.pointList.forEach((data) => {
457944
457953
  let feature = new ol_Feature["a" /* default */]({
457945
457954
  title: "要素点",
@@ -457952,14 +457961,19 @@ var Cluster_Cluster = /** @class */ (function (_super) {
457952
457961
  feature.set("longitude", data.longitude);
457953
457962
  feature.set("latitude", data.latitude);
457954
457963
  feature.set("isVisible", false);
457964
+ feature.set("layerId", id);
457955
457965
  let styleWithoutText = new Style["default"]({
457956
457966
  image: new Icon["default"]({
457957
457967
  src: data.iconUrl,
457958
457968
  scale: data.scale,
457969
+ offset: data.offset,
457970
+ offsetOrigin: "bottom-right",
457971
+ size: data.size,
457959
457972
  }),
457960
457973
  });
457961
457974
  feature.setStyle(styleWithoutText);
457962
- this.sourceWithoutText.addFeature(feature);
457975
+ sourceWithoutText.addFeature(feature);
457976
+ this.sourceWithoutTextList.push(sourceWithoutText);
457963
457977
  });
457964
457978
  pointsObj.pointList.forEach((data) => {
457965
457979
  let feature = new ol_Feature["a" /* default */]({
@@ -457973,10 +457987,14 @@ var Cluster_Cluster = /** @class */ (function (_super) {
457973
457987
  feature.set("longitude", data.longitude);
457974
457988
  feature.set("latitude", data.latitude);
457975
457989
  feature.set("isVisible", false);
457990
+ feature.set("layerId", id);
457976
457991
  let styleWithText = new Style["default"]({
457977
457992
  image: new Icon["default"]({
457978
457993
  src: data.iconUrl,
457979
457994
  scale: data.scale,
457995
+ offset: data.offset,
457996
+ offsetOrigin: "bottom-right",
457997
+ size: data.size,
457980
457998
  }),
457981
457999
  text: new style_Text["default"]({
457982
458000
  text: data.otherInfo.stake,
@@ -457995,7 +458013,8 @@ var Cluster_Cluster = /** @class */ (function (_super) {
457995
458013
  }),
457996
458014
  });
457997
458015
  feature.setStyle(styleWithText);
457998
- this.sourceWithText.addFeature(feature);
458016
+ sourceWithText.addFeature(feature);
458017
+ this.sourceWithTextList.push(sourceWithText);
457999
458018
  });
458000
458019
  if (isCluster) {
458001
458020
  this.customLayer = new layer_Vector["default"]({
@@ -458005,12 +458024,15 @@ var Cluster_Cluster = /** @class */ (function (_super) {
458005
458024
  const size = feature.get("features").length;
458006
458025
  let style;
458007
458026
  if (size > 1) {
458008
- style = new Style["default"]({
458027
+ let circleStyle = new Style["default"]({
458009
458028
  image: new style_Circle["default"]({
458010
- // 圆形
458011
- radius: 18,
458029
+ radius: 20,
458012
458030
  fill: new Fill["default"]({
458013
- color: [255, 160, 0, 0.7],
458031
+ color: [255, 255, 255, 0.4],
458032
+ }),
458033
+ stroke: new Stroke["default"]({
458034
+ color: [255, 255, 255, 0.7],
458035
+ width: 1,
458014
458036
  }),
458015
458037
  }),
458016
458038
  text: new style_Text["default"]({
@@ -458018,14 +458040,81 @@ var Cluster_Cluster = /** @class */ (function (_super) {
458018
458040
  color: "#ffffff",
458019
458041
  }),
458020
458042
  offsetY: 2,
458021
- font: "bold 14px sans-serif",
458022
- text:
458023
- size > 1
458024
- ? size.toString()
458025
- : feature.get("features")[0].values_.name,
458043
+ font: "14px sans-serif",
458044
+ text: size.toString(),
458026
458045
  }),
458027
458046
  });
458028
- return style;
458047
+ let imageStyle1 = new Style["default"]({
458048
+ image: new Icon["default"]({
458049
+ src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iNDIiIHZpZXdCb3g9IjAgMCAzNCA0MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IiYjMjMwOyYjMTUwOyYjMTg5OyYjMjI5OyYjMTgzOyYjMTY1OyIgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzQ0M18zNDkpIj4KPGcgaWQ9IiYjMjMzOyYjMTYxOyYjMTgxOyYjMjMzOyYjMTU3OyYjMTYyOy0xIj4KPGcgaWQ9IiYjMjMzOyYjMTY2OyYjMTUwOyYjMjMzOyYjMTYxOyYjMTgxOy0mIzIzMTsmIzE1MzsmIzE4OTsmIzIzMjsmIzEzNzsmIzE3ODsmIzIyOTsmIzE4NTsmIzE3OTsmIzIzMzsmIzE1NzsmIzE2MjsxIj4KPGcgaWQ9IiYjMjI5OyYjMTU1OyYjMTkwOyYjMjMwOyYjMTYwOyYjMTM1OyI+CjxnIGlkPSImIzIzMDsmIzE1MDsmIzE4OTsmIzIyOTsmIzE4MzsmIzE2NTtfMiI+CjxnIGlkPSImIzIzMDsmIzE2NDsmIzE3MzsmIzIyOTsmIzE1NjsmIzEzNDsmIzIyOTsmIzE4OTsmIzE2MjsiPgo8cGF0aCBpZD0iVmVjdG9yIiB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IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlT2Zmc2V0Lz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iNC41Ii8+CjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9ImFyaXRobWV0aWMiIGsyPSItMSIgazM9IjEiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMC44MzEzNzMgMCAwIDAgMCAwLjc2ODYyNyAwIDAgMCAwIDAuNDk4MDM5IDAgMCAwIDEgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0ic2hhcGUiIHJlc3VsdD0iZWZmZWN0MV9pbm5lclNoYWRvd180NDNfMzQ5Ii8+CjwvZmlsdGVyPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzQ0M18zNDkiPgo8cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iNDIiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",
458050
+ }),
458051
+ text: new style_Text["default"]({
458052
+ fill: new Fill["default"]({
458053
+ color: "#ffffff",
458054
+ }),
458055
+ offsetY: -2,
458056
+ font: "14px sans-serif",
458057
+ text: size.toString(),
458058
+ }),
458059
+ });
458060
+ let imageStyle2 = new Style["default"]({
458061
+ image: new Icon["default"]({
458062
+ src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iNDIiIHZpZXdCb3g9IjAgMCAzNCA0MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IiYjMjMwOyYjMTQ5OyYjMTMzOyYjMjMzOyYjMTU0OyYjMTU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zNCIgaGVpZ2h0PSI0MiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",
458063
+ }),
458064
+ text: new style_Text["default"]({
458065
+ fill: new Fill["default"]({
458066
+ color: "#ffffff",
458067
+ }),
458068
+ offsetY: -2,
458069
+ font: "14px sans-serif",
458070
+ text: size.toString(),
458071
+ }),
458072
+ });
458073
+ if (that.map.getView().getZoom() < 18) {
458074
+ return circleStyle;
458075
+ } else {
458076
+ let point = feature.get("features")[0].getProperties();
458077
+ let stakeFeature = new ol_Feature["a" /* default */]({
458078
+ title: "共杆桩号",
458079
+ geometry: new geom_Point["default"](
458080
+ Object(ol_proj["fromLonLat"])([point.longitude, point.latitude])
458081
+ ),
458082
+ });
458083
+ let featrueWithText = new Style["default"]({
458084
+ text: new style_Text["default"]({
458085
+ text: point.otherInfo.stake,
458086
+ offsetY: 30,
458087
+ fill: new Fill["default"]({ color: "#f8f6e6" }),
458088
+ font: "13px Calibri,sans-serif",
458089
+ backgroundFill: new Fill["default"]({ color: "rgba(50, 35, 5, 0.7)" }),
458090
+ backgroundStroke: new Stroke["default"]({
458091
+ color: "#c7b838",
458092
+ width: 1,
458093
+ lineDash: [4, 4],
458094
+ }),
458095
+ textAlign: "center",
458096
+ textBaseline: "middle",
458097
+ padding: [2, 1, 1, 2],
458098
+ }),
458099
+ });
458100
+ stakeFeature.setStyle(featrueWithText);
458101
+ gongganTextSource.addFeature(stakeFeature);
458102
+ gongganTextLayer.setSource(gongganTextSource);
458103
+ let bz = 1;
458104
+ feature.get("features").forEach((e) => {
458105
+ let state = e.getProperties().otherInfo.state;
458106
+ if (state === 1) {
458107
+ bz = 1;
458108
+ } else {
458109
+ bz = 0;
458110
+ }
458111
+ });
458112
+ if (bz === 1) {
458113
+ return imageStyle1;
458114
+ } else {
458115
+ return imageStyle2;
458116
+ }
458117
+ }
458029
458118
  } else {
458030
458119
  style = feature.get("features")[0].getStyle();
458031
458120
  return style;
@@ -458035,7 +458124,7 @@ var Cluster_Cluster = /** @class */ (function (_super) {
458035
458124
  const clusterSource = new source_Cluster({
458036
458125
  distance: 50,
458037
458126
  minDistance: 200,
458038
- source: this.sourceWithoutText,
458127
+ source: sourceWithoutText,
458039
458128
  });
458040
458129
  if (foundLayer) {
458041
458130
  foundLayer.setSource(clusterSource);
@@ -458048,9 +458137,9 @@ var Cluster_Cluster = /** @class */ (function (_super) {
458048
458137
  zIndex: 999,
458049
458138
  });
458050
458139
  if (foundLayer) {
458051
- foundLayer.setSource(this.sourceWithoutText);
458140
+ foundLayer.setSource(sourceWithoutText);
458052
458141
  } else {
458053
- this.customLayer.setSource(this.sourceWithoutText);
458142
+ this.customLayer.setSource(sourceWithoutText);
458054
458143
  }
458055
458144
  }
458056
458145
  if (!foundLayer) {
@@ -458095,6 +458184,12 @@ var Cluster_Cluster = /** @class */ (function (_super) {
458095
458184
  }
458096
458185
  }
458097
458186
  this.map.removeLayer(foundLayer);
458187
+ this.findLayerByName(layerName + "_Text").setVisible(false);
458188
+ this.gongganTextLayerList.forEach(e => {
458189
+ if (e.getProperties().layerName === layerName+"_Text") {
458190
+ e.set("isvis", false)
458191
+ }
458192
+ });
458098
458193
  this.closePopup();
458099
458194
  },
458100
458195
  findLayerByName(layerName) {
@@ -458109,34 +458204,70 @@ var Cluster_Cluster = /** @class */ (function (_super) {
458109
458204
  }
458110
458205
  return foundLayer;
458111
458206
  },
458207
+ isLayerInMap(layer) {
458208
+ var layersArray = this.map.getLayers().getArray();
458209
+ return layersArray.some(function (mapLayer) {
458210
+ return mapLayer === layer;
458211
+ });
458212
+ },
458112
458213
  pileIsShow(layerName, isShow) {
458113
- if(this.findLayerByName(layerName)){
458214
+ if (this.findLayerByName(layerName)) {
458215
+ let newSourceWithout = null;
458216
+ let newSourceWith = null;
458217
+ this.sourceWithoutTextList.forEach((e) => {
458218
+ let lid = e.getFeatures()[0].getProperties().layerId;
458219
+ if (lid === layerName) {
458220
+ newSourceWithout = e;
458221
+ }
458222
+ });
458223
+ this.sourceWithTextList.forEach((e) => {
458224
+ let lid = e.getFeatures()[0].getProperties().layerId;
458225
+ if (lid === layerName) {
458226
+ newSourceWith = e;
458227
+ }
458228
+ });
458114
458229
  if (this.isCluster) {
458115
458230
  if (!isShow) {
458116
458231
  const newclusterSource = new source_Cluster({
458117
458232
  distance: 50,
458118
458233
  minDistance: 200,
458119
- source: this.sourceWithoutText,
458234
+ source: newSourceWithout,
458120
458235
  });
458121
458236
  this.findLayerByName(layerName).setSource(newclusterSource);
458237
+ this.findLayerByName(layerName + "_Text").setVisible(false);
458238
+ this.gongganTextLayerList.forEach(e => {
458239
+ if (e.getProperties().layerName === layerName+"_Text") {
458240
+ e.set("isvis", false)
458241
+ }
458242
+ });
458243
+ this.gongganTextLayerShow = false;
458122
458244
  } else {
458123
458245
  const newclusterSource = new source_Cluster({
458124
458246
  distance: 50,
458125
458247
  minDistance: 200,
458126
- source: this.sourceWithText,
458248
+ source: newSourceWith,
458127
458249
  });
458128
458250
  this.findLayerByName(layerName).setSource(newclusterSource);
458251
+ if (this.map.getView().getZoom() >= 18) {
458252
+ this.findLayerByName(layerName + "_Text").setVisible(true);
458253
+ this.gongganTextLayerList.forEach(e => {
458254
+ if (e.getProperties().layerName === layerName+"_Text") {
458255
+ e.set("isvis", true)
458256
+ }
458257
+ });
458258
+ }
458259
+ this.gongganTextLayerShow = true;
458129
458260
  }
458130
458261
  } else {
458131
458262
  if (!isShow) {
458132
- this.findLayerByName(layerName).setSource(this.sourceWithoutText);
458263
+ this.findLayerByName(layerName).setSource(newSourceWithout);
458133
458264
  } else {
458134
- this.findLayerByName(layerName).setSource(this.sourceWithText);
458265
+ this.findLayerByName(layerName).setSource(newSourceWith);
458135
458266
  }
458136
458267
  }
458137
- }else{
458138
- console.log('未找到该图层');
458139
- return '未找到该图层'
458268
+ } else {
458269
+ console.log("未找到该图层");
458270
+ return "未找到该图层";
458140
458271
  }
458141
458272
  },
458142
458273
  },
@@ -458643,6 +458774,22 @@ if (typeof window !== 'undefined' && window.Vue) {
458643
458774
 
458644
458775
 
458645
458776
 
458777
+ /***/ }),
458778
+
458779
+ /***/ "fae9":
458780
+ /***/ (function(module, exports, __webpack_require__) {
458781
+
458782
+ // style-loader: Adds some css to the DOM by adding a <style> tag
458783
+
458784
+ // load the styles
458785
+ var content = __webpack_require__("6b64");
458786
+ if(content.__esModule) content = content.default;
458787
+ if(typeof content === 'string') content = [[module.i, content, '']];
458788
+ if(content.locals) module.exports = content.locals;
458789
+ // add the styles to the DOM
458790
+ var add = __webpack_require__("499e").default
458791
+ var update = add("9bb771c0", content, true, {"sourceMap":false,"shadowMode":false});
458792
+
458646
458793
  /***/ }),
458647
458794
 
458648
458795
  /***/ "faf4":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gis-map-universal",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "GIS通用组件",
5
5
  "main": "gismap.umd.js",
6
6
  "private": false,