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
@@ -1,11 +1,12 @@
import "maplibre-gl/dist/maplibre-gl.css";
import type { FeatureCollection, Geometry, Point } from "geojson";
import maplibregl, {
type GeoJSONSource,
type Map as MapLibreMap,
type MapSourceDataEvent,
type StyleSpecification
import * as maplibregl from "maplibre-gl";
import type {
GeoJSONSource,
Map as MapLibreMap,
MapSourceDataEvent,
StyleSpecification
} from "maplibre-gl";
import { useCallback, useEffect, useRef, useState, type RefObject } from "react";
import type { AccessTokenProvider } from "@/shared/auth/keycloak-auth";
@@ -271,9 +272,13 @@ export function useWorkbenchMap({
style: createBaseStyle(mapboxToken, tiandituToken),
pitch: 0,
bearing: 0,
dragRotate: false,
touchPitch: false,
maxZoom: MAP_MAX_ZOOM,
antialias: true,
preserveDrawingBuffer: true,
canvasContextAttributes: {
antialias: true,
preserveDrawingBuffer: true
},
trackResize: false,
attributionControl: false
});