gis-map-universal 1.3.0 → 1.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.
- package/gismap.umd.js +39 -12
- package/package.json +1 -1
package/gismap.umd.js
CHANGED
|
@@ -261084,7 +261084,7 @@ function getTransportationPassengerList() {
|
|
|
261084
261084
|
function getTransportationFreightList() {
|
|
261085
261085
|
return requestEvent({
|
|
261086
261086
|
url: '/business/traffic-transportation/monthly-city-road-freight',
|
|
261087
|
-
method: "
|
|
261087
|
+
method: "get"
|
|
261088
261088
|
});
|
|
261089
261089
|
}
|
|
261090
261090
|
// 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/trafficEventLayers/EmergencyLayer.vue?vue&type=script&lang=js
|
|
@@ -264977,8 +264977,8 @@ function layersApi_getCongestionEventLayerData() {
|
|
|
264977
264977
|
// 城市区域
|
|
264978
264978
|
// 重大活动--活动地点
|
|
264979
264979
|
/* harmony default export */ var js_initBaseLayers = ({data(){return{lastHoverFeature:null,// 记录上一次悬停的要素
|
|
264980
|
-
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/
|
|
264981
|
-
|
|
264980
|
+
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?",
|
|
264981
|
+
geoJSONUrl:"/china_full.json",sdAreaUrl:"/sdArea.json",subwayLineUrl:"/ditieline.json",darkFillColor:"#1b2639",lightFillColor:"#eeeee9",darkStrokeColor:"#3578E0",lightStrokeColor:"#b4b4b1",tiandituKeyOne:"d02c0b2c57b4ba04f74cbccbb138f130",//天地图密钥1
|
|
264982
264982
|
tiandituKeyTwo:"aaaea01715112ff36a1d2a25f345ba4f"// 天地图密钥2
|
|
264983
264983
|
};},methods:{initBaseLayers(){let that=this;// 加载WMTS
|
|
264984
264984
|
// let resolutions = [
|
|
@@ -265036,17 +265036,40 @@ style:function(feature){return new Style["default"]({fill:new Fill["default"]({c
|
|
|
265036
265036
|
width:1// 边界线宽度
|
|
265037
265037
|
})});}});this.map.addLayer(this.china_full_Layer);});//监听点击事件
|
|
265038
265038
|
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=>{// 检查是否正在进行区域分析绘制
|
|
265039
|
-
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)
|
|
265039
|
+
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({
|
|
265040
|
+
// center: newCenterPoint,
|
|
265041
|
+
// duration: 800,
|
|
265042
|
+
// });
|
|
265043
|
+
this.overlayPopup.set("popupBS","clusterList");}else{// this.map.getView().animate({
|
|
265044
|
+
// center: feature.getGeometry().getCoordinates(),
|
|
265045
|
+
// zoom: this.map.getView().getZoom() * 2,
|
|
265046
|
+
// duration: 1200,
|
|
265047
|
+
// });
|
|
265048
|
+
}}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;}let pixelPoint=null;if(mousePoint){pixelPoint=this.map.getPixelFromCoordinate(mousePoint);}this.$emit("clickPointEvent",properties,pixelPoint);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.setNewCenter(0,-6,[data.longitude,data.latitude],13);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;case"cityArea":this.popupHeight=530;this.popupWidth=400;this.currentTabComponent=CityAreaLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML='都市圈综合分析';break;}this.showPopup();}}else{this.closePopup();}// this.overlayPopup.setPosition(mousePoint);
|
|
265040
265049
|
// this.overlayPopup.setOffset([
|
|
265041
265050
|
// -this.popupWidth / 2,
|
|
265042
265051
|
// -this.popupHeight,
|
|
265043
265052
|
// ]);
|
|
265044
|
-
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;
|
|
265053
|
+
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;if(properties.type=='customPoint'){let newcor=[properties.longitude,properties.latitude];setTimeout(()=>{this.overlayPopup.setPosition(newcor);this.overlayPopup.setOffset([-popupWidth/2,-popupHeight]);},1000);}else{this.overlayPopup.setPosition(mousePoint);this.overlayPopup.setOffset([-popupWidth/2,-popupHeight]);}// let pixelPoint = this.map.getPixelFromCoordinate(mousePoint);
|
|
265054
|
+
// let newpixelPoint = [pixelPoint[0], pixelPoint[1] - 150];
|
|
265055
|
+
// let newCenterPoint = this.map.getCoordinateFromPixel(newpixelPoint);
|
|
265056
|
+
// this.map.getView().animate({
|
|
265057
|
+
// center: newCenterPoint,
|
|
265058
|
+
// duration: 800,
|
|
265059
|
+
// });
|
|
265060
|
+
}}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;}let pixelPoint=null;if(mousePoint){pixelPoint=this.map.getPixelFromCoordinate(mousePoint);}this.$emit("clickPointEvent",properties,pixelPoint);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.setNewCenter(0,-6,[data.longitude,data.latitude],13);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;case"cityArea":this.popupHeight=530;this.popupWidth=400;this.currentTabComponent=CityAreaLayer;this.popupAttributes=data;popupHeaderTitle.innerHTML="";popupHeaderTitle.innerHTML='都市圈综合分析';break;}this.showPopup();}else{this.closePopup();}}else{this.closePopup();}// this.overlayPopup.setPosition(mousePoint);
|
|
265045
265061
|
// this.overlayPopup.setOffset([
|
|
265046
265062
|
// -this.popupWidth / 2,
|
|
265047
265063
|
// -this.popupHeight - 20,
|
|
265048
265064
|
// ]);
|
|
265049
|
-
let fontSize=Number(document.getElementsByTagName("html")[0].style.fontSize.split("px")[0]);let popupHeight=this.popupHeight/192*fontSize;let popupWidth=this.popupWidth/192*fontSize;this.overlayPopup.setPosition(
|
|
265065
|
+
let fontSize=Number(document.getElementsByTagName("html")[0].style.fontSize.split("px")[0]);let popupHeight=this.popupHeight/192*fontSize;let popupWidth=this.popupWidth/192*fontSize;if(properties.type=='customPoint'){let newcor=[properties.longitude,properties.latitude];setTimeout(()=>{this.overlayPopup.setPosition(newcor);this.overlayPopup.setOffset([-popupWidth/2,-popupHeight]);},1000);}else{this.overlayPopup.setPosition(mousePoint);this.overlayPopup.setOffset([-popupWidth/2,-popupHeight]);}// let pixelPoint = this.map.getPixelFromCoordinate(mousePoint);
|
|
265066
|
+
// let newpixelPoint = [pixelPoint[0], pixelPoint[1] - 150];
|
|
265067
|
+
// let newCenterPoint = this.map.getCoordinateFromPixel(newpixelPoint);
|
|
265068
|
+
// this.map.getView().animate({
|
|
265069
|
+
// center: newCenterPoint,
|
|
265070
|
+
// duration: 800,
|
|
265071
|
+
// });
|
|
265072
|
+
}}else{this.closePopup();}}});this.map.on("pointermove",e=>{let feature=this.map.forEachFeatureAtPixel(e.pixel,feature=>{return feature;});if(feature!==this.lastHoverFeature){if(this.lastHoverFeature){that.$emit("pointerOutEvent",this.lastHoverFeature.getProperties());}if(feature){let pixelPoint=null;if(feature.getProperties().longitude&&feature.getProperties().latitude){let latlon=[feature.getProperties().longitude,feature.getProperties().latitude];pixelPoint=this.map.getPixelFromCoordinate(latlon);}that.$emit("pointerMoveEvent",feature.getProperties(),pixelPoint);}this.lastHoverFeature=feature;}});},initRadarLayers(){let radarLayer=new layer_Image["default"]({layerName:"radarLayer",zIndex:88});this.map.addLayer(radarLayer);// 先调用API获取precTileInfo信息
|
|
265050
265073
|
fetch("http://api.datamatrices.com/api/precTileInfo/114.60168/34.260503/122.919454/38.400545").then(response=>response.json()).then(data=>{// 从返回数据中获取forecastTime和tileName
|
|
265051
265074
|
const forecastTime=data.data.forecastTime;// 假设返回数据中有forecastTime字段
|
|
265052
265075
|
const tileName=data.data.tileName;// 假设返回数据中有tileName字段
|
|
@@ -265302,7 +265325,8 @@ initAreaGDPLayer(){let data=[{city:"济南",latlng:[117.218567,36.63746469],leve
|
|
|
265302
265325
|
}else if(value===4){return"#FFD700";// 金色
|
|
265303
265326
|
}else if(value===5){return"#00FFFF";// 青色
|
|
265304
265327
|
}else{return"#2E2E2E";// 深灰色,用于默认或其他情况
|
|
265305
|
-
}}}}}]};if(this.largeTruckLayer){this.largeTruckLayer.setChartOptions(option);}},removeLargeTruckLayer(){if(this.largeTruckLayer){this.largeTruckLayer.remove();this.largeTruckLayer=null;}},/*交通运输*/initHighwayCapacityLayer(){getTransportationPassengerList().then(res=>{const records=res.data.result;const groups={};records.forEach(item=>{const m=item.month;if(!groups[m]){groups[m]=[];}groups[m].push({city:item.city,latlng:[item.longitude,item.latitude],total_flow:item.passenger});});const sortedMonths=Object.keys(groups).map(Number).sort((a,b)=>a-b);const outputList=sortedMonths.map(month=>{const points=groups[month].sort((a,b)=>b.total_flow-a.total_flow).map((p,i)=>({...p,level:16-i}));const monthStr=month+'月';const time=`${monthStr}`;const type='GLKY';return{time,points,type};});if(!this.isRadarShow){this.isRadarShow=true;this.tooltipIsShow=true;this.txtArr=outputList;this.maxValue=outputList.length-1;this.marks={};for(let i=0;i<outputList.length;i++){if(i%2===0){this.marks[i]={style:{color:"#77e5ff","font-size":"13px"},label:this.$createElement("span",outputList[i].time)};}}this.initEchartsLayer(outputList[0].points,"万人");}});},initHighwayFreightLayer(){getTransportationFreightList().then(res=>{const records=res.data.result;const groups={};records.forEach(item=>{const m=item.month;if(!groups[m]){groups[m]=[];}groups[m].push({city:item.city,latlng:[item.longitude,item.latitude],total_flow:item.freight});});const sortedMonths=Object.keys(groups).map(Number).sort((a,b)=>a-b);const outputList=sortedMonths.map(month=>{const points=groups[month].sort((a,b)=>b.total_flow-a.total_flow).map((p,i)=>({...p,level:16-i}));const monthStr=month+'月';const time=`${monthStr}`;const type='GLHY';return{time,points,type};});if(!this.isRadarShow){this.isRadarShow=true;this.tooltipIsShow=true;this.txtArr=outputList;this.maxValue=outputList.length-1;this.marks={};for(let i=0;i<outputList.length;i++){if(i%2===0){this.marks[i]={style:{color:"#77e5ff","font-size":"13px"},label:this.$createElement("span",outputList[i].time)};}}this.initEchartsLayer(outputList[0].points,"万吨");}});},closeJTYSLayer(){this.isRadarShow=false;this.isPlaying=false;clearInterval(this.intervalId);this.sliderValue=0;this.tooltipIsShow=false;if(this.echartslayer){this.echartslayer.remove();this.echartslayer=null;}}},watch:{themeStyle(val){let _this=this;if(val==="dark"){if(_this.tiandituLayer){_this.map.removeLayer(_this.tiandituLayer);_this.map.removeLayer(_this.china_full_Layer);_this.tiandituLayer=new layer_Tile["default"]({source:new Tianditu_Tianditu({url:_this.darkUrl,key:"d02c0b2c57b4ba04f74cbccbb138f130",projection:"EPSG:4326"}),zIndex:1});_this.map.addLayer(_this.tiandituLayer);fetch(_this.geoJSONUrl).then(response=>response.json()).then(data=>{let geoJSONFormat=new ol_format_GeoJSON["default"]();_this.china_full_Layer=new layer_Vector["default"]({layerName:"xxxx",source:new source_Vector["default"]({format:geoJSONFormat,features:geoJSONFormat.readFeatures(data,{dataProjection:"EPSG:4326",featureProjection:"EPSG:4326"})}),zIndex:3,style:function(feature){return new Style["default"]({fill:new Fill["default"]({color:_this.darkFillColor}),stroke:new Stroke["default"]({color:_this.darkStrokeColor,width:1})});}});_this.map.addLayer(_this.china_full_Layer);});}}else if(val==="light"){_this.map.removeLayer(_this.tiandituLayer);_this.map.removeLayer(_this.china_full_Layer);
|
|
265328
|
+
}}}}}]};if(this.largeTruckLayer){this.largeTruckLayer.setChartOptions(option);}},removeLargeTruckLayer(){if(this.largeTruckLayer){this.largeTruckLayer.remove();this.largeTruckLayer=null;}},/*交通运输*/initHighwayCapacityLayer(){getTransportationPassengerList().then(res=>{const records=res.data.result;const groups={};records.forEach(item=>{const m=item.month;if(!groups[m]){groups[m]=[];}groups[m].push({city:item.city,latlng:[item.longitude,item.latitude],total_flow:item.passenger});});const sortedMonths=Object.keys(groups).map(Number).sort((a,b)=>a-b);const outputList=sortedMonths.map(month=>{const points=groups[month].sort((a,b)=>b.total_flow-a.total_flow).map((p,i)=>({...p,level:16-i}));const monthStr=month+'月';const time=`${monthStr}`;const type='GLKY';return{time,points,type};});if(!this.isRadarShow){this.isRadarShow=true;this.tooltipIsShow=true;this.txtArr=outputList;this.maxValue=outputList.length-1;this.marks={};for(let i=0;i<outputList.length;i++){if(i%2===0){this.marks[i]={style:{color:"#77e5ff","font-size":"13px"},label:this.$createElement("span",outputList[i].time)};}}this.initEchartsLayer(outputList[0].points,"万人");}});},initHighwayFreightLayer(){getTransportationFreightList().then(res=>{const records=res.data.result;const groups={};records.forEach(item=>{const m=item.month;if(!groups[m]){groups[m]=[];}groups[m].push({city:item.city,latlng:[item.longitude,item.latitude],total_flow:item.freight});});const sortedMonths=Object.keys(groups).map(Number).sort((a,b)=>a-b);const outputList=sortedMonths.map(month=>{const points=groups[month].sort((a,b)=>b.total_flow-a.total_flow).map((p,i)=>({...p,level:16-i}));const monthStr=month+'月';const time=`${monthStr}`;const type='GLHY';return{time,points,type};});if(!this.isRadarShow){this.isRadarShow=true;this.tooltipIsShow=true;this.txtArr=outputList;this.maxValue=outputList.length-1;this.marks={};for(let i=0;i<outputList.length;i++){if(i%2===0){this.marks[i]={style:{color:"#77e5ff","font-size":"13px"},label:this.$createElement("span",outputList[i].time)};}}this.initEchartsLayer(outputList[0].points,"万吨");}});},closeJTYSLayer(){this.isRadarShow=false;this.isPlaying=false;clearInterval(this.intervalId);this.sliderValue=0;this.tooltipIsShow=false;if(this.echartslayer){this.echartslayer.remove();this.echartslayer=null;}}},watch:{themeStyle(val){let _this=this;if(val==="dark"){if(_this.tiandituLayer){_this.map.removeLayer(_this.tiandituLayer);_this.map.removeLayer(_this.china_full_Layer);_this.tiandituLayer=new layer_Tile["default"]({source:new Tianditu_Tianditu({url:_this.darkUrl,key:"d02c0b2c57b4ba04f74cbccbb138f130",projection:"EPSG:4326"}),zIndex:1});_this.map.addLayer(_this.tiandituLayer);fetch(_this.geoJSONUrl).then(response=>response.json()).then(data=>{let geoJSONFormat=new ol_format_GeoJSON["default"]();_this.china_full_Layer=new layer_Vector["default"]({layerName:"xxxx",source:new source_Vector["default"]({format:geoJSONFormat,features:geoJSONFormat.readFeatures(data,{dataProjection:"EPSG:4326",featureProjection:"EPSG:4326"})}),zIndex:3,style:function(feature){return new Style["default"]({fill:new Fill["default"]({color:_this.darkFillColor}),stroke:new Stroke["default"]({color:_this.darkStrokeColor,width:1})});}});_this.map.addLayer(_this.china_full_Layer);});}}else if(val==="light"){_this.map.removeLayer(_this.tiandituLayer);_this.map.removeLayer(_this.china_full_Layer);let selectedKey=_this.tiandituKeyOne;// 默认使用第一个密钥
|
|
265329
|
+
if(_this.tiandituKEY=="1"){selectedKey=_this.tiandituKeyOne;}else if(_this.tiandituKEY=="2"){selectedKey=_this.tiandituKeyTwo;}_this.tiandituLayer=new layer_Tile["default"]({source:new Tianditu_Tianditu({url:_this.lightUrl,key:selectedKey,projection:"EPSG:4326"}),zIndex:1});_this.map.addLayer(_this.tiandituLayer);fetch(_this.geoJSONUrl).then(response=>response.json()).then(data=>{let geoJSONFormat=new ol_format_GeoJSON["default"]();_this.china_full_Layer=new layer_Vector["default"]({layerName:"xxxx",source:new source_Vector["default"]({format:geoJSONFormat,features:geoJSONFormat.readFeatures(data,{dataProjection:"EPSG:4326",featureProjection:"EPSG:4326"})}),zIndex:3,style:function(feature){return new Style["default"]({fill:new Fill["default"]({color:_this.lightFillColor}),stroke:new Stroke["default"]({color:_this.lightStrokeColor,width:1})});}});_this.map.addLayer(_this.china_full_Layer);});}}}});
|
|
265306
265330
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js
|
|
265307
265331
|
var es_array_reduce = __webpack_require__("13d5");
|
|
265308
265332
|
|
|
@@ -266345,6 +266369,10 @@ var scratch = __webpack_require__("c1ec");
|
|
|
266345
266369
|
break;
|
|
266346
266370
|
case "特大货车":
|
|
266347
266371
|
this.initLargeTruckLayer();
|
|
266372
|
+
case "公路客运(2025年)":
|
|
266373
|
+
this.initHighwayCapacityLayer();
|
|
266374
|
+
case "公路货运(2025年)":
|
|
266375
|
+
this.initHighwayFreightLayer();
|
|
266348
266376
|
break;
|
|
266349
266377
|
default:
|
|
266350
266378
|
break;
|
|
@@ -267887,7 +267915,7 @@ var ol_style_RegularShape = __webpack_require__("35d8");
|
|
|
267887
267915
|
this.typhoonTooltipElement.style.display = "none";
|
|
267888
267916
|
}
|
|
267889
267917
|
},
|
|
267890
|
-
async loadShandongAreaLayer(adcodes) {
|
|
267918
|
+
async loadShandongAreaLayer(adcodes, areaColor, borderlineColor) {
|
|
267891
267919
|
// 确保adcodes是数组,如果没有传入参数则默认为空数组(表示加载全省)
|
|
267892
267920
|
const adcodeArray = adcodes ? Array.isArray(adcodes) ? adcodes : [adcodes] : [];
|
|
267893
267921
|
|
|
@@ -267930,12 +267958,11 @@ var ol_style_RegularShape = __webpack_require__("35d8");
|
|
|
267930
267958
|
zIndex: 3,
|
|
267931
267959
|
style: new Style["default"]({
|
|
267932
267960
|
fill: new Fill["default"]({
|
|
267933
|
-
color: 'rgba(0, 255, 0, 0.4)'
|
|
267961
|
+
color: areaColor || 'rgba(0, 255, 0, 0.4)'
|
|
267934
267962
|
}),
|
|
267935
267963
|
stroke: new Stroke["default"]({
|
|
267936
|
-
color: '#ff0000',
|
|
267937
|
-
|
|
267938
|
-
width: 1.5 // 分界线宽度
|
|
267964
|
+
color: borderlineColor || '#ff0000',
|
|
267965
|
+
width: 1.5
|
|
267939
267966
|
})
|
|
267940
267967
|
})
|
|
267941
267968
|
});
|