Commit 154bf41c authored by 郭铭瑶's avatar 郭铭瑶 🤘

取消楼宇描边功能加入

parent 9911d15a
...@@ -115,6 +115,9 @@ export default async function useInitMap(el: HTMLElement, camera: any) { ...@@ -115,6 +115,9 @@ export default async function useInitMap(el: HTMLElement, camera: any) {
}, },
}) })
sceneView.popup.autoOpenEnabled = false sceneView.popup.autoOpenEnabled = false
sceneView.when(function () {
sceneView.qualitySettings.memoryLimit = 4096
})
window.sceneView = sceneView window.sceneView = sceneView
// const layerList = new LayerList({ // const layerList = new LayerList({
...@@ -126,6 +129,7 @@ export default async function useInitMap(el: HTMLElement, camera: any) { ...@@ -126,6 +129,7 @@ export default async function useInitMap(el: HTMLElement, camera: any) {
// content: [layerList], // content: [layerList],
// }) // })
// window.sceneView.ui.add([layerListExpand], 'top-right') // window.sceneView.ui.add([layerListExpand], 'top-right')
window.sceneView.ui.add([], 'top-right') window.sceneView.ui.add([], 'top-right')
window.sceneView.ui.remove([ window.sceneView.ui.remove([
'zoom', 'zoom',
...@@ -253,6 +257,9 @@ export default async function useInitMap(el: HTMLElement, camera: any) { ...@@ -253,6 +257,9 @@ export default async function useInitMap(el: HTMLElement, camera: any) {
function addEventListener() { function addEventListener() {
window.sceneView.on('click', function (event) { window.sceneView.on('click', function (event) {
window.sceneView.popup.close() window.sceneView.popup.close()
if (window.modelHighlight) {
window.modelHighlight.remove()
}
window.sceneView.hitTest(event).then(async function (response) { window.sceneView.hitTest(event).then(async function (response) {
if (response.results.length > 0) { if (response.results.length > 0) {
const { layer } = response.results[0].graphic const { layer } = response.results[0].graphic
...@@ -285,6 +292,10 @@ function addEventListener() { ...@@ -285,6 +292,10 @@ function addEventListener() {
'getBuildingDetail', 'getBuildingDetail',
data?.NAME || data?.OBJECTID, data?.NAME || data?.OBJECTID,
) )
} else {
if (window.modelHighlight) {
window.modelHighlight.remove()
}
} }
if (!html) return if (!html) return
......
...@@ -122,6 +122,9 @@ watch( ...@@ -122,6 +122,9 @@ watch(
const closeDrawer = () => { const closeDrawer = () => {
store.commit('SET_SHOW_BUILDING_DETAIL', false) store.commit('SET_SHOW_BUILDING_DETAIL', false)
store.commit('SET_SHOW_TAG', true) store.commit('SET_SHOW_TAG', true)
if (window.modelHighlight) {
window.modelHighlight.remove()
}
} }
</script> </script>
......
...@@ -146,6 +146,9 @@ const back = () => { ...@@ -146,6 +146,9 @@ const back = () => {
curBuilding.value = null curBuilding.value = null
store.commit('SET_BUILDING_DRAWER', false) store.commit('SET_BUILDING_DRAWER', false)
store.commit('SET_SHOW_TAG', true) store.commit('SET_SHOW_TAG', true)
if (window.modelHighlight) {
window.modelHighlight.remove()
}
} }
const closeDrawer = () => { const closeDrawer = () => {
back() back()
......
...@@ -143,6 +143,9 @@ const onClick = (type: string) => { ...@@ -143,6 +143,9 @@ const onClick = (type: string) => {
store.commit('SET_BUILDING_DRAWER', false) store.commit('SET_BUILDING_DRAWER', false)
store.commit('SET_SHOW_TAG', false) store.commit('SET_SHOW_TAG', false)
store.commit('SET_SHOW_BUILDING_DETAIL', false) store.commit('SET_SHOW_BUILDING_DETAIL', false)
if (window.modelHighlight) {
window.modelHighlight.remove()
}
switch (type) { switch (type) {
case 'filter': case 'filter':
store.commit('SET_FILTER_DRAWER', true) store.commit('SET_FILTER_DRAWER', true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment