This commit is contained in:
liqi 2025-04-09 21:40:14 +08:00
parent 90ad89cf1f
commit 60909c08d5
4 changed files with 83 additions and 123 deletions

View File

@ -59,42 +59,19 @@
"basemaps": [ "basemaps": [
{ {
"id": 2021, "id": 2021,
"pid": 10, "name": "三维影像",
"name": "天地图影像", "type": "xyz",
"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png", "_comment": "更改url地图地址'crs': 'EPSG:4490'是投影坐标系",
"type": "group", "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
"layers": [
{
"name": "底图",
"type": "tdt",
"layer": "img_d"
},
{
"name": "注记",
"type": "tdt",
"layer": "img_z"
}
],
"show": true "show": true
}, },
{ {
"id": 2022, "id": 2022,
"pid": 10, "name": "二维影像",
"name": "天地图电子", "type": "gaode",
"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_vec.png", "_comment": "更改url地图地址'crs': 'EPSG:4490'是投影坐标系",
"type": "group", "url": "/img/basemaps/gaode_vec.png",
"layers": [ "layer": "vec",
{
"name": "底图",
"type": "tdt",
"layer": "vec_d"
},
{
"name": "注记",
"type": "tdt",
"layer": "vec_z"
}
],
"show": false "show": false
} }
], ],

View File

@ -63,22 +63,10 @@
"basemaps": [ "basemaps": [
{ {
"id": 2021, "id": 2021,
"pid": 10, "name": "三维影像",
"name": "天地图影像", "type": "xyz",
"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png", "_comment": "更改url地图地址'crs': 'EPSG:4490'是投影坐标系",
"type": "group", "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
"layers": [
{
"name": "底图",
"type": "tdt",
"layer": "img_d"
},
{
"name": "注记",
"type": "tdt",
"layer": "img_z"
}
],
"show": true "show": true
} }
], ],

View File

@ -1,71 +1,72 @@
{ {
"map3d": { "map3d": {
"scene": { "scene": {
"center": { "center": {
"lat": 30.57187, "lat": 30.57187,
"lng": 117.129547, "lng": 117.129547,
"alt": 1000, "alt": 1000,
"heading": 6, "heading": 6,
"pitch": -90 "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
}
}, },
"control": { "scene3DOnly": false,
"homeButton": false, "shadows": false,
"baseLayerPicker": false, "removeDblClick": true,
"sceneModePicker": false, "sceneMode": 2,
"vrButton": false, "showSun": true,
"fullscreenButton": false, "showMoon": true,
"navigationHelpButton": false, "showSkyBox": true,
"clockAnimate":false, "showSkyAtmosphere": true,
"timeline": { "fog": true,
"zoom": false "fxaa": true,
}, "requestRenderMode": true,
"animation": false, "globe": {
"infoBox": false, "depthTestAgainstTerrain": false,
"geocoder": false, "baseColor": "#546a53",
"selectionIndicator": false "showGroundAtmosphere": true,
"enableLighting": false
}, },
"templateValues": { "cameraController": {
"dataServer": "//data.mars3d.cn", "zoomFactor": 3.0,
"gltfServerUrl": "//data.mars3d.cn/gltf" "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": [ "animation": false,
{ "infoBox": false,
"id": "", "geocoder": false,
"name": "天地图影像", "selectionIndicator": false
"type": "xyz", },
"url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", "templateValues": {
"show": true "dataServer": "//data.mars3d.cn",
} "gltfServerUrl": "//data.mars3d.cn/gltf"
], },
"layers": [] "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": []
} }
}

View File

@ -82,7 +82,6 @@ export function allDevices(options, type, show) {
} }
if (type === "all") { if (type === "all") {
options.forEach((item, index) => { options.forEach((item, index) => {
console.log(item, "item");
if (item.devices.length !== 0) { if (item.devices.length !== 0) {
item.devices.forEach((deviceItem, index) => { item.devices.forEach((deviceItem, index) => {
let graphic = graphicLayer.getGraphicById(deviceItem.id); let graphic = graphicLayer.getGraphicById(deviceItem.id);
@ -119,7 +118,6 @@ export function allDevices(options, type, show) {
}); });
} else { } else {
options.devices.forEach((item, index) => { options.devices.forEach((item, index) => {
console.log(options, "item");
// const image = getImageSrc(item.deviceType.type); // const image = getImageSrc(item.deviceType.type);
let graphic = graphicLayer.getGraphicById(item.id); let graphic = graphicLayer.getGraphicById(item.id);
if (!graphic) { if (!graphic) {
@ -154,7 +152,6 @@ import imgUav from "@/assets/img/uavimg.png";
//设备广告牌 //设备广告牌
function bindLayerPopup(graphicLayer, graphic) { function bindLayerPopup(graphicLayer, graphic) {
let attr = graphic.attr; let attr = graphic.attr;
console.log(attr, graphic, "attr");
if (graphic.name === "无人机") { if (graphic.name === "无人机") {
graphic.bindPopup( graphic.bindPopup(
` <div class="mians" style="height: 410px;"> ` <div class="mians" style="height: 410px;">
@ -222,7 +219,6 @@ function bindLayerPopup(graphicLayer, graphic) {
}); });
} else if (graphic.name === "飞手") { } else if (graphic.name === "飞手") {
} else { } else {
console.log(attr, "attr");
let wPath = window.document.location.href; let wPath = window.document.location.href;
let pathName = route.path; let pathName = route.path;
let pos = wPath.indexOf(pathName); let pos = wPath.indexOf(pathName);
@ -381,7 +377,6 @@ export function mapUavFiex(options) {
let graphicDevice = window.marsMap.getLayerById("devLog"); let graphicDevice = window.marsMap.getLayerById("devLog");
if (graphicDevice) { if (graphicDevice) {
let deviceGraphic = graphicDevice.getGraphicById(item.DeviceId); let deviceGraphic = graphicDevice.getGraphicById(item.DeviceId);
console.log(deviceGraphic, "deviceGraphic");
if (deviceGraphic !== undefined) { if (deviceGraphic !== undefined) {
deviceGraphic.setOptions({ deviceGraphic.setOptions({
style: { style: {
@ -404,7 +399,6 @@ export function mapUavFiex(options) {
); );
car.addDynamicPosition(point, 0); car.addDynamicPosition(point, 0);
} else if (item.BatchId + "_app" === car.id) { } else if (item.BatchId + "_app" === car.id) {
console.log(item.app_lon, item.app_lat, "item");
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const point = new mars3d.LngLatPoint(item.app_lon, item.app_lat, 0); const point = new mars3d.LngLatPoint(item.app_lon, item.app_lat, 0);
car.addDynamicPosition(point, 0); car.addDynamicPosition(point, 0);