处理三维模型与图标事件无法触发以及图标在3d中消失问题

main
许宏杰 2 months ago
parent 77ee40e2d1
commit 5ced2804f7

@ -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) {

@ -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, // clickgraphics
allowDrillPick: false, // clickgraphics
});
map.addLayer(mapLayer.markerLayer);
};

Loading…
Cancel
Save