mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 00:38:11 +00:00
LM map missing map api fall back fix
This commit is contained in:
@@ -12,3 +12,9 @@ VITE_TOKEN_REFRESH_INTERVAL_MINUTES=10
|
|||||||
# observability stays off (the app works either way). Self-hosted instance.
|
# observability stays off (the app works either way). Self-hosted instance.
|
||||||
VITE_POSTHOG_KEY=phc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
VITE_POSTHOG_KEY=phc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
VITE_POSTHOG_HOST=https://posthog.example.com
|
VITE_POSTHOG_HOST=https://posthog.example.com
|
||||||
|
|
||||||
|
# Maps JavaScript API key (fleet TrackingPage). Required — the hardcoded
|
||||||
|
# fallback in TrackingPage.tsx is expired (ExpiredKeyMapError), so without
|
||||||
|
# this set the tracking map renders blank. Get a key from the Google Cloud
|
||||||
|
# Console (Maps JavaScript API + Places API + Geocoding API enabled).
|
||||||
|
VITE_GOOGLE_MAPS_API_KEY=
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ import { gpsTrackingService, type GpsDevice } from "@/services/gps-tracking.serv
|
|||||||
import { freightBrand } from "@/theme/freight-brand";
|
import { freightBrand } from "@/theme/freight-brand";
|
||||||
|
|
||||||
// Same default key + env override the portal's LocationPicker uses.
|
// Same default key + env override the portal's LocationPicker uses.
|
||||||
|
// NOTE: fallback key is EXPIRED (ExpiredKeyMapError) — set
|
||||||
|
// VITE_GOOGLE_MAPS_API_KEY (see .env.example) to a live key.
|
||||||
const GOOGLE_MAPS_API_KEY =
|
const GOOGLE_MAPS_API_KEY =
|
||||||
import.meta.env.VITE_GOOGLE_MAPS_API_KEY ||
|
import.meta.env.VITE_GOOGLE_MAPS_API_KEY ||
|
||||||
"AIzaSyBg4tN31-fgvH_2Ix_TPo6VSfOA2uA5CCI";
|
"AIzaSyBg4tN31-fgvH_2Ix_TPo6VSfOA2uA5CCI";
|
||||||
|
|||||||
@@ -47,6 +47,12 @@ interface PlacePrediction {
|
|||||||
// Maps JavaScript API keys are public client-side keys (lock them down by
|
// Maps JavaScript API keys are public client-side keys (lock them down by
|
||||||
// HTTP-referrer in the Google Cloud console). The env var lets deployments
|
// HTTP-referrer in the Google Cloud console). The env var lets deployments
|
||||||
// override the default key without a code change.
|
// override the default key without a code change.
|
||||||
|
//
|
||||||
|
// NOTE: the fallback key below is EXPIRED (confirmed via live request —
|
||||||
|
// "Google Maps JavaScript API error: ExpiredKeyMapError"), which renders
|
||||||
|
// this picker's map blank while the search box spins forever. Set
|
||||||
|
// VITE_GOOGLE_MAPS_API_KEY (see .env.example) to a live key to fix it; don't
|
||||||
|
// rely on this default.
|
||||||
const GOOGLE_MAPS_API_KEY =
|
const GOOGLE_MAPS_API_KEY =
|
||||||
import.meta.env.VITE_GOOGLE_MAPS_API_KEY ||
|
import.meta.env.VITE_GOOGLE_MAPS_API_KEY ||
|
||||||
"AIzaSyBg4tN31-fgvH_2Ix_TPo6VSfOA2uA5CCI";
|
"AIzaSyBg4tN31-fgvH_2Ix_TPo6VSfOA2uA5CCI";
|
||||||
|
|||||||
Reference in New Issue
Block a user