diff --git a/src/router/index.js b/src/router/index.js index 11fe529..f637d94 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,6 +2,7 @@ import { createWebHistory, createRouter } from 'vue-router' /* Layout */ import Layout from '@/layout' + /** * Note: 路由配置项 * @@ -166,7 +167,7 @@ export const dynamicRoutes = [ ] const router = createRouter({ - history: createWebHistory(process.env.NODE_ENV === 'production' ? '/nantong-police/' : '/'), + history: createWebHistory(import.meta.env.VITE_APP_ENV === 'production' ? '/nantong-police/' : '/'), routes: constantRoutes, scrollBehavior(to, from, savedPosition) { if (savedPosition) { diff --git a/src/views/map.vue b/src/views/map.vue index 593328b..1c60738 100644 --- a/src/views/map.vue +++ b/src/views/map.vue @@ -453,6 +453,7 @@ const initMarker = (item, flyTo = false, markerLength = 0) => { image: markerIcon, horizontalOrigin: Cesium.HorizontalOrigin.CENTER, verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + visibleDepth:false, label: { text: item.pointName, horizontalOrigin: Cesium.HorizontalOrigin.CENTER, @@ -460,9 +461,12 @@ const initMarker = (item, flyTo = false, markerLength = 0) => { font_size: 14, color: "#fff", pixelOffsetY: -45, + visibleDepth:false, }, highlight: { + type:'click', label: { + outline: true, outlineColor: "yellow", outlineOpacity: 0.7, @@ -596,9 +600,11 @@ const changeModel = (index) => { }); mapLayer.tiles3dLayer = new mars3d.layer.TilesetLayer({ name: "模型名称", - url: "https://zwyth.ntgaj.cn:8008/B3dmqlh06/tileset.json", + url: import.meta.env.VITE_APP_ENV === "production" ? "https://zwyth.ntgaj.cn:8008/B3dmqlh06/tileset.json" : "http://192.168.0.121:9090//B3dmqlh06/tileset.json",//本地nginx代理 maximumScreenSpaceError: 16, maxMemory: 1024, // 最大缓存内存大小(MB) + allowDrillPick: true, + eventParent:true, matrixMove: { hasMiddle: false, }, @@ -644,7 +650,7 @@ const mapLoad = (mapInstance) => { map = mapInstance; //创建marker图层 mapLayer.markerLayer = new mars3d.layer.GraphicLayer({ - allowDrillPick: true, // 如果存在坐标完全相同的图标点,可以打开该属性,click事件通过graphics判断 + allowDrillPick: false, // 如果存在坐标完全相同的图标点,可以打开该属性,click事件通过graphics判断 }); map.addLayer(mapLayer.markerLayer); };