修改添加gsojson的isdefault,方便重置场景

This commit is contained in:
wzy-warehouse
2026-04-14 17:05:27 +08:00
parent d6f488bb3e
commit df1fb2aea3
8 changed files with 12 additions and 9 deletions
+4 -2
View File
@@ -18,12 +18,14 @@ export const usePointsHandle = () => {
* @param points - 点数据数组
* @param getDisasterIcon - 获取灾害图标的函数
* @param prefix - 前缀
* @param isDefault - 是否为默认图元,默认false
* @returns 点的ID列表
*/
function addPoints(
points: Point[],
getDisasterIcon: (disasterType?: string) => string,
prefix: string
prefix: string,
isDefault: boolean = false
): string[] {
// 设置加载配置
const options: PrimitiveOptions[] = [];
@@ -48,7 +50,7 @@ export const usePointsHandle = () => {
image: getDisasterIcon(point.disasterType),
scale: 0.8,
width: 40,
isDefault: false,
isDefault: isDefault,
scaleByDistance: new NearFarScalar(500, 1, 5e5, 0.3),
customProperties: {
verticalOrigin: VerticalOrigin.BOTTOM,