Edit app-9xzmfic2e4g1/src/lib/google-maps-loader.ts via Editor
This commit is contained in:
parent
262f60e545
commit
fbad1021e0
@ -3,9 +3,8 @@ let isInitialized = false;
|
||||
export const initGoogleMaps = async (apiKey: string) => {
|
||||
if (isInitialized) return;
|
||||
|
||||
// Dynamically load the Google Maps script
|
||||
const script = document.createElement('script');
|
||||
script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&v=weekly`;
|
||||
script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&v=weekly&language=tr®ion=TR`;
|
||||
script.async = true;
|
||||
script.defer = true;
|
||||
|
||||
@ -17,4 +16,4 @@ export const initGoogleMaps = async (apiKey: string) => {
|
||||
script.onerror = reject;
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
};
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user