fix(security): upgrade MapLibre runtime

This commit is contained in:
2026-10-22 14:47:57 +08:00
parent edeeec3c41
commit 2100353ef5
8 changed files with 136 additions and 197 deletions
+6 -3
View File
@@ -1,4 +1,5 @@
import maplibregl, { type Map as MapLibreMap, type StyleSpecification } from "maplibre-gl";
import * as maplibregl from "maplibre-gl";
import type { Map as MapLibreMap, StyleSpecification } from "maplibre-gl";
import type { MapFeatureInteractionState } from "../hooks/use-map-interactions";
const MAX_EXPORT_DIMENSION = 4096;
@@ -38,8 +39,10 @@ export async function exportMapViewImage(map: MapLibreMap, { scale, targetLongEd
zoom: map.getZoom(),
pitch: map.getPitch(),
bearing: map.getBearing(),
antialias: true,
preserveDrawingBuffer: true,
canvasContextAttributes: {
antialias: true,
preserveDrawingBuffer: true
},
interactive: false,
attributionControl: false,
fadeDuration: 0