更新图层添加逻辑,图层已存在则设置为可见。
This commit is contained in:
parent
621b368d38
commit
9085ad60aa
|
|
@ -127,6 +127,10 @@ export async function loadVectorFeature(layerId, feature, color, visibility, map
|
||||||
// 'slot': 'foreground'
|
// 'slot': 'foreground'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// 图层已存在则设置为可见
|
||||||
|
Vue.config.maps[mapId].setLayoutProperty(`${sourceId}-${feature}`, "visibility", "visible");
|
||||||
|
}
|
||||||
|
|
||||||
// 点击可交互的图层,显示相关信息
|
// 点击可交互的图层,显示相关信息
|
||||||
await setHighlight(`${sourceId}-${feature}`, sourceId, mapId);
|
await setHighlight(`${sourceId}-${feature}`, sourceId, mapId);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue