Skip to content

Commit

Permalink
Merge pull request #497 from yuiseki/renovate/maplibre-gl-5.x
Browse files Browse the repository at this point in the history
Update dependency maplibre-gl to v5
  • Loading branch information
yuiseki authored Jan 3, 2025
2 parents 8fa9857 + 08863e5 commit 378b91e
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 27 deletions.
37 changes: 22 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
"apache-arrow": "^17.0.0",
"hnswlib-node": "^3.0.0",
"langchain": "^0.3.0",
"maplibre-gl": "^4.7.1",
"maplibre-gl": "^5.0.0",
"next": "14.2.22",
"osmtogeojson": "^3.0.0-beta.5",
"pmtiles": "^4.0.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-map-gl": "^7.1.7",
"react-map-gl": "^7.1.8",
"react-particles": "^2.12.2",
"recharts": "^2.8.0",
"sass": "^1.69.6",
Expand Down
2 changes: 1 addition & 1 deletion src/app/agent/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import osmtogeojson from "osmtogeojson";
import { getOverpassResponseJsonWithCache } from "@/lib/osm/getOverpass";
import { BaseMap } from "@/components/BaseMap";
import { GeoJsonToSourceLayer } from "@/components/GeoJsonToSourceLayer";
import { usePathname, useRouter } from "next/navigation";
import { usePathname } from "next/navigation";
import Link from "next/link";

const formatDate = (date: Date) => {
Expand Down
5 changes: 2 additions & 3 deletions src/components/BaseMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
GeolocateResultEvent,
Map,
MapRef,
MapStyle,
NavigationControl,
ViewStateChangeEvent,
} from "react-map-gl/maplibre";
import maplibregl from "maplibre-gl";
import "maplibre-gl/dist/maplibre-gl.css";

export const BaseMap: React.FC<{
Expand All @@ -19,7 +19,7 @@ export const BaseMap: React.FC<{
latitude: number;
zoom: number;
children?: any;
style?: string | maplibregl.StyleSpecification;
style?: string | MapStyle;
onMapLoad?: () => void;
onMapMove?: () => void;
onMapMoveEnd?: (e: ViewStateChangeEvent) => void;
Expand Down Expand Up @@ -74,7 +74,6 @@ export const BaseMap: React.FC<{
onLoad={onLoad}
onMove={onMove}
onMoveEnd={onMoveEnd}
mapLib={maplibregl}
mapStyle={style}
attributionControl={false}
initialViewState={{
Expand Down
4 changes: 2 additions & 2 deletions src/components/StaticMap/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MapProvider, MapRef } from "react-map-gl/maplibre";
import { MapProvider, MapRef, MapStyle } from "react-map-gl/maplibre";
import { BaseMap } from "../BaseMap";
import { useEffect, useRef } from "react";
import { TridentMapsStyle } from "@/types/TridentMaps";
Expand All @@ -7,7 +7,7 @@ import * as turf from "@turf/turf";
import { GeoJsonToSourceLayer } from "../GeoJsonToSourceLayer";

export const StaticMap: React.FC<{
style: string | maplibregl.StyleSpecification;
style: string | MapStyle;
geojsonWithStyleList?: Array<{
id: string;
style: TridentMapsStyle;
Expand Down
7 changes: 3 additions & 4 deletions src/components/StaticRegionsMap/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { FeatureCollection } from "geojson";
import * as turf from "@turf/turf";
import { GeoJsonToSourceLayer } from "../GeoJsonToSourceLayer";
import { useEffect, useRef, useState } from "react";
import { MapStyle } from "react-map-gl/maplibre";
import { useEffect, useState } from "react";
import { TridentMapsStyle } from "@/types/TridentMaps";
import { StaticMap } from "../StaticMap";
import { getNominatimResponseJsonWithCache } from "@/lib/osm/getNominatim";
import { getOverpassResponseJsonWithCache } from "@/lib/osm/getOverpass";
import osmtogeojson from "osmtogeojson";

export const StaticRegionsMap: React.FC<{
mapStyle: string | maplibregl.StyleSpecification;
mapStyle: string | MapStyle;
mapPadding?: number;
regionNames: string[];
}> = ({
Expand Down

0 comments on commit 378b91e

Please sign in to comment.