Repository navigation
[BUG] Google Maps key verifier requires unavailable Places API Legacy #386
Description
Describe the bug
The Google Maps API Key verifier calls the legacy Places Autocomplete endpoint:
https://maps.googleapis.com/maps/api/place/autocomplete/json
This makes WWV report a valid Map Tiles API key as invalid with an "API not activated" error when the Google Cloud project has Map Tiles API and Places API (New) enabled. New Google Cloud projects can no longer enable Places API (Legacy), so enabling the API requested by the error is not a viable fix.
The key is subsequently used by createGooglePhotorealistic3DTileset, so the verifier should probe the Map Tiles API capability that WWV actually requires.
To reproduce
- Create a new Google Cloud project with billing enabled.
- Enable Map Tiles API and Places API (New).
- Create an API key authorized for Map Tiles API.
- In local WWV, open API Keys → Service Keys.
- Enter the key under Google Maps API Key.
- Observe that verification fails because WWV calls Place Autocomplete (Legacy).
Expected behavior
WWV should validate the key against the Photorealistic 3D Tiles endpoint and surface the Map Tiles API error message when configuration, billing, regional availability, or key restrictions prevent access.
Proposed patch
diff --git a/src/app/api/keys/verify/route.ts b/src/app/api/keys/verify/route.ts
--- a/src/app/api/keys/verify/route.ts
+++ b/src/app/api/keys/verify/route.ts
@@
async function verifyGoogleMaps(key: string): Promise<{ valid: boolean; error?: string }> {
- // Use a minimal Places Autocomplete request as a probe
- const url = `https://maps.googleapis.com/maps/api/place/autocomplete/json?input=a&key=${encodeURIComponent(key)}`;
+ // Probe the API WWV actually uses for Google Photorealistic 3D Tiles.
+ // Places Autocomplete (Legacy) cannot be enabled on new Google Cloud
+ // projects and therefore rejects otherwise valid Map Tiles API keys.
+ const url = `https://tile.googleapis.com/v1/3dtiles/root.json?key=${encodeURIComponent(key)}`;
const res = await fetch(url);
- const data = await res.json();
- if (data.status === "OK" || data.status === "ZERO_RESULTS") {
- return { valid: true };
- }
- return { valid: false, error: data.error_message || data.status };
+ if (res.ok) return { valid: true };
+
+ const data = await res.json().catch(() => null) as {
+ error?: { message?: string; status?: string };
+ } | null;
+ return {
+ valid: false,
+ error: data?.error?.message || data?.error?.status || `Map Tiles API returned HTTP ${res.status}`,
+ };
}Environment
- WWV local edition at commit
f3d7e00 - Native ARM64 Docker deployment on Raspberry Pi 5
- Accessed over a LAN hostname
Google's current migration documentation distinguishes Autocomplete (New) from the legacy GET endpoint and states that Places API Legacy cannot be enabled for new projects.
Activity
github-actions commentedon Aug 1, 2026
Issue Classification
repo:webbugfix: verify Google Maps keys against Map Tiles API
github-actions commentedon Oct 1, 2026
This issue has been inactive for 60 days. If there is no further activity in the next 14 days it will be closed automatically.
github-actions commentedon Oct 16, 2026
Closing due to inactivity. Feel free to re-open if the issue is still relevant.