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

@ -44,7 +44,7 @@
"vrButton": false, "vrButton": false,
"fullscreenButton": false, "fullscreenButton": false,
"navigationHelpButton": false, "navigationHelpButton": false,
"clockAnimate":false, "clockAnimate": false,
"timeline": { "timeline": {
"zoom": false "zoom": false
}, },
@ -59,13 +59,14 @@
}, },
"basemaps": [ "basemaps": [
{ {
"id": "", "id": 2021,
"name": "天地图影像", "name": "三维影像",
"type": "xyz", "type": "xyz",
"url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", "_comment": "更改url地图地址'crs': 'EPSG:4490'是投影坐标系",
"url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
"show": true "show": true
} }
], ],
"layers": [] "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);