gis-map-universal 1.1.1 → 1.1.3
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/gismap.umd.js +230 -117
- package/package.json +1 -2
package/gismap.umd.js
CHANGED
|
@@ -21720,6 +21720,17 @@ exports.push([module.i, ".Popup[data-v-4267aeb6]{width:2.1rem;height:1.4rem}.vid
|
|
|
21720
21720
|
module.exports = exports;
|
|
21721
21721
|
|
|
21722
21722
|
|
|
21723
|
+
/***/ }),
|
|
21724
|
+
|
|
21725
|
+
/***/ "2f93":
|
|
21726
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21727
|
+
|
|
21728
|
+
"use strict";
|
|
21729
|
+
/* 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_AreaAnalysisTool_vue_vue_type_style_index_0_id_7de86bf4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ef57");
|
|
21730
|
+
/* 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_AreaAnalysisTool_vue_vue_type_style_index_0_id_7de86bf4_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_AreaAnalysisTool_vue_vue_type_style_index_0_id_7de86bf4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
21731
|
+
/* unused harmony reexport * */
|
|
21732
|
+
|
|
21733
|
+
|
|
21723
21734
|
/***/ }),
|
|
21724
21735
|
|
|
21725
21736
|
/***/ "2fe6":
|
|
@@ -23765,17 +23776,6 @@ if(content.locals) module.exports = content.locals;
|
|
|
23765
23776
|
var add = __webpack_require__("499e").default
|
|
23766
23777
|
var update = add("60415e6c", content, true, {"sourceMap":false,"shadowMode":false});
|
|
23767
23778
|
|
|
23768
|
-
/***/ }),
|
|
23769
|
-
|
|
23770
|
-
/***/ "3b7b":
|
|
23771
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
23772
|
-
|
|
23773
|
-
"use strict";
|
|
23774
|
-
/* 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_AreaAnalysisTool_vue_vue_type_style_index_0_id_7803e4d4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8747");
|
|
23775
|
-
/* 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_AreaAnalysisTool_vue_vue_type_style_index_0_id_7803e4d4_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_AreaAnalysisTool_vue_vue_type_style_index_0_id_7803e4d4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
23776
|
-
/* unused harmony reexport * */
|
|
23777
|
-
|
|
23778
|
-
|
|
23779
23779
|
/***/ }),
|
|
23780
23780
|
|
|
23781
23781
|
/***/ "3bbe":
|
|
@@ -25323,20 +25323,6 @@ var update = add("3a9f9956", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
25323
25323
|
module.exports = {};
|
|
25324
25324
|
|
|
25325
25325
|
|
|
25326
|
-
/***/ }),
|
|
25327
|
-
|
|
25328
|
-
/***/ "400f":
|
|
25329
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
25330
|
-
|
|
25331
|
-
// Imports
|
|
25332
|
-
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
25333
|
-
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
25334
|
-
// Module
|
|
25335
|
-
exports.push([module.i, ".area-analysis-tool[data-v-7803e4d4]{position:absolute;top:0;left:0;z-index:999;background:hsla(0,0%,100%,.95);border:1px solid #dcdfe6;border-radius:4px;padding:10px;margin:10px}.analysis-result[data-v-7803e4d4]{margin-top:10px;max-height:300px;overflow-y:auto}.result-item[data-v-7803e4d4]{margin-bottom:10px}.label[data-v-7803e4d4]{width:80px;font-weight:700}.label[data-v-7803e4d4],.value[data-v-7803e4d4]{display:inline-block}.value[data-v-7803e4d4]{margin-left:5px;background-color:#f0f9ff;padding:2px 6px;border-radius:3px;color:#333}.intersection-list[data-v-7803e4d4],.road-list[data-v-7803e4d4]{display:inline-block;vertical-align:top;max-width:calc(100% - 100px)}.point-result[data-v-7803e4d4],.route-result[data-v-7803e4d4]{margin-bottom:15px}.intersection-tag[data-v-7803e4d4],.road-tag[data-v-7803e4d4]{margin:2px}.clear-button[data-v-7803e4d4]{margin-top:10px}.road-intersection-item[data-v-7803e4d4]{margin-bottom:10px;padding:8px;background-color:#f8f9fa;border-radius:4px;border-left:3px solid #409eff}.road-name[data-v-7803e4d4]{font-weight:700;color:#409eff;margin-bottom:5px}.intersection-points[data-v-7803e4d4]{font-size:12px;color:#606266}.intersection-point[data-v-7803e4d4]{display:block;margin-top:2px;padding-left:10px}", ""]);
|
|
25336
|
-
// Exports
|
|
25337
|
-
module.exports = exports;
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
25326
|
/***/ }),
|
|
25341
25327
|
|
|
25342
25328
|
/***/ "4085":
|
|
@@ -47697,22 +47683,6 @@ class Stroke {
|
|
|
47697
47683
|
});
|
|
47698
47684
|
|
|
47699
47685
|
|
|
47700
|
-
/***/ }),
|
|
47701
|
-
|
|
47702
|
-
/***/ "8747":
|
|
47703
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
47704
|
-
|
|
47705
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
47706
|
-
|
|
47707
|
-
// load the styles
|
|
47708
|
-
var content = __webpack_require__("400f");
|
|
47709
|
-
if(content.__esModule) content = content.default;
|
|
47710
|
-
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
47711
|
-
if(content.locals) module.exports = content.locals;
|
|
47712
|
-
// add the styles to the DOM
|
|
47713
|
-
var add = __webpack_require__("499e").default
|
|
47714
|
-
var update = add("232d5f44", content, true, {"sourceMap":false,"shadowMode":false});
|
|
47715
|
-
|
|
47716
47686
|
/***/ }),
|
|
47717
47687
|
|
|
47718
47688
|
/***/ "8778":
|
|
@@ -76377,6 +76347,20 @@ module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
|
|
|
76377
76347
|
};
|
|
76378
76348
|
|
|
76379
76349
|
|
|
76350
|
+
/***/ }),
|
|
76351
|
+
|
|
76352
|
+
/***/ "e630":
|
|
76353
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
76354
|
+
|
|
76355
|
+
// Imports
|
|
76356
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
76357
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
76358
|
+
// Module
|
|
76359
|
+
exports.push([module.i, ".area-analysis-tool[data-v-7de86bf4]{position:absolute;top:0;left:0;z-index:999;background:hsla(0,0%,100%,.95);border:1px solid #dcdfe6;border-radius:4px;padding:10px;margin:10px}.analysis-result[data-v-7de86bf4]{margin-top:10px;max-height:300px;overflow-y:auto}.result-item[data-v-7de86bf4]{margin-bottom:10px}.label[data-v-7de86bf4]{width:80px;font-weight:700}.label[data-v-7de86bf4],.value[data-v-7de86bf4]{display:inline-block}.value[data-v-7de86bf4]{margin-left:5px;background-color:#f0f9ff;padding:2px 6px;border-radius:3px;color:#333}.intersection-list[data-v-7de86bf4],.road-list[data-v-7de86bf4]{display:inline-block;vertical-align:top;max-width:calc(100% - 100px)}.point-result[data-v-7de86bf4],.route-result[data-v-7de86bf4]{margin-bottom:15px}.intersection-tag[data-v-7de86bf4],.road-tag[data-v-7de86bf4]{margin:2px}.clear-button[data-v-7de86bf4]{margin-top:10px}.road-intersection-item[data-v-7de86bf4]{margin-bottom:10px;padding:8px;background-color:#f8f9fa;border-radius:4px;border-left:3px solid #409eff}.road-name[data-v-7de86bf4]{font-weight:700;color:#409eff;margin-bottom:5px}.intersection-points[data-v-7de86bf4]{font-size:12px;color:#606266}.intersection-point[data-v-7de86bf4]{display:block;margin-top:2px;padding-left:10px}", ""]);
|
|
76360
|
+
// Exports
|
|
76361
|
+
module.exports = exports;
|
|
76362
|
+
|
|
76363
|
+
|
|
76380
76364
|
/***/ }),
|
|
76381
76365
|
|
|
76382
76366
|
/***/ "e667":
|
|
@@ -79227,6 +79211,22 @@ exports.push([module.i, ".clusterListPopup[data-v-008ab10f]{width:400px;height:2
|
|
|
79227
79211
|
module.exports = exports;
|
|
79228
79212
|
|
|
79229
79213
|
|
|
79214
|
+
/***/ }),
|
|
79215
|
+
|
|
79216
|
+
/***/ "ef57":
|
|
79217
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
79218
|
+
|
|
79219
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
79220
|
+
|
|
79221
|
+
// load the styles
|
|
79222
|
+
var content = __webpack_require__("e630");
|
|
79223
|
+
if(content.__esModule) content = content.default;
|
|
79224
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
79225
|
+
if(content.locals) module.exports = content.locals;
|
|
79226
|
+
// add the styles to the DOM
|
|
79227
|
+
var add = __webpack_require__("499e").default
|
|
79228
|
+
var update = add("28fb44e7", content, true, {"sourceMap":false,"shadowMode":false});
|
|
79229
|
+
|
|
79230
79230
|
/***/ }),
|
|
79231
79231
|
|
|
79232
79232
|
/***/ "f02e":
|
|
@@ -264400,8 +264400,8 @@ function layersApi_getCongestionEventLayerData() {
|
|
|
264400
264400
|
// 旅游走廊
|
|
264401
264401
|
// 重大活动--活动地点
|
|
264402
264402
|
/* harmony default export */ var js_initBaseLayers = ({data(){return{lastHoverFeature:null,// 记录上一次悬停的要素
|
|
264403
|
-
isCluster:false,eventCluster:true,echartslayer:null,congestedRoadLayer:null,tiandituLayer:null,darkUrl:"http://service.sdmap.gov.cn/tileservice/dsfg_asdxb?",// lightUrl: "https://service.sdmap.gov.cn/tileservice/
|
|
264404
|
-
|
|
264403
|
+
isCluster:false,eventCluster:true,echartslayer:null,congestedRoadLayer:null,tiandituLayer:null,darkUrl:"http://service.sdmap.gov.cn/tileservice/dsfg_asdxb?",lightUrl:"https://service.sdmap.gov.cn/tileservice/dsfg_qsb?",// lightUrl: "https://service.sdmap.gov.cn/tileservice/sdpubmap?",
|
|
264404
|
+
geoJSONUrl:"/china_full.json",sdAreaUrl:"/sdArea.json",subwayLineUrl:"/ditieline.json",darkFillColor:"#1b2639",lightFillColor:"#eeeee9",darkStrokeColor:"#3578E0",lightStrokeColor:"#b4b4b1"};},methods:{initBaseLayers(){let that=this;// 加载WMTS
|
|
264405
264405
|
// let resolutions = [
|
|
264406
264406
|
// 0.010986328125, 0.0054931640625, 0.00274658283125, 0.001373291815625,
|
|
264407
264407
|
// 0.0006866455078125, 0.00034332275390625, 0.000171661376953125,
|
|
@@ -266740,7 +266740,8 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266740
266740
|
stroke: new Stroke["default"]({
|
|
266741
266741
|
color: lineItem.color,
|
|
266742
266742
|
width: lineItem.width,
|
|
266743
|
-
lineDash: lineItem.lineDash ? [10, 10] : undefined
|
|
266743
|
+
lineDash: lineItem.lineDash ? [10, 10] : undefined,
|
|
266744
|
+
lineCap: lineItem.lineCap || "butt"
|
|
266744
266745
|
})
|
|
266745
266746
|
}));
|
|
266746
266747
|
lineFeature.set("popoup", lineItem.popoup);
|
|
@@ -266769,7 +266770,7 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266769
266770
|
});
|
|
266770
266771
|
this.map.addLayer(this.lineLayer);
|
|
266771
266772
|
},
|
|
266772
|
-
//
|
|
266773
|
+
// 高亮指定的线(支持单条线或多条线)
|
|
266773
266774
|
highlightLine(layerId, lineData, highlightColor = "#54f6ffff", highlightWidth = null) {
|
|
266774
266775
|
// 首先清除之前的高亮
|
|
266775
266776
|
this.clearLineHighlight(layerId);
|
|
@@ -266780,27 +266781,125 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266780
266781
|
// 查找对应的线要素
|
|
266781
266782
|
const source = lineLayer.getSource();
|
|
266782
266783
|
const features = source.getFeatures();
|
|
266783
|
-
|
|
266784
|
-
|
|
266785
|
-
|
|
266786
|
-
|
|
266787
|
-
|
|
266788
|
-
|
|
266789
|
-
|
|
266790
|
-
|
|
266791
|
-
|
|
266792
|
-
|
|
266793
|
-
|
|
266794
|
-
|
|
266795
|
-
|
|
266796
|
-
|
|
266797
|
-
|
|
266798
|
-
|
|
266799
|
-
|
|
266800
|
-
|
|
266801
|
-
|
|
266802
|
-
|
|
266803
|
-
|
|
266784
|
+
|
|
266785
|
+
// 将线数据转换为数组格式,以便统一处理
|
|
266786
|
+
const lineDataArray = Array.isArray(lineData) ? lineData : [lineData];
|
|
266787
|
+
|
|
266788
|
+
// 遍历所有线数据
|
|
266789
|
+
lineDataArray.forEach(currentLineData => {
|
|
266790
|
+
// 遍历所有线要素
|
|
266791
|
+
features.forEach(feature => {
|
|
266792
|
+
const lineItemData = feature.get("lineItemData");
|
|
266793
|
+
// 根据线数据的唯一标识或坐标匹配
|
|
266794
|
+
if (this.isLineDataMatch(lineItemData, currentLineData)) {
|
|
266795
|
+
// 获取当前要素的样式
|
|
266796
|
+
let currentStyle = feature.getStyle();
|
|
266797
|
+
|
|
266798
|
+
// 如果没有样式,使用默认样式(保持现有行为)
|
|
266799
|
+
if (!currentStyle) {
|
|
266800
|
+
// 应用默认高亮样式
|
|
266801
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266802
|
+
feature.setStyle(new Style["default"]({
|
|
266803
|
+
stroke: new Stroke["default"]({
|
|
266804
|
+
color: highlightColor,
|
|
266805
|
+
// 使用自定义高亮颜色
|
|
266806
|
+
width: lineWidth,
|
|
266807
|
+
// 使用自定义或默认高亮线宽
|
|
266808
|
+
lineDash: lineItemData.lineDash ? [10, 10] : undefined
|
|
266809
|
+
})
|
|
266810
|
+
}));
|
|
266811
|
+
} else {
|
|
266812
|
+
// 复制当前样式并只修改线宽
|
|
266813
|
+
let newStyle;
|
|
266814
|
+
|
|
266815
|
+
// 处理多样式情况
|
|
266816
|
+
if (Array.isArray(currentStyle)) {
|
|
266817
|
+
// 找到包含stroke的样式
|
|
266818
|
+
const strokeStyleIndex = currentStyle.findIndex(style => style.getStroke() !== null);
|
|
266819
|
+
if (strokeStyleIndex !== -1) {
|
|
266820
|
+
// 复制样式数组
|
|
266821
|
+
newStyle = [...currentStyle];
|
|
266822
|
+
// 复制当前的stroke样式
|
|
266823
|
+
const currentStroke = currentStyle[strokeStyleIndex].getStroke();
|
|
266824
|
+
// 计算新的线宽
|
|
266825
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266826
|
+
|
|
266827
|
+
// 创建新的stroke对象,保持原有颜色和其他属性,只修改宽度
|
|
266828
|
+
newStyle[strokeStyleIndex] = new Style["default"]({
|
|
266829
|
+
stroke: new Stroke["default"]({
|
|
266830
|
+
color: currentStroke.getColor(),
|
|
266831
|
+
// 保持原有颜色
|
|
266832
|
+
width: lineWidth,
|
|
266833
|
+
// 只修改线宽
|
|
266834
|
+
lineDash: currentStroke.getLineDash(),
|
|
266835
|
+
// 保持原有虚线样式
|
|
266836
|
+
lineCap: currentStroke.getLineCap(),
|
|
266837
|
+
// 保持原有线帽
|
|
266838
|
+
lineJoin: currentStroke.getLineJoin(),
|
|
266839
|
+
// 保持原有线连接
|
|
266840
|
+
miterLimit: currentStroke.getMiterLimit() // 保持原有斜接限制
|
|
266841
|
+
})
|
|
266842
|
+
});
|
|
266843
|
+
} else {
|
|
266844
|
+
// 如果没有找到stroke样式,使用默认行为
|
|
266845
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266846
|
+
feature.setStyle(new Style["default"]({
|
|
266847
|
+
stroke: new Stroke["default"]({
|
|
266848
|
+
color: highlightColor,
|
|
266849
|
+
width: lineWidth,
|
|
266850
|
+
lineDash: lineItemData.lineDash ? [10, 10] : undefined
|
|
266851
|
+
})
|
|
266852
|
+
}));
|
|
266853
|
+
}
|
|
266854
|
+
} else {
|
|
266855
|
+
// 单样式情况
|
|
266856
|
+
const currentStroke = currentStyle.getStroke();
|
|
266857
|
+
if (currentStroke) {
|
|
266858
|
+
// 计算新的线宽
|
|
266859
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266860
|
+
|
|
266861
|
+
// 创建新的样式,保持原有颜色和其他属性,只修改宽度
|
|
266862
|
+
newStyle = new Style["default"]({
|
|
266863
|
+
stroke: new Stroke["default"]({
|
|
266864
|
+
color: currentStroke.getColor(),
|
|
266865
|
+
// 保持原有颜色
|
|
266866
|
+
width: lineWidth,
|
|
266867
|
+
// 只修改线宽
|
|
266868
|
+
lineDash: currentStroke.getLineDash(),
|
|
266869
|
+
// 保持原有虚线样式
|
|
266870
|
+
lineCap: currentStroke.getLineCap(),
|
|
266871
|
+
// 保持原有线帽
|
|
266872
|
+
lineJoin: currentStroke.getLineJoin(),
|
|
266873
|
+
// 保持原有线连接
|
|
266874
|
+
miterLimit: currentStroke.getMiterLimit() // 保持原有斜接限制
|
|
266875
|
+
})
|
|
266876
|
+
});
|
|
266877
|
+
} else {
|
|
266878
|
+
// 如果没有stroke样式,使用默认行为
|
|
266879
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266880
|
+
feature.setStyle(new Style["default"]({
|
|
266881
|
+
stroke: new Stroke["default"]({
|
|
266882
|
+
color: highlightColor,
|
|
266883
|
+
width: lineWidth,
|
|
266884
|
+
lineDash: lineItemData.lineDash ? [10, 10] : undefined
|
|
266885
|
+
})
|
|
266886
|
+
}));
|
|
266887
|
+
}
|
|
266888
|
+
}
|
|
266889
|
+
|
|
266890
|
+
// 应用新样式
|
|
266891
|
+
if (newStyle) {
|
|
266892
|
+
feature.setStyle(newStyle);
|
|
266893
|
+
}
|
|
266894
|
+
}
|
|
266895
|
+
|
|
266896
|
+
// 保存高亮状态
|
|
266897
|
+
feature.set("isHighlighted", true);
|
|
266898
|
+
// 保存当前高亮样式信息
|
|
266899
|
+
feature.set("highlightColor", highlightColor);
|
|
266900
|
+
feature.set("highlightWidth", highlightWidth || lineItemData.originalWidth + 3);
|
|
266901
|
+
}
|
|
266902
|
+
});
|
|
266804
266903
|
});
|
|
266805
266904
|
},
|
|
266806
266905
|
// 清除线图层的所有高亮
|
|
@@ -268118,8 +268217,8 @@ var flexible = __webpack_require__("59a2");
|
|
|
268118
268217
|
// EXTERNAL MODULE: ./packages/gisMapTianditu/src/js/json/sfzFlow.json
|
|
268119
268218
|
var sfzFlow = __webpack_require__("d701");
|
|
268120
268219
|
|
|
268121
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0e2c32fd-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!./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue?vue&type=template&id=
|
|
268122
|
-
var
|
|
268220
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0e2c32fd-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!./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue?vue&type=template&id=7de86bf4&scoped=true
|
|
268221
|
+
var AreaAnalysisToolvue_type_template_id_7de86bf4_scoped_true_render = function render() {
|
|
268123
268222
|
var _vm = this,
|
|
268124
268223
|
_c = _vm._self._c;
|
|
268125
268224
|
return _c('div', {
|
|
@@ -268162,9 +268261,9 @@ var AreaAnalysisToolvue_type_template_id_7803e4d4_scoped_true_render = function
|
|
|
268162
268261
|
}
|
|
268163
268262
|
}, [_vm._v(" " + _vm._s(_vm.isDrawing ? "结束绘制" : "风险区域绘制") + " ")]) : _vm._e()], 1);
|
|
268164
268263
|
};
|
|
268165
|
-
var
|
|
268264
|
+
var AreaAnalysisToolvue_type_template_id_7de86bf4_scoped_true_staticRenderFns = [];
|
|
268166
268265
|
|
|
268167
|
-
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue?vue&type=template&id=
|
|
268266
|
+
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue?vue&type=template&id=7de86bf4&scoped=true
|
|
268168
268267
|
|
|
268169
268268
|
// EXTERNAL MODULE: ./node_modules/@turf/turf/turf.min.js
|
|
268170
268269
|
var turf_min = __webpack_require__("595b");
|
|
@@ -268508,8 +268607,12 @@ var turf_min = __webpack_require__("595b");
|
|
|
268508
268607
|
});
|
|
268509
268608
|
}
|
|
268510
268609
|
|
|
268511
|
-
//
|
|
268512
|
-
this.
|
|
268610
|
+
// 根据当前绘制模式调用相应的停止方法
|
|
268611
|
+
if (this.isRouteMode) {
|
|
268612
|
+
this.stopRouteMode();
|
|
268613
|
+
} else {
|
|
268614
|
+
this.stopDraw();
|
|
268615
|
+
}
|
|
268513
268616
|
},
|
|
268514
268617
|
// 处理地图点击事件
|
|
268515
268618
|
handleMapClick(event) {
|
|
@@ -268620,64 +268723,74 @@ var turf_min = __webpack_require__("595b");
|
|
|
268620
268723
|
// 开始路线绘制模式
|
|
268621
268724
|
startRouteMode() {
|
|
268622
268725
|
if (!this.map) {
|
|
268623
|
-
this.$message.error("
|
|
268726
|
+
this.$message.error("地图未初始化完成,无法开始绘制");
|
|
268624
268727
|
return;
|
|
268625
268728
|
}
|
|
268729
|
+
this.initHighwayFeatures();
|
|
268730
|
+
// 检查是否有高速公路数据
|
|
268731
|
+
if (this.highwayFeatures.length === 0) {
|
|
268732
|
+
// this.$message.warning("未找到高速公路数据,将只进行区域绘制");
|
|
268733
|
+
}
|
|
268626
268734
|
|
|
268627
|
-
//
|
|
268735
|
+
// 清除之前的绘制
|
|
268628
268736
|
this.clearVectorLayer();
|
|
268629
268737
|
this.clearResult();
|
|
268630
|
-
|
|
268631
|
-
|
|
268632
|
-
|
|
268633
|
-
this.stopPointDraw();
|
|
268634
|
-
}
|
|
268635
|
-
if (this.isDrawing) {
|
|
268636
|
-
this.stopDraw();
|
|
268637
|
-
}
|
|
268638
|
-
if (!this.vectorLayer) {
|
|
268639
|
-
this.vectorSource = new source_Vector["default"]();
|
|
268640
|
-
this.vectorLayer = new layer_Vector["default"]({
|
|
268641
|
-
source: this.vectorSource,
|
|
268642
|
-
zIndex: 100
|
|
268643
|
-
});
|
|
268644
|
-
this.map.addLayer(this.vectorLayer);
|
|
268645
|
-
} else {
|
|
268646
|
-
// 清除现有要素但保留图层
|
|
268647
|
-
this.vectorSource.clear();
|
|
268738
|
+
// 如果正在进行路线绘制,先停止
|
|
268739
|
+
if (this.isRouteMode) {
|
|
268740
|
+
this.stopRouteMode();
|
|
268648
268741
|
}
|
|
268649
268742
|
|
|
268650
|
-
//
|
|
268651
|
-
this.
|
|
268652
|
-
this.
|
|
268653
|
-
|
|
268743
|
+
// 创建矢量图层
|
|
268744
|
+
this.vectorSource = new source_Vector["default"]();
|
|
268745
|
+
this.vectorLayer = new layer_Vector["default"]({
|
|
268746
|
+
source: this.vectorSource,
|
|
268747
|
+
style: new Style["default"]({
|
|
268748
|
+
fill: new Fill["default"]({
|
|
268749
|
+
color: "rgba(30, 144, 255, 0.1)"
|
|
268750
|
+
}),
|
|
268751
|
+
stroke: new Stroke["default"]({
|
|
268752
|
+
color: "#1E90FF",
|
|
268753
|
+
width: 2
|
|
268754
|
+
})
|
|
268755
|
+
}),
|
|
268756
|
+
zIndex: 100
|
|
268757
|
+
});
|
|
268758
|
+
this.map.addLayer(this.vectorLayer);
|
|
268654
268759
|
|
|
268655
|
-
//
|
|
268656
|
-
this.
|
|
268760
|
+
// 创建绘制交互
|
|
268761
|
+
this.draw = new interaction_Draw({
|
|
268762
|
+
source: this.vectorSource,
|
|
268763
|
+
type: "Polygon",
|
|
268764
|
+
style: new Style["default"]({
|
|
268765
|
+
fill: new Fill["default"]({
|
|
268766
|
+
color: "rgba(30, 144, 255, 0.2)"
|
|
268767
|
+
}),
|
|
268768
|
+
stroke: new Stroke["default"]({
|
|
268769
|
+
color: "#1E90FF",
|
|
268770
|
+
width: 2
|
|
268771
|
+
})
|
|
268772
|
+
})
|
|
268773
|
+
});
|
|
268657
268774
|
|
|
268658
|
-
//
|
|
268659
|
-
this.
|
|
268775
|
+
// 监听绘制结束事件
|
|
268776
|
+
this.draw.on("drawend", this.onDrawEnd);
|
|
268660
268777
|
|
|
268661
|
-
//
|
|
268778
|
+
// 添加到地图
|
|
268779
|
+
this.map.addInteraction(this.draw);
|
|
268780
|
+
|
|
268781
|
+
// 设置绘制状态标志,防止地图点击时重置中心点
|
|
268662
268782
|
this.map.set("isAreaAnalysisDrawing", true);
|
|
268663
268783
|
this.isRouteMode = true;
|
|
268664
268784
|
|
|
268665
268785
|
// 设置鼠标指针样式
|
|
268666
268786
|
this.map.getViewport().style.cursor = "crosshair";
|
|
268667
|
-
this.$message.
|
|
268787
|
+
this.$message.success("请圈选出对应路段");
|
|
268668
268788
|
},
|
|
268669
268789
|
// 停止路线绘制模式
|
|
268670
268790
|
stopRouteMode() {
|
|
268671
|
-
|
|
268672
|
-
|
|
268673
|
-
this.
|
|
268674
|
-
this.mapClickHandler = null;
|
|
268675
|
-
}
|
|
268676
|
-
|
|
268677
|
-
// 移除路线点击事件监听
|
|
268678
|
-
if (this.routeClickHandler) {
|
|
268679
|
-
this.map.un("click", this.routeClickHandler);
|
|
268680
|
-
this.routeClickHandler = null;
|
|
268791
|
+
if (this.draw) {
|
|
268792
|
+
this.map.removeInteraction(this.draw);
|
|
268793
|
+
this.draw = null;
|
|
268681
268794
|
}
|
|
268682
268795
|
|
|
268683
268796
|
// 移除绘制状态标志
|
|
@@ -269238,8 +269351,8 @@ var turf_min = __webpack_require__("595b");
|
|
|
269238
269351
|
});
|
|
269239
269352
|
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue?vue&type=script&lang=js
|
|
269240
269353
|
/* harmony default export */ var component_AreaAnalysisToolvue_type_script_lang_js = (AreaAnalysisToolvue_type_script_lang_js);
|
|
269241
|
-
// EXTERNAL MODULE: ./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue?vue&type=style&index=0&id=
|
|
269242
|
-
var
|
|
269354
|
+
// EXTERNAL MODULE: ./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue?vue&type=style&index=0&id=7de86bf4&prod&scoped=true&lang=css
|
|
269355
|
+
var AreaAnalysisToolvue_type_style_index_0_id_7de86bf4_prod_scoped_true_lang_css = __webpack_require__("2f93");
|
|
269243
269356
|
|
|
269244
269357
|
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/component/AreaAnalysisTool.vue
|
|
269245
269358
|
|
|
@@ -269252,11 +269365,11 @@ var AreaAnalysisToolvue_type_style_index_0_id_7803e4d4_prod_scoped_true_lang_css
|
|
|
269252
269365
|
|
|
269253
269366
|
var AreaAnalysisTool_component = normalizeComponent(
|
|
269254
269367
|
component_AreaAnalysisToolvue_type_script_lang_js,
|
|
269255
|
-
|
|
269256
|
-
|
|
269368
|
+
AreaAnalysisToolvue_type_template_id_7de86bf4_scoped_true_render,
|
|
269369
|
+
AreaAnalysisToolvue_type_template_id_7de86bf4_scoped_true_staticRenderFns,
|
|
269257
269370
|
false,
|
|
269258
269371
|
null,
|
|
269259
|
-
"
|
|
269372
|
+
"7de86bf4",
|
|
269260
269373
|
null
|
|
269261
269374
|
|
|
269262
269375
|
)
|
package/package.json
CHANGED