diff --git a/index.html b/index.html index 5596916..df0944d 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ @@ -254,4 +254,4 @@ - \ No newline at end of file + diff --git a/index.html b/index.html index 5596916..df0944d 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ @@ -254,4 +254,4 @@ - \ No newline at end of file + diff --git a/src/utils/gis/NewFiberMapUtils.js b/src/utils/gis/NewFiberMapUtils.js index f788c53..e7b4db6 100644 --- a/src/utils/gis/NewFiberMapUtils.js +++ b/src/utils/gis/NewFiberMapUtils.js @@ -74,7 +74,7 @@ static async defaultPatrolDemo(newfiberMap) { const {mapParams,keys} = NewFiberMapUtils.defaultParams; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const icons = {ylz:rainStation_icon, hmss:spongeFacility_icon, car:'/images/car.png'}; NewFiberMapUtils.removeByIds([keys.defaultPatrolDemo]); @@ -93,7 +93,7 @@ static async defaultPreventWaterlogging(newfiberMap){ const {mapParams, keys} = NewFiberMapUtils.defaultParams; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const icons = { "confluence":sewageBenZhan_icon, "rain_water":rainBengZhan_icon, @@ -102,7 +102,7 @@ let result = await facilityPumpList(); let pumpData = result.data.filter(i => i.lon && i.lat &&i.geometrys); let points = pumpData.map(i => turf.point([i.lon,i.lat].map(Number),{style_:{id:keys.defaultPreventWaterloggingDemo,name:i.pumpName,...(defaulGeoJSONParams.point),options:Object.assign(defaulGeoJSONParams.point.options,{url:icons[i.pumpType]})}})) - let polygons = pumpData.map(i => turf.feature(Terraformer.WKT.parse(i.geometrys),{style_:{id:keys.defaultPatrolDemo,...(_.cloneDeep(defaulGeoJSONParams.polygon))}})); + let polygons = pumpData.map(i => turf.feature(Terraformer.WKT.parse(i.geometrys),{style_:{id:keys.defaultPatrolDemo,...defaulGeoJSONParams.polygon}})); NewFiberMapUtils.removeByIds([keys.defaultPreventWaterloggingDemo]); NewFiberMapUtils.weatherToMap(newfiberMap); /* let modelLegends = cesiumMapLegend.map(i => i.children).flat(Infinity).filter(i => i.layername.includes('Line') && i.type == '3dModel'); @@ -146,7 +146,7 @@ "/images/weather/QPFRef_202406252250.png", "/images/weather/QPFRef_202406252300.png", ]; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const bbox = [73.49899858945263, 10.228437, 135.08738720258265, 53.56131497236056]; let polygon = turf.bboxPolygon(bbox); let i = 0; diff --git a/index.html b/index.html index 5596916..df0944d 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ @@ -254,4 +254,4 @@ - \ No newline at end of file + diff --git a/src/utils/gis/NewFiberMapUtils.js b/src/utils/gis/NewFiberMapUtils.js index f788c53..e7b4db6 100644 --- a/src/utils/gis/NewFiberMapUtils.js +++ b/src/utils/gis/NewFiberMapUtils.js @@ -74,7 +74,7 @@ static async defaultPatrolDemo(newfiberMap) { const {mapParams,keys} = NewFiberMapUtils.defaultParams; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const icons = {ylz:rainStation_icon, hmss:spongeFacility_icon, car:'/images/car.png'}; NewFiberMapUtils.removeByIds([keys.defaultPatrolDemo]); @@ -93,7 +93,7 @@ static async defaultPreventWaterlogging(newfiberMap){ const {mapParams, keys} = NewFiberMapUtils.defaultParams; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const icons = { "confluence":sewageBenZhan_icon, "rain_water":rainBengZhan_icon, @@ -102,7 +102,7 @@ let result = await facilityPumpList(); let pumpData = result.data.filter(i => i.lon && i.lat &&i.geometrys); let points = pumpData.map(i => turf.point([i.lon,i.lat].map(Number),{style_:{id:keys.defaultPreventWaterloggingDemo,name:i.pumpName,...(defaulGeoJSONParams.point),options:Object.assign(defaulGeoJSONParams.point.options,{url:icons[i.pumpType]})}})) - let polygons = pumpData.map(i => turf.feature(Terraformer.WKT.parse(i.geometrys),{style_:{id:keys.defaultPatrolDemo,...(_.cloneDeep(defaulGeoJSONParams.polygon))}})); + let polygons = pumpData.map(i => turf.feature(Terraformer.WKT.parse(i.geometrys),{style_:{id:keys.defaultPatrolDemo,...defaulGeoJSONParams.polygon}})); NewFiberMapUtils.removeByIds([keys.defaultPreventWaterloggingDemo]); NewFiberMapUtils.weatherToMap(newfiberMap); /* let modelLegends = cesiumMapLegend.map(i => i.children).flat(Infinity).filter(i => i.layername.includes('Line') && i.type == '3dModel'); @@ -146,7 +146,7 @@ "/images/weather/QPFRef_202406252250.png", "/images/weather/QPFRef_202406252300.png", ]; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const bbox = [73.49899858945263, 10.228437, 135.08738720258265, 53.56131497236056]; let polygon = turf.bboxPolygon(bbox); let i = 0; diff --git a/src/views/sponeScreen/gisMF/cesiumMap.vue b/src/views/sponeScreen/gisMF/cesiumMap.vue index 27a503c..6d4fdaf 100644 --- a/src/views/sponeScreen/gisMF/cesiumMap.vue +++ b/src/views/sponeScreen/gisMF/cesiumMap.vue @@ -15,14 +15,15 @@ terrain: false, selectionIndicator: false, //单击是否出现绿色边框 }); - changeMapStyle.mapSetImageStyle(newfiberMap); -/* var layer = new NewFiberMap.Layer.MVTImageryProvider({ + // newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.TC_BLACK]); + // changeMapStyle.mapSetImageStyle(newfiberMap); + var layer = new NewFiberMap.Layer.MVTImageryProvider({ style: blue_vector, tileSize: 1024, }); layer.newfiberId = 'blackMap'; newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer);*/ + newfiberMap.getMap().imageryLayers.addImageryProvider(layer); // //设置视窗位置 newfiberMap.setView({ lng: 114.312, diff --git a/index.html b/index.html index 5596916..df0944d 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ @@ -254,4 +254,4 @@ - \ No newline at end of file + diff --git a/src/utils/gis/NewFiberMapUtils.js b/src/utils/gis/NewFiberMapUtils.js index f788c53..e7b4db6 100644 --- a/src/utils/gis/NewFiberMapUtils.js +++ b/src/utils/gis/NewFiberMapUtils.js @@ -74,7 +74,7 @@ static async defaultPatrolDemo(newfiberMap) { const {mapParams,keys} = NewFiberMapUtils.defaultParams; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const icons = {ylz:rainStation_icon, hmss:spongeFacility_icon, car:'/images/car.png'}; NewFiberMapUtils.removeByIds([keys.defaultPatrolDemo]); @@ -93,7 +93,7 @@ static async defaultPreventWaterlogging(newfiberMap){ const {mapParams, keys} = NewFiberMapUtils.defaultParams; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const icons = { "confluence":sewageBenZhan_icon, "rain_water":rainBengZhan_icon, @@ -102,7 +102,7 @@ let result = await facilityPumpList(); let pumpData = result.data.filter(i => i.lon && i.lat &&i.geometrys); let points = pumpData.map(i => turf.point([i.lon,i.lat].map(Number),{style_:{id:keys.defaultPreventWaterloggingDemo,name:i.pumpName,...(defaulGeoJSONParams.point),options:Object.assign(defaulGeoJSONParams.point.options,{url:icons[i.pumpType]})}})) - let polygons = pumpData.map(i => turf.feature(Terraformer.WKT.parse(i.geometrys),{style_:{id:keys.defaultPatrolDemo,...(_.cloneDeep(defaulGeoJSONParams.polygon))}})); + let polygons = pumpData.map(i => turf.feature(Terraformer.WKT.parse(i.geometrys),{style_:{id:keys.defaultPatrolDemo,...defaulGeoJSONParams.polygon}})); NewFiberMapUtils.removeByIds([keys.defaultPreventWaterloggingDemo]); NewFiberMapUtils.weatherToMap(newfiberMap); /* let modelLegends = cesiumMapLegend.map(i => i.children).flat(Infinity).filter(i => i.layername.includes('Line') && i.type == '3dModel'); @@ -146,7 +146,7 @@ "/images/weather/QPFRef_202406252250.png", "/images/weather/QPFRef_202406252300.png", ]; - const defaulGeoJSONParams = mapParams.geojson; + const defaulGeoJSONParams = _.cloneDeep(mapParams.geojson); const bbox = [73.49899858945263, 10.228437, 135.08738720258265, 53.56131497236056]; let polygon = turf.bboxPolygon(bbox); let i = 0; diff --git a/src/views/sponeScreen/gisMF/cesiumMap.vue b/src/views/sponeScreen/gisMF/cesiumMap.vue index 27a503c..6d4fdaf 100644 --- a/src/views/sponeScreen/gisMF/cesiumMap.vue +++ b/src/views/sponeScreen/gisMF/cesiumMap.vue @@ -15,14 +15,15 @@ terrain: false, selectionIndicator: false, //单击是否出现绿色边框 }); - changeMapStyle.mapSetImageStyle(newfiberMap); -/* var layer = new NewFiberMap.Layer.MVTImageryProvider({ + // newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.TC_BLACK]); + // changeMapStyle.mapSetImageStyle(newfiberMap); + var layer = new NewFiberMap.Layer.MVTImageryProvider({ style: blue_vector, tileSize: 1024, }); layer.newfiberId = 'blackMap'; newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer);*/ + newfiberMap.getMap().imageryLayers.addImageryProvider(layer); // //设置视窗位置 newfiberMap.setView({ lng: 114.312, diff --git a/src/views/sponeScreen/gisMF/changeMapStyle.js b/src/views/sponeScreen/gisMF/changeMapStyle.js index d9b11f9..1689d54 100644 --- a/src/views/sponeScreen/gisMF/changeMapStyle.js +++ b/src/views/sponeScreen/gisMF/changeMapStyle.js @@ -65,7 +65,7 @@ layer.show = false; }); if (!selectedLayer[0]) { - newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.AMAP_IMAGE]); + newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.ARCGIS_VECTOR_BLUE]); } else { selectedLayer[0].show = true; }