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

取消楼宇描边功能加入

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