Commit 95895a30 authored by 郭铭瑶's avatar 郭铭瑶 🤘

更新撒点样式

parent 924e92a1
......@@ -303,8 +303,9 @@ export default async function useInitMap(
areas.forEach((area) => showCommittee(area))
} else if (data?.['类别']?.includes('两新')) {
const buildings: string[] =
data?.['管辖楼宇']?.map((item: any) => item?.OBJECTID) ||
[]
data?.['管辖楼宇']
?.map((item: any) => item?.OBJECTID)
?.filter((item: any) => !!item) || []
showBuilding(buildings)
}
} else if (data?.isList) {
......@@ -314,6 +315,7 @@ export default async function useInitMap(
'getBuildingDetail',
data?.NAME || data?.OBJECTID,
)
data.NAME && showBuilding(data.NAME)
} else {
if (window.modelHighlight) {
window.modelHighlight.remove()
......
......@@ -65,16 +65,16 @@ export default {
maxWorldLength: 200,
minWorldLength: 35,
},
// callout: {
// type: "line", // autocasts as new LineCallout3D()
// // color: "#659def",
// color: "#fff",
// size: 2,
callout: {
type: 'line', // autocasts as new LineCallout3D()
// color: "#659def",
color: layerName === '蓝点' ? '#4285F4' : '#dd505e',
size: 0.5,
// border: {
// // color: [192, 196, 204]
// color: "#659def"
// }
// }
},
}, // autocasts as new SimpleFillSymbol()
}
......@@ -150,6 +150,10 @@ export default {
// type: 'selection',
// },
// elevationInfo: Parameters.elevationInfo,
elevationInfo: {
mode: 'relative-to-ground',
unit: 'meters',
},
spatialReference: SpatialReference.WebMercator,
})
window.map.add(clientOperateLayer)
......
......@@ -292,6 +292,19 @@ watch(
}
},
)
watch(
() => store.state.curTag,
(val) => {
if (!val) {
tips.value = {
show: false,
name: '',
value: 0,
outStreetValue: 0,
}
}
},
)
watch(
() => store.state.mapPoints,
(points: any) => {
......
......@@ -205,15 +205,14 @@ function showBuilding(name: string | string[]) {
)
)?.data?.features?.[0]?.attributes?.id || null
}
if (!objectId) return
if (!objectId || objectId.length === 0) return
const objectIds = Array.isArray(name) ? objectId : [objectId]
query.objectIds = objectIds
layerView
.queryExtent(query)
.then((result: any) => {
window.sceneView.goTo(result.extent.expand(7))
window.sceneView.goTo(result.extent.expand(2))
if (window.modelHighlight) {
window.modelHighlight.remove()
}
......
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