diff --git a/package.json b/package.json index c2e4d6f0..4368442f 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "firebase-admin": "^13.0.2", "formik": "^2.4.5", "loadashes6": "^1.0.0", - "maplibre-gl": "^5.7.0", + "maplibre-gl": "^5.24.1", "material-react-table": "^2.13.0", "next": "16.1.1", "next-intl": "^4.7.0", @@ -90,6 +90,7 @@ "@testing-library/react": "^16.3.2", "@testing-library/user-event": "^13.5.0", "@types/cypress": "^1.1.3", + "@types/geojson": "^7946.0.16", "@types/jest": "^30.0.0", "@types/material-ui": "^0.21.12", "@types/node": "^24.0.0", diff --git a/src/app/components/Map.tsx b/src/app/components/Map.tsx index 2d341e88..1931dc63 100644 --- a/src/app/components/Map.tsx +++ b/src/app/components/Map.tsx @@ -8,6 +8,7 @@ import MapGL, { MapProvider, } from 'react-map-gl/maplibre'; import 'maplibre-gl/dist/maplibre-gl.css'; +import type { Feature, Polygon } from 'geojson'; import { type LngLatTuple } from '../types'; import { Box } from '@mui/material'; import { getBoundsFromCoordinates } from './GtfsVisualizationMap.functions'; @@ -38,7 +39,7 @@ export const Map = ( coordinates.push(coordinates[0]); } - const polygonGeoJSON: GeoJSON.Feature = { + const polygonGeoJSON: Feature = { type: 'Feature', geometry: { type: 'Polygon', diff --git a/src/app/components/MapGeoJSON.tsx b/src/app/components/MapGeoJSON.tsx index a4bb03a7..5b3e3cdc 100644 --- a/src/app/components/MapGeoJSON.tsx +++ b/src/app/components/MapGeoJSON.tsx @@ -8,6 +8,7 @@ import MapGL, { Popup, } from 'react-map-gl/maplibre'; import 'maplibre-gl/dist/maplibre-gl.css'; +import type { FeatureCollection } from 'geojson'; import { type LngLatTuple } from '../types'; import { useTranslations } from 'next-intl'; import { PopupTable } from './PopupTable'; @@ -111,7 +112,7 @@ export const MapGeoJSON = (