Gas Station Feature Finally Working

This commit is contained in:
Eric Gullickson
2025-11-04 21:05:12 -06:00
parent 9a01ebd847
commit 45fea0f307
8 changed files with 433 additions and 56 deletions

View File

@@ -53,8 +53,9 @@ export function loadGoogleMaps(): Promise<void> {
// The callback parameter tells Google Maps to call our function when ready
// Using async + callback ensures Google Maps initializes asynchronously
const script = document.createElement('script');
script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&callback=${callbackName}&libraries=places`;
script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&callback=${callbackName}&libraries=places&loading=async`;
script.async = true;
script.defer = true; // Load asynchronously without blocking parsing (per Maps best practices)
script.onerror = () => {
// Reset promise so retry is possible