gis-map-universal 1.1.2 → 1.1.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/gismap.umd.js +227 -26
- package/package.json +1 -1
package/gismap.umd.js
CHANGED
|
@@ -260707,6 +260707,89 @@ ol_echarts_esm_EChartsLayer.isObject = ol_echarts_esm_isObject;
|
|
|
260707
260707
|
/* harmony default export */ var ol_echarts_esm = (ol_echarts_esm_EChartsLayer);
|
|
260708
260708
|
//# sourceMappingURL=ol-echarts.esm.js.map
|
|
260709
260709
|
|
|
260710
|
+
// 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/customPointLayer.vue?vue&type=template&id=357f70a2&scoped=true
|
|
260711
|
+
var customPointLayervue_type_template_id_357f70a2_scoped_true_render = function render() {
|
|
260712
|
+
var _vm = this,
|
|
260713
|
+
_c = _vm._self._c;
|
|
260714
|
+
return _vm.isshow ? _c('div', {
|
|
260715
|
+
style: {
|
|
260716
|
+
height: _vm.height,
|
|
260717
|
+
width: _vm.width
|
|
260718
|
+
}
|
|
260719
|
+
}, [_c('iframe', {
|
|
260720
|
+
staticStyle: {
|
|
260721
|
+
"width": "100%",
|
|
260722
|
+
"height": "100%",
|
|
260723
|
+
"border": "none"
|
|
260724
|
+
},
|
|
260725
|
+
attrs: {
|
|
260726
|
+
"src": _vm.popupAttr.popupUrl
|
|
260727
|
+
}
|
|
260728
|
+
})]) : _vm._e();
|
|
260729
|
+
};
|
|
260730
|
+
var customPointLayervue_type_template_id_357f70a2_scoped_true_staticRenderFns = [];
|
|
260731
|
+
|
|
260732
|
+
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/component/customPointLayer.vue?vue&type=template&id=357f70a2&scoped=true
|
|
260733
|
+
|
|
260734
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/gisMapTianditu/src/component/customPointLayer.vue?vue&type=script&lang=js
|
|
260735
|
+
/* harmony default export */ var customPointLayervue_type_script_lang_js = ({
|
|
260736
|
+
name: '',
|
|
260737
|
+
components: {},
|
|
260738
|
+
created() {},
|
|
260739
|
+
mounted() {},
|
|
260740
|
+
props: {
|
|
260741
|
+
popupAttr: Object
|
|
260742
|
+
},
|
|
260743
|
+
data() {
|
|
260744
|
+
return {
|
|
260745
|
+
isshow: false,
|
|
260746
|
+
height: 0,
|
|
260747
|
+
width: 0
|
|
260748
|
+
};
|
|
260749
|
+
},
|
|
260750
|
+
methods: {
|
|
260751
|
+
_show() {
|
|
260752
|
+
this.isshow = false;
|
|
260753
|
+
this.$nextTick(() => {
|
|
260754
|
+
let fontSize = Number(document.getElementsByTagName('html')[0].style.fontSize.split('px')[0]);
|
|
260755
|
+
let frameHeight = (this.popupAttr.popupHeight - 110) / 192 * fontSize;
|
|
260756
|
+
let frameWidth = (this.popupAttr.popupWidth - 30) / 192 * fontSize;
|
|
260757
|
+
this.height = frameHeight + 'px';
|
|
260758
|
+
this.width = frameWidth + 'px';
|
|
260759
|
+
this.isshow = true;
|
|
260760
|
+
});
|
|
260761
|
+
},
|
|
260762
|
+
destroyFlv() {
|
|
260763
|
+
this.isshow = false;
|
|
260764
|
+
}
|
|
260765
|
+
},
|
|
260766
|
+
computed: {},
|
|
260767
|
+
mounted() {
|
|
260768
|
+
this._show();
|
|
260769
|
+
}
|
|
260770
|
+
});
|
|
260771
|
+
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/component/customPointLayer.vue?vue&type=script&lang=js
|
|
260772
|
+
/* harmony default export */ var component_customPointLayervue_type_script_lang_js = (customPointLayervue_type_script_lang_js);
|
|
260773
|
+
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/component/customPointLayer.vue
|
|
260774
|
+
|
|
260775
|
+
|
|
260776
|
+
|
|
260777
|
+
|
|
260778
|
+
|
|
260779
|
+
/* normalize component */
|
|
260780
|
+
|
|
260781
|
+
var customPointLayer_component = normalizeComponent(
|
|
260782
|
+
component_customPointLayervue_type_script_lang_js,
|
|
260783
|
+
customPointLayervue_type_template_id_357f70a2_scoped_true_render,
|
|
260784
|
+
customPointLayervue_type_template_id_357f70a2_scoped_true_staticRenderFns,
|
|
260785
|
+
false,
|
|
260786
|
+
null,
|
|
260787
|
+
"357f70a2",
|
|
260788
|
+
null
|
|
260789
|
+
|
|
260790
|
+
)
|
|
260791
|
+
|
|
260792
|
+
/* harmony default export */ var customPointLayer = (customPointLayer_component.exports);
|
|
260710
260793
|
// 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/trafficEventLayers/EmergencyLayer.vue?vue&type=template&id=c96d8022&scoped=true
|
|
260711
260794
|
var EmergencyLayervue_type_template_id_c96d8022_scoped_true_render = function render() {
|
|
260712
260795
|
var _vm = this,
|
|
@@ -264383,6 +264466,7 @@ function layersApi_getCongestionEventLayerData() {
|
|
|
264383
264466
|
});
|
|
264384
264467
|
}
|
|
264385
264468
|
// CONCATENATED MODULE: ./packages/gisMapTianditu/src/js/initBaseLayers.js
|
|
264469
|
+
// 自定义打点
|
|
264386
264470
|
// 交通事件--事件通用
|
|
264387
264471
|
// 交通事件--拥堵事件
|
|
264388
264472
|
// 交通事件--服务区异常
|
|
@@ -264456,7 +264540,7 @@ style:function(feature){return new Style["default"]({fill:new Fill["default"]({c
|
|
|
264456
264540
|
width:1// 边界线宽度
|
|
264457
264541
|
})});}});this.map.addLayer(this.china_full_Layer);});//监听点击事件
|
|
264458
264542
|
let elPopup=this.$refs.popup;this.overlayPopup=new Overlay["a" /* default */]({element:elPopup,positioning:"bottom-right",stopEvent:true,autoPan:false});this.map.addOverlay(this.overlayPopup);this.map.on("click",e=>{// 检查是否正在进行区域分析绘制
|
|
264459
|
-
const isAreaAnalysisDrawing=this.map.getProperties().isAreaAnalysisDrawing||false;if(!isAreaAnalysisDrawing){let mousePoint=e.coordinate;this.initialPoint=mousePoint;let popupHeaderTitle=document.getElementById("popupHeaderTitle");let feature=this.map.forEachFeatureAtPixel(e.pixel,feature=>{return feature;});if(feature){if(feature.getProperties().features){if(feature.getProperties().features.length>1){const features=feature.getProperties().features;if(this.map.getView().getZoom()>=18){this.popupHeight=350;this.popupWidth=430;this.currentTabComponent=component_ClusterList;this.popupAttributes=features;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="点位列表";this.showPopup();let fontSize=Number(document.getElementsByTagName("html")[0].style.fontSize.split("px")[0]);let popupHeight=this.popupHeight/153.6*fontSize;let popupWidth=this.popupWidth/153.6*fontSize;this.overlayPopup.setPosition(mousePoint);this.overlayPopup.setOffset([-popupWidth/2,-popupHeight]);let pixelPoint=this.map.getPixelFromCoordinate(mousePoint);let newpixelPoint=[pixelPoint[0],pixelPoint[1]-150];let newCenterPoint=this.map.getCoordinateFromPixel(newpixelPoint);// this.map.getView().animate({
|
|
264543
|
+
const isAreaAnalysisDrawing=this.map.getProperties().isAreaAnalysisDrawing||false;if(!isAreaAnalysisDrawing){let mousePoint=e.coordinate;this.initialPoint=mousePoint;let popupHeaderTitle=document.getElementById("popupHeaderTitle");let feature=this.map.forEachFeatureAtPixel(e.pixel,feature=>{return feature;});if(feature){debugger;if(feature.getProperties().features){if(feature.getProperties().features.length>1){const features=feature.getProperties().features;if(this.map.getView().getZoom()>=18){this.popupHeight=350;this.popupWidth=430;this.currentTabComponent=component_ClusterList;this.popupAttributes=features;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="点位列表";this.showPopup();let fontSize=Number(document.getElementsByTagName("html")[0].style.fontSize.split("px")[0]);let popupHeight=this.popupHeight/153.6*fontSize;let popupWidth=this.popupWidth/153.6*fontSize;this.overlayPopup.setPosition(mousePoint);this.overlayPopup.setOffset([-popupWidth/2,-popupHeight]);let pixelPoint=this.map.getPixelFromCoordinate(mousePoint);let newpixelPoint=[pixelPoint[0],pixelPoint[1]-150];let newCenterPoint=this.map.getCoordinateFromPixel(newpixelPoint);// this.map.getView().animate({
|
|
264460
264544
|
// center: newCenterPoint,
|
|
264461
264545
|
// duration: 800,
|
|
264462
264546
|
// });
|
|
@@ -264465,7 +264549,7 @@ this.overlayPopup.set("popupBS","clusterList");}else{// this.map.getView().anima
|
|
|
264465
264549
|
// zoom: this.map.getView().getZoom() * 2,
|
|
264466
264550
|
// duration: 1200,
|
|
264467
264551
|
// });
|
|
264468
|
-
}}else{let properties=feature.getProperties().features[0].getProperties();if(properties){if(properties.isDrawn)return;if(properties.popoup===false){let pixelPoint=null;if(mousePoint){pixelPoint=this.map.getPixelFromCoordinate(mousePoint);}that.$emit("clickPointEvent",properties,pixelPoint);return;}const type=properties.type;const data=properties;if(type){switch(type){case"emergency":this.popupHeight=350;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="突发事件";break;case"otherEvents":this.popupHeight=170;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="其它事件";break;case"construction":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="养护施工";break;case"tollAbnormal":this.popupHeight=330;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站异常";break;case"weatherAbnormal":this.popupHeight=250;this.popupWidth=470;this.currentTabComponent=Weatherevent;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="异常天气";break;case"serviceAreaAbnormal":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=ServiceAreaAbnormalLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区异常";break;case"aiEvent":this.popupHeight=390;this.popupWidth=570;this.currentTabComponent=AIeventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="AI告警事件";break;case"congestionEvent":this.popupHeight=180;this.popupWidth=560;this.currentTabComponent=CongestionEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="拥堵事件";break;case"tollStation":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=TollStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站";break;case"serviceArea":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=ServiceAreaLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区";break;case"trainStation":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=TrainStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="客运站";break;case"port":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=PortLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="港口";break;case"majorEvent":this.popupHeight=255;this.popupWidth=330;this.currentTabComponent=MajorEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="活动地点";break;case"airPort":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=AirportLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="机场";break;case"HSRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=HSRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="高速相机";break;case"SYRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=SYRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="水运相机";break;case"throughCulver":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=ThroughCulvertLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="下穿涵洞";break;case"lonandlatTopile":this.popupHeight=85;this.popupWidth=360;this.currentTabComponent=component_LonlatTopile;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="经纬度转桩号";break;case"latlonPick":this.popupHeight=55;this.popupWidth=360;this.currentTabComponent=component_LatlonPick;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="坐标拾取";break;case"travelPoint":this.popupHeight=500;this.popupWidth=730;this.currentTabComponent=TravelPointLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.name;break;case"inRiverCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;case"inRiverUPCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverUPCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;}this.showPopup();}}else{this.closePopup();}// this.overlayPopup.setPosition(mousePoint);
|
|
264552
|
+
}}else{let properties=feature.getProperties().features[0].getProperties();if(properties){if(properties.isDrawn)return;if(properties.popoup===false){let pixelPoint=null;if(mousePoint){pixelPoint=this.map.getPixelFromCoordinate(mousePoint);}that.$emit("clickPointEvent",properties,pixelPoint);return;}const type=properties.type;const data=properties;if(type){switch(type){case"customPoint":this.popupHeight=data.popupHeight-50;this.popupWidth=data.popupWidth-20;this.currentTabComponent=customPointLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.popupTitle;this.zoomInBylatlon([data.longitude,data.latitude],this.map.getView().getZoom());break;case"emergency":this.popupHeight=350;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="突发事件";break;case"otherEvents":this.popupHeight=170;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="其它事件";break;case"construction":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="养护施工";break;case"tollAbnormal":this.popupHeight=330;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站异常";break;case"weatherAbnormal":this.popupHeight=250;this.popupWidth=470;this.currentTabComponent=Weatherevent;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="异常天气";break;case"serviceAreaAbnormal":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=ServiceAreaAbnormalLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区异常";break;case"aiEvent":this.popupHeight=390;this.popupWidth=570;this.currentTabComponent=AIeventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="AI告警事件";break;case"congestionEvent":this.popupHeight=180;this.popupWidth=560;this.currentTabComponent=CongestionEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="拥堵事件";break;case"tollStation":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=TollStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站";break;case"serviceArea":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=ServiceAreaLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区";break;case"trainStation":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=TrainStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="客运站";break;case"port":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=PortLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="港口";break;case"majorEvent":this.popupHeight=255;this.popupWidth=330;this.currentTabComponent=MajorEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="活动地点";break;case"airPort":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=AirportLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="机场";break;case"HSRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=HSRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="高速相机";break;case"SYRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=SYRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="水运相机";break;case"throughCulver":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=ThroughCulvertLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="下穿涵洞";break;case"lonandlatTopile":this.popupHeight=85;this.popupWidth=360;this.currentTabComponent=component_LonlatTopile;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="经纬度转桩号";break;case"latlonPick":this.popupHeight=55;this.popupWidth=360;this.currentTabComponent=component_LatlonPick;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="坐标拾取";break;case"travelPoint":this.popupHeight=500;this.popupWidth=730;this.currentTabComponent=TravelPointLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.name;break;case"inRiverCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;case"inRiverUPCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverUPCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;}this.showPopup();}}else{this.closePopup();}// this.overlayPopup.setPosition(mousePoint);
|
|
264469
264553
|
// this.overlayPopup.setOffset([
|
|
264470
264554
|
// -this.popupWidth / 2,
|
|
264471
264555
|
// -this.popupHeight,
|
|
@@ -264474,7 +264558,7 @@ let fontSize=Number(document.getElementsByTagName("html")[0].style.fontSize.spli
|
|
|
264474
264558
|
// center: newCenterPoint,
|
|
264475
264559
|
// duration: 800,
|
|
264476
264560
|
// });
|
|
264477
|
-
}}else{let properties=feature.getProperties();if(properties){if(properties.isDrawn)return;if(properties.popoup===false){let pixelPoint=null;if(mousePoint){pixelPoint=this.map.getPixelFromCoordinate(mousePoint);}that.$emit("clickPointEvent",properties,pixelPoint);return;}const type=properties.type;const data=properties;if(type){switch(type){case"emergency":this.popupHeight=350;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="突发事件";break;case"otherEvents":this.popupHeight=170;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="其它事件";break;case"construction":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="养护施工";break;case"tollAbnormal":this.popupHeight=330;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站异常";break;case"weatherAbnormal":this.popupHeight=250;this.popupWidth=470;this.currentTabComponent=Weatherevent;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="异常天气";break;case"serviceAreaAbnormal":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=ServiceAreaAbnormalLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区异常";break;case"aiEvent":this.popupHeight=390;this.popupWidth=570;this.currentTabComponent=AIeventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="AI告警事件";break;case"congestionEvent":this.popupHeight=180;this.popupWidth=560;this.currentTabComponent=CongestionEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="拥堵事件";break;case"tollStation":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=TollStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站";break;case"serviceArea":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=ServiceAreaLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区";break;case"trainStation":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=TrainStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="客运站";break;case"port":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=PortLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="港口";break;case"majorEvent":this.popupHeight=255;this.popupWidth=330;this.currentTabComponent=MajorEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="活动地点";break;case"airPort":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=AirportLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="机场";break;case"HSRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=HSRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="高速相机";break;case"SYRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=SYRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="水运相机";break;case"throughCulver":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=ThroughCulvertLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="下穿涵洞";break;case"lonandlatTopile":this.popupHeight=85;this.popupWidth=360;this.currentTabComponent=component_LonlatTopile;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="经纬度转桩号";break;case"latlonPick":this.popupHeight=55;this.popupWidth=360;this.currentTabComponent=component_LatlonPick;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="坐标拾取";break;case"travelPoint":this.popupHeight=500;this.popupWidth=730;this.currentTabComponent=TravelPointLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.name;break;case"inRiverCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;case"inRiverUPCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverUPCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;}this.showPopup();}else{this.closePopup();}}else{this.closePopup();}// this.overlayPopup.setPosition(mousePoint);
|
|
264561
|
+
}}else{let properties=feature.getProperties();if(properties){if(properties.isDrawn)return;if(properties.popoup===false){let pixelPoint=null;if(mousePoint){pixelPoint=this.map.getPixelFromCoordinate(mousePoint);}that.$emit("clickPointEvent",properties,pixelPoint);return;}const type=properties.type;const data=properties;if(type){switch(type){case"customPoint":this.popupHeight=data.popupHeight-50;this.popupWidth=data.popupWidth-20;this.currentTabComponent=customPointLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.popupTitle;this.zoomInBylatlon([data.longitude,data.latitude],this.map.getView().getZoom());break;case"emergency":this.popupHeight=350;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="突发事件";break;case"otherEvents":this.popupHeight=170;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="其它事件";break;case"construction":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=otherLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="养护施工";break;case"tollAbnormal":this.popupHeight=330;this.popupWidth=560;this.currentTabComponent=EmergencyLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站异常";break;case"weatherAbnormal":this.popupHeight=250;this.popupWidth=470;this.currentTabComponent=Weatherevent;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="异常天气";break;case"serviceAreaAbnormal":this.popupHeight=200;this.popupWidth=430;this.currentTabComponent=ServiceAreaAbnormalLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区异常";break;case"aiEvent":this.popupHeight=390;this.popupWidth=570;this.currentTabComponent=AIeventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="AI告警事件";break;case"congestionEvent":this.popupHeight=180;this.popupWidth=560;this.currentTabComponent=CongestionEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="拥堵事件";break;case"tollStation":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=TollStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="收费站";break;case"serviceArea":this.popupHeight=350;this.popupWidth=330;this.currentTabComponent=ServiceAreaLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="服务区";break;case"trainStation":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=TrainStationLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="客运站";break;case"port":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=PortLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="港口";break;case"majorEvent":this.popupHeight=255;this.popupWidth=330;this.currentTabComponent=MajorEventLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="活动地点";break;case"airPort":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=AirportLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="机场";break;case"HSRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=HSRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="高速相机";break;case"SYRoadCamera":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=SYRoadCameraLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="水运相机";break;case"throughCulver":this.popupHeight=315;this.popupWidth=330;this.currentTabComponent=ThroughCulvertLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="下穿涵洞";break;case"lonandlatTopile":this.popupHeight=85;this.popupWidth=360;this.currentTabComponent=component_LonlatTopile;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="经纬度转桩号";break;case"latlonPick":this.popupHeight=55;this.popupWidth=360;this.currentTabComponent=component_LatlonPick;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML="坐标拾取";break;case"travelPoint":this.popupHeight=500;this.popupWidth=730;this.currentTabComponent=TravelPointLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.name;break;case"inRiverCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;case"inRiverUPCapacity":this.popupHeight=350;this.popupWidth=420;this.currentTabComponent=InRiverUPCapacityLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML=data.otherInfo.portName;break;}this.showPopup();}else{this.closePopup();}}else{this.closePopup();}// this.overlayPopup.setPosition(mousePoint);
|
|
264478
264562
|
// this.overlayPopup.setOffset([
|
|
264479
264563
|
// -this.popupWidth / 2,
|
|
264480
264564
|
// -this.popupHeight - 20,
|
|
@@ -266137,6 +266221,7 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266137
266221
|
|
|
266138
266222
|
|
|
266139
266223
|
|
|
266224
|
+
// 自定义打点
|
|
266140
266225
|
// 交通事件--突发事件
|
|
266141
266226
|
// 交通事件--拥堵事件
|
|
266142
266227
|
// 交通事件--服务区异常
|
|
@@ -266236,6 +266321,15 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266236
266321
|
let popupHeaderTitle = document.getElementById("popupHeaderTitle");
|
|
266237
266322
|
this.showPopup();
|
|
266238
266323
|
switch (LayerType) {
|
|
266324
|
+
case "customPoint":
|
|
266325
|
+
this.popupHeight = data.popupHeight - 50;
|
|
266326
|
+
this.popupWidth = data.popupWidth - 20;
|
|
266327
|
+
this.currentTabComponent = customPointLayer;
|
|
266328
|
+
this.popupAttributes = data;
|
|
266329
|
+
popupHeaderTitle.innerHTML = "";
|
|
266330
|
+
popupHeaderTitle.innerHTML = data.title;
|
|
266331
|
+
this.zoomInBylatlon([data.longitude, data.latitude], this.map.getView().getZoom());
|
|
266332
|
+
break;
|
|
266239
266333
|
case "emergency":
|
|
266240
266334
|
this.popupHeight = 350;
|
|
266241
266335
|
this.popupWidth = 560;
|
|
@@ -266559,6 +266653,10 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266559
266653
|
feature.set("type", data.type);
|
|
266560
266654
|
feature.set("iconUrl", data.iconUrl);
|
|
266561
266655
|
feature.set("popoup", data.popoup);
|
|
266656
|
+
feature.set("popupTitle", data.popupTitle);
|
|
266657
|
+
feature.set("popupUrl", data.popupUrl);
|
|
266658
|
+
feature.set("popupWidth", data.popupWidth);
|
|
266659
|
+
feature.set("popupHeight", data.popupHeight);
|
|
266562
266660
|
feature.set("otherInfo", data.otherInfo);
|
|
266563
266661
|
feature.set("longitude", data.longitude);
|
|
266564
266662
|
feature.set("latitude", data.latitude);
|
|
@@ -266740,7 +266838,8 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266740
266838
|
stroke: new Stroke["default"]({
|
|
266741
266839
|
color: lineItem.color,
|
|
266742
266840
|
width: lineItem.width,
|
|
266743
|
-
lineDash: lineItem.lineDash ? [10, 10] : undefined
|
|
266841
|
+
lineDash: lineItem.lineDash ? [10, 10] : undefined,
|
|
266842
|
+
lineCap: lineItem.lineCap || "butt"
|
|
266744
266843
|
})
|
|
266745
266844
|
}));
|
|
266746
266845
|
lineFeature.set("popoup", lineItem.popoup);
|
|
@@ -266769,7 +266868,7 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266769
266868
|
});
|
|
266770
266869
|
this.map.addLayer(this.lineLayer);
|
|
266771
266870
|
},
|
|
266772
|
-
//
|
|
266871
|
+
// 高亮指定的线(支持单条线或多条线)
|
|
266773
266872
|
highlightLine(layerId, lineData, highlightColor = "#54f6ffff", highlightWidth = null) {
|
|
266774
266873
|
// 首先清除之前的高亮
|
|
266775
266874
|
this.clearLineHighlight(layerId);
|
|
@@ -266780,27 +266879,125 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
266780
266879
|
// 查找对应的线要素
|
|
266781
266880
|
const source = lineLayer.getSource();
|
|
266782
266881
|
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
|
-
|
|
266882
|
+
|
|
266883
|
+
// 将线数据转换为数组格式,以便统一处理
|
|
266884
|
+
const lineDataArray = Array.isArray(lineData) ? lineData : [lineData];
|
|
266885
|
+
|
|
266886
|
+
// 遍历所有线数据
|
|
266887
|
+
lineDataArray.forEach(currentLineData => {
|
|
266888
|
+
// 遍历所有线要素
|
|
266889
|
+
features.forEach(feature => {
|
|
266890
|
+
const lineItemData = feature.get("lineItemData");
|
|
266891
|
+
// 根据线数据的唯一标识或坐标匹配
|
|
266892
|
+
if (this.isLineDataMatch(lineItemData, currentLineData)) {
|
|
266893
|
+
// 获取当前要素的样式
|
|
266894
|
+
let currentStyle = feature.getStyle();
|
|
266895
|
+
|
|
266896
|
+
// 如果没有样式,使用默认样式(保持现有行为)
|
|
266897
|
+
if (!currentStyle) {
|
|
266898
|
+
// 应用默认高亮样式
|
|
266899
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266900
|
+
feature.setStyle(new Style["default"]({
|
|
266901
|
+
stroke: new Stroke["default"]({
|
|
266902
|
+
color: highlightColor,
|
|
266903
|
+
// 使用自定义高亮颜色
|
|
266904
|
+
width: lineWidth,
|
|
266905
|
+
// 使用自定义或默认高亮线宽
|
|
266906
|
+
lineDash: lineItemData.lineDash ? [10, 10] : undefined
|
|
266907
|
+
})
|
|
266908
|
+
}));
|
|
266909
|
+
} else {
|
|
266910
|
+
// 复制当前样式并只修改线宽
|
|
266911
|
+
let newStyle;
|
|
266912
|
+
|
|
266913
|
+
// 处理多样式情况
|
|
266914
|
+
if (Array.isArray(currentStyle)) {
|
|
266915
|
+
// 找到包含stroke的样式
|
|
266916
|
+
const strokeStyleIndex = currentStyle.findIndex(style => style.getStroke() !== null);
|
|
266917
|
+
if (strokeStyleIndex !== -1) {
|
|
266918
|
+
// 复制样式数组
|
|
266919
|
+
newStyle = [...currentStyle];
|
|
266920
|
+
// 复制当前的stroke样式
|
|
266921
|
+
const currentStroke = currentStyle[strokeStyleIndex].getStroke();
|
|
266922
|
+
// 计算新的线宽
|
|
266923
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266924
|
+
|
|
266925
|
+
// 创建新的stroke对象,保持原有颜色和其他属性,只修改宽度
|
|
266926
|
+
newStyle[strokeStyleIndex] = new Style["default"]({
|
|
266927
|
+
stroke: new Stroke["default"]({
|
|
266928
|
+
color: currentStroke.getColor(),
|
|
266929
|
+
// 保持原有颜色
|
|
266930
|
+
width: lineWidth,
|
|
266931
|
+
// 只修改线宽
|
|
266932
|
+
lineDash: currentStroke.getLineDash(),
|
|
266933
|
+
// 保持原有虚线样式
|
|
266934
|
+
lineCap: currentStroke.getLineCap(),
|
|
266935
|
+
// 保持原有线帽
|
|
266936
|
+
lineJoin: currentStroke.getLineJoin(),
|
|
266937
|
+
// 保持原有线连接
|
|
266938
|
+
miterLimit: currentStroke.getMiterLimit() // 保持原有斜接限制
|
|
266939
|
+
})
|
|
266940
|
+
});
|
|
266941
|
+
} else {
|
|
266942
|
+
// 如果没有找到stroke样式,使用默认行为
|
|
266943
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266944
|
+
feature.setStyle(new Style["default"]({
|
|
266945
|
+
stroke: new Stroke["default"]({
|
|
266946
|
+
color: highlightColor,
|
|
266947
|
+
width: lineWidth,
|
|
266948
|
+
lineDash: lineItemData.lineDash ? [10, 10] : undefined
|
|
266949
|
+
})
|
|
266950
|
+
}));
|
|
266951
|
+
}
|
|
266952
|
+
} else {
|
|
266953
|
+
// 单样式情况
|
|
266954
|
+
const currentStroke = currentStyle.getStroke();
|
|
266955
|
+
if (currentStroke) {
|
|
266956
|
+
// 计算新的线宽
|
|
266957
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266958
|
+
|
|
266959
|
+
// 创建新的样式,保持原有颜色和其他属性,只修改宽度
|
|
266960
|
+
newStyle = new Style["default"]({
|
|
266961
|
+
stroke: new Stroke["default"]({
|
|
266962
|
+
color: currentStroke.getColor(),
|
|
266963
|
+
// 保持原有颜色
|
|
266964
|
+
width: lineWidth,
|
|
266965
|
+
// 只修改线宽
|
|
266966
|
+
lineDash: currentStroke.getLineDash(),
|
|
266967
|
+
// 保持原有虚线样式
|
|
266968
|
+
lineCap: currentStroke.getLineCap(),
|
|
266969
|
+
// 保持原有线帽
|
|
266970
|
+
lineJoin: currentStroke.getLineJoin(),
|
|
266971
|
+
// 保持原有线连接
|
|
266972
|
+
miterLimit: currentStroke.getMiterLimit() // 保持原有斜接限制
|
|
266973
|
+
})
|
|
266974
|
+
});
|
|
266975
|
+
} else {
|
|
266976
|
+
// 如果没有stroke样式,使用默认行为
|
|
266977
|
+
const lineWidth = highlightWidth || lineItemData.originalWidth + 3;
|
|
266978
|
+
feature.setStyle(new Style["default"]({
|
|
266979
|
+
stroke: new Stroke["default"]({
|
|
266980
|
+
color: highlightColor,
|
|
266981
|
+
width: lineWidth,
|
|
266982
|
+
lineDash: lineItemData.lineDash ? [10, 10] : undefined
|
|
266983
|
+
})
|
|
266984
|
+
}));
|
|
266985
|
+
}
|
|
266986
|
+
}
|
|
266987
|
+
|
|
266988
|
+
// 应用新样式
|
|
266989
|
+
if (newStyle) {
|
|
266990
|
+
feature.setStyle(newStyle);
|
|
266991
|
+
}
|
|
266992
|
+
}
|
|
266993
|
+
|
|
266994
|
+
// 保存高亮状态
|
|
266995
|
+
feature.set("isHighlighted", true);
|
|
266996
|
+
// 保存当前高亮样式信息
|
|
266997
|
+
feature.set("highlightColor", highlightColor);
|
|
266998
|
+
feature.set("highlightWidth", highlightWidth || lineItemData.originalWidth + 3);
|
|
266999
|
+
}
|
|
267000
|
+
});
|
|
266804
267001
|
});
|
|
266805
267002
|
},
|
|
266806
267003
|
// 清除线图层的所有高亮
|
|
@@ -267163,6 +267360,10 @@ var CityAreaLayer_component = normalizeComponent(
|
|
|
267163
267360
|
feature.set("type", data.type);
|
|
267164
267361
|
feature.set("iconUrl", data.iconUrl);
|
|
267165
267362
|
feature.set("popoup", data.popoup);
|
|
267363
|
+
feature.set("popupTitle", data.popupTitle);
|
|
267364
|
+
feature.set("popupUrl", data.popupUrl);
|
|
267365
|
+
feature.set("popupWidth", data.popupWidth);
|
|
267366
|
+
feature.set("popupHeight", data.popupHeight);
|
|
267166
267367
|
feature.set("otherInfo", data.otherInfo);
|
|
267167
267368
|
feature.set("longitude", data.longitude);
|
|
267168
267369
|
feature.set("latitude", data.latitude);
|