Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[web][photos] Switch to Stadia Maps proxy for tiles and geocoding

anandbaburajan0ce31a271beb
diff --git a/web/apps/photos/src/components/TripLayout/TripMap.tsx b/web/apps/photos/src/components/TripLayout/TripMap.tsx
index c2ac5652d9..43ec7d2b5e 100644
--- a/web/apps/photos/src/components/TripLayout/TripMap.tsx
+++ b/web/apps/photos/src/components/TripLayout/TripMap.tsx
@@ -95,7 +95,7 @@ export const TripMap: React.FC<TripMapProps> = ({
? ""
: '&copy; <a href="https://stadiamaps.com/">Stadia Maps</a>, &copy; <a href="https://openmaptiles.org/">OpenMapTiles</a> &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
}
- url="https://tiles.stadiamaps.com/tiles/alidade_satellite/{z}/{x}/{y}{r}.jpg"
+ url="https://stadia-maps-proxy.ente.workers.dev/tiles/alidade_satellite/{z}/{x}/{y}{r}.jpg"
maxZoom={20}
/>
diff --git a/web/apps/photos/src/components/TripLayout/utils/geocoding.ts b/web/apps/photos/src/components/TripLayout/utils/geocoding.ts
index 6f21a2093d..5c69226d80 100644
--- a/web/apps/photos/src/components/TripLayout/utils/geocoding.ts
+++ b/web/apps/photos/src/components/TripLayout/utils/geocoding.ts
@@ -48,7 +48,6 @@ export const throttle = <T extends (...args: unknown[]) => void>(
};
// Reverse geocoding function using Stadia Maps with caching
-// Works without API key for localhost development
export const getLocationName = async (
lat: number,
lng: number,
@@ -67,7 +66,7 @@ export const getLocationName = async (
try {
const response = await fetch(
- `https://api.stadiamaps.com/geocoding/v1/reverse?point.lat=${lat}&point.lon=${lng}`,
+ `https://stadia-maps-proxy.ente.workers.dev/geocoding/v1/reverse?point.lat=${lat}&point.lon=${lng}`,
);
if (!response.ok) {