update
Build and Release / release (push) Successful in 36s

This commit is contained in:
anhncd
2026-05-23 13:46:44 +07:00
parent 051835b9bd
commit 82dfd7fa56
+2 -4
View File
@@ -232,9 +232,8 @@ function preloadPointIcons() {
function updateIconsOnMap(map: maplibregl.Map, typeId: PointGeotypeId) {
if (!map || !map.getStyle()) return;
try {
for (const variant of ["default", "draft"] as const) {
const iconId = getPointIconId(typeId, variant);
const imageData = createPointIconImageData(typeId, variant);
const iconId = getPointIconId(typeId);
const imageData = createPointIconImageData(typeId);
if (imageData) {
if (map.hasImage(iconId)) {
map.updateImage(iconId, imageData);
@@ -242,7 +241,6 @@ function updateIconsOnMap(map: maplibregl.Map, typeId: PointGeotypeId) {
map.addImage(iconId, imageData, { pixelRatio: 2 });
}
}
}
} catch (err) {
console.warn(`Failed to update icon ${typeId} on map:`, err);
}