Page 1 of 1

Climate map not loading

Posted: Mon Nov 20, 2023 1:49 pm
by greenstreet
Hi everone,
I'm still working on a new version of my weatherstation site. Everything seems to work fine, but het climat map won't load. Error message: Oops! Something went wrong loading this page. Google Maps is not loaded .... See Javascript console .. etc.
I opened the Javascript console and noticed that it uses an old API Key I deleted on the Google Maps Platform
Here's wat I did:
1. Deleted an old API Key on the Google Maps Platform
2. Restored my billing information on the same platform
3. Configured the (right) settings to use the key (see screenshot)
4. I changed the key in file GoogleMapsKey.txt (install folder)
5. And still the climate map page uses the old Google Maps API key

I wonder if it is right to execute the "setup.php" again, but I think this will change the configuration of the site completely. So, I'm asking for advice for this issue.

Thanks a lot in advance.

Schermafbeelding 2023-11-20 140930.png
Schermafbeelding 2023-11-20 140930.png (51.13 KiB) Viewed 8647 times
Schermafbeelding 2023-11-20 141339.png
Schermafbeelding 2023-11-20 141339.png (48.02 KiB) Viewed 8647 times

Re: Climate map not loading

Posted: Fri Nov 24, 2023 4:10 pm
by MM0ZIF
I have exactly the same issues here, I wonder if Google changed something

Re: Climate map not loading

Posted: Sat Nov 25, 2023 4:53 pm
by davidefa
The google api key is saved in the config.php file ( see $googleMapsAPIKey near line 206 ).
To change it, you can rerun the meteotemplate main setup again, or if you fear to mess with something, you can edit the config.php file directly ( in this second case make a backup of the file, as messing with it may 'block' your entire site, I edit it directly quite often though )

Re: Climate map not loading

Posted: Sun Nov 26, 2023 1:27 pm
by greenstreet
Hi Davidefa,

Thanks for your advice. It finally works!
Best regards and thank you again,
Luc

Re: Climate map not loading

Posted: Tue Dec 26, 2023 12:50 pm
by Julius
So, what did you actually do to make it work? For me this is still "loading" and not showing anything..

Re: Climate map not loading

Posted: Tue Dec 26, 2023 1:38 pm
by davidefa
Extract this script in pages/climate directory ( will overwrite the existing climate_json.php script ), it should fix your issue.

Re: Climate map not loading

Posted: Tue Dec 26, 2023 3:29 pm
by greenstreet
Thanks to all of you!
It works fine now, the map is loading again!
Thank you again!