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

更新撒点样式

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