diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index 64d1d53..d093419 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -58,6 +58,7 @@ class HandleInertiaRequests extends Middleware ->whereNull('expires_at') ->orWhere('expires_at', '>', now()) ->count(), + 'carto_api_key' => config('services.carto.key'), ]; } } diff --git a/config/services.php b/config/services.php index 25c5f5e..cd92fb4 100644 --- a/config/services.php +++ b/config/services.php @@ -18,6 +18,10 @@ return [ 'key' => env('POSTMARK_API_KEY'), ], + 'carto' => [ + 'key' => env('CARTO_API_KEY'), + ], + 'resend' => [ 'key' => env('RESEND_API_KEY'), ], diff --git a/resources/js/Components/FlightsGoneBy/FlightMap.vue b/resources/js/Components/FlightsGoneBy/FlightMap.vue index e292bab..dbbabdd 100644 --- a/resources/js/Components/FlightsGoneBy/FlightMap.vue +++ b/resources/js/Components/FlightsGoneBy/FlightMap.vue @@ -50,6 +50,7 @@ import {useUpdateSetting} from "@/Composables/useUpdateSetting"; import {usePage} from "@inertiajs/vue3"; + type LngLat = [number, number] interface RouteFlightBucket { @@ -290,6 +291,7 @@ export default defineComponent({ const { updateSetting } = useUpdateSetting() const page = usePage().props + const carto_key = page.carto_api_key let map: maplibregl.Map | null = null let popup: maplibregl.Popup | null = null @@ -736,10 +738,10 @@ export default defineComponent({ maxzoom: 19, attribution: cartoAttribution.value, tiles: [ - 'https://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png', - 'https://b.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png', - 'https://c.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png', - 'https://d.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png', + `https://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png?key=${carto_key}`, + `https://b.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png?key=${carto_key}`, + `https://c.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png?key=${carto_key}`, + `https://d.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png?key=${carto_key}`, ], }, }, diff --git a/resources/js/Types/types.d.ts b/resources/js/Types/types.d.ts index 26ea0d3..e0986e7 100644 --- a/resources/js/Types/types.d.ts +++ b/resources/js/Types/types.d.ts @@ -110,6 +110,7 @@ export type SharedProps = import('@inertiajs/core').PageProps & { logo_api_url: string achievement_notifications: Notification[] unread_notification_count: number + carto_api_key: string } export interface AchievementDifficulty { id: number