From 60909c08d5e9c32daec46f7997e08d0a45fd250c Mon Sep 17 00:00:00 2001 From: liqi <1174845810@qq.com> Date: Wed, 9 Apr 2025 21:40:14 +0800 Subject: [PATCH] 111 --- public/configJson/map.json | 43 +++-------- public/configJson/mapArea.json | 22 ++---- public/configJson/mapMars.json | 135 +++++++++++++++++---------------- src/views/contentData/index.js | 6 -- 4 files changed, 83 insertions(+), 123 deletions(-) diff --git a/public/configJson/map.json b/public/configJson/map.json index 67f0d19..30a8828 100644 --- a/public/configJson/map.json +++ b/public/configJson/map.json @@ -59,45 +59,22 @@ "basemaps": [ { "id": 2021, - "pid": 10, - "name": "天地图影像", - "icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png", - "type": "group", - "layers": [ - { - "name": "底图", - "type": "tdt", - "layer": "img_d" - }, - { - "name": "注记", - "type": "tdt", - "layer": "img_z" - } - ], + "name": "三维影像", + "type": "xyz", + "_comment": "更改url地图地址,'crs': 'EPSG:4490'是投影坐标系", + "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", "show": true }, { "id": 2022, - "pid": 10, - "name": "天地图电子", - "icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_vec.png", - "type": "group", - "layers": [ - { - "name": "底图", - "type": "tdt", - "layer": "vec_d" - }, - { - "name": "注记", - "type": "tdt", - "layer": "vec_z" - } - ], + "name": "二维影像", + "type": "gaode", + "_comment": "更改url地图地址,'crs': 'EPSG:4490'是投影坐标系", + "url": "/img/basemaps/gaode_vec.png", + "layer": "vec", "show": false } ], "layers": [] } -} \ No newline at end of file +} diff --git a/public/configJson/mapArea.json b/public/configJson/mapArea.json index 32c0a4c..e967dc3 100644 --- a/public/configJson/mapArea.json +++ b/public/configJson/mapArea.json @@ -63,25 +63,13 @@ "basemaps": [ { "id": 2021, - "pid": 10, - "name": "天地图影像", - "icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png", - "type": "group", - "layers": [ - { - "name": "底图", - "type": "tdt", - "layer": "img_d" - }, - { - "name": "注记", - "type": "tdt", - "layer": "img_z" - } - ], + "name": "三维影像", + "type": "xyz", + "_comment": "更改url地图地址,'crs': 'EPSG:4490'是投影坐标系", + "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", "show": true } ], "layers": [] } -} \ No newline at end of file +} diff --git a/public/configJson/mapMars.json b/public/configJson/mapMars.json index c57185f..5634b84 100644 --- a/public/configJson/mapMars.json +++ b/public/configJson/mapMars.json @@ -1,71 +1,72 @@ { - "map3d": { - "scene": { - "center": { - "lat": 30.57187, - "lng": 117.129547, - "alt": 1000, - "heading": 6, - "pitch": -90 - }, - "scene3DOnly": false, - "shadows": false, - "removeDblClick": true, - "sceneMode": 2, - "showSun": true, - "showMoon": true, - "showSkyBox": true, - "showSkyAtmosphere": true, - "fog": true, - "fxaa": true, - "requestRenderMode": true, - "globe": { - "depthTestAgainstTerrain": false, - "baseColor": "#546a53", - "showGroundAtmosphere": true, - "enableLighting": false - }, - "cameraController": { - "zoomFactor": 3.0, - "minimumZoomDistance": 1, - "maximumZoomDistance": 50000000, - "enableRotate": true, - "enableTranslate": true, - "enableTilt": true, - "enableZoom": true, - "enableCollisionDetection": true, - "minimumCollisionTerrainHeight": 15000 - } + "map3d": { + "scene": { + "center": { + "lat": 30.57187, + "lng": 117.129547, + "alt": 1000, + "heading": 6, + "pitch": -90 }, - "control": { - "homeButton": false, - "baseLayerPicker": false, - "sceneModePicker": false, - "vrButton": false, - "fullscreenButton": false, - "navigationHelpButton": false, - "clockAnimate":false, - "timeline": { - "zoom": false - }, - "animation": false, - "infoBox": false, - "geocoder": false, - "selectionIndicator": false + "scene3DOnly": false, + "shadows": false, + "removeDblClick": true, + "sceneMode": 2, + "showSun": true, + "showMoon": true, + "showSkyBox": true, + "showSkyAtmosphere": true, + "fog": true, + "fxaa": true, + "requestRenderMode": true, + "globe": { + "depthTestAgainstTerrain": false, + "baseColor": "#546a53", + "showGroundAtmosphere": true, + "enableLighting": false }, - "templateValues": { - "dataServer": "//data.mars3d.cn", - "gltfServerUrl": "//data.mars3d.cn/gltf" + "cameraController": { + "zoomFactor": 3.0, + "minimumZoomDistance": 1, + "maximumZoomDistance": 50000000, + "enableRotate": true, + "enableTranslate": true, + "enableTilt": true, + "enableZoom": true, + "enableCollisionDetection": true, + "minimumCollisionTerrainHeight": 15000 + } + }, + "control": { + "homeButton": false, + "baseLayerPicker": false, + "sceneModePicker": false, + "vrButton": false, + "fullscreenButton": false, + "navigationHelpButton": false, + "clockAnimate": false, + "timeline": { + "zoom": false }, - "basemaps": [ - { - "id": "", - "name": "天地图影像", - "type": "xyz", - "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", - "show": true - } - ], - "layers": [] - } - } \ No newline at end of file + "animation": false, + "infoBox": false, + "geocoder": false, + "selectionIndicator": false + }, + "templateValues": { + "dataServer": "//data.mars3d.cn", + "gltfServerUrl": "//data.mars3d.cn/gltf" + }, + "basemaps": [ + { + "id": 2021, + "name": "三维影像", + "type": "xyz", + "_comment": "更改url地图地址,'crs': 'EPSG:4490'是投影坐标系", + "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", + "show": true + } + ], + "layers": [] + } +} diff --git a/src/views/contentData/index.js b/src/views/contentData/index.js index ce4c8a9..3987411 100644 --- a/src/views/contentData/index.js +++ b/src/views/contentData/index.js @@ -82,7 +82,6 @@ export function allDevices(options, type, show) { } if (type === "all") { options.forEach((item, index) => { - console.log(item, "item"); if (item.devices.length !== 0) { item.devices.forEach((deviceItem, index) => { let graphic = graphicLayer.getGraphicById(deviceItem.id); @@ -119,7 +118,6 @@ export function allDevices(options, type, show) { }); } else { options.devices.forEach((item, index) => { - console.log(options, "item"); // const image = getImageSrc(item.deviceType.type); let graphic = graphicLayer.getGraphicById(item.id); if (!graphic) { @@ -154,7 +152,6 @@ import imgUav from "@/assets/img/uavimg.png"; //设备广告牌 function bindLayerPopup(graphicLayer, graphic) { let attr = graphic.attr; - console.log(attr, graphic, "attr"); if (graphic.name === "无人机") { graphic.bindPopup( `
@@ -222,7 +219,6 @@ function bindLayerPopup(graphicLayer, graphic) { }); } else if (graphic.name === "飞手") { } else { - console.log(attr, "attr"); let wPath = window.document.location.href; let pathName = route.path; let pos = wPath.indexOf(pathName); @@ -381,7 +377,6 @@ export function mapUavFiex(options) { let graphicDevice = window.marsMap.getLayerById("devLog"); if (graphicDevice) { let deviceGraphic = graphicDevice.getGraphicById(item.DeviceId); - console.log(deviceGraphic, "deviceGraphic"); if (deviceGraphic !== undefined) { deviceGraphic.setOptions({ style: { @@ -404,7 +399,6 @@ export function mapUavFiex(options) { ); car.addDynamicPosition(point, 0); } else if (item.BatchId + "_app" === car.id) { - console.log(item.app_lon, item.app_lat, "item"); // eslint-disable-next-line no-undef const point = new mars3d.LngLatPoint(item.app_lon, item.app_lat, 0); car.addDynamicPosition(point, 0);