From b3b28cd6a600269ed94e334470caa2da2a098cd2 Mon Sep 17 00:00:00 2001 From: AlterTobi Date: Thu, 28 Mar 2024 23:02:29 +0100 Subject: [PATCH] google async (test) --- wfes-WayfarerStats.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wfes-WayfarerStats.js b/wfes-WayfarerStats.js index 61d7a990..d5441bf6 100644 --- a/wfes-WayfarerStats.js +++ b/wfes-WayfarerStats.js @@ -515,12 +515,13 @@ fnV1HwAAAABJRU5ErkJggg==`; `; } script.innerHTML += ` - function initMap() { - map = new google.maps.Map(document.getElementById('map'), { - zoom: 7, - center: {lat: 51.38, lng: 10.12}, - mapTypeId: 'hybrid' - }) + async function initMap() { + const { Map } = await google.maps.importLibrary("maps"); + map = new Map(document.getElementById('map'), { + zoom: 7, + center: {lat: 51.38, lng: 10.12}, + mapTypeId: 'hybrid' + }) `; script.innerHTML += innerScript + "}";