feat: replace Google tile URL hack with leaflet-google-mutant for traffic layer

Add leaflet-google-mutant@0.16.0 (exact/locked version) as a proper bridge
between the Google Maps JavaScript API and Leaflet. The old mt{s}.google.com
tile URL approach was unofficial and produced empty tiles.

Traffic layer now renders via createLayerComponent + googleMutant, loaded only
after the Maps JS API script is injected and ready (keyed off NEXT_PUBLIC_GOOGLE_MAPS_API_KEY).
Added leaflet-google-mutant to transpilePackages in next.config.mjs.
This commit is contained in:
Logan
2026-05-25 13:41:10 -04:00
parent 0279a82b10
commit 6a9fe5d26f
3 changed files with 34 additions and 8 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
transpilePackages: ["leaflet", "react-leaflet"],
transpilePackages: ["leaflet", "react-leaflet", "leaflet-google-mutant"],
};
export default nextConfig;