Raised This Month: $32 Target: $400
 8% 

google maps not showing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zo6zo6
Member
Join Date: Feb 2018
Old 01-06-2020 , 15:50   google maps not showing
Reply With Quote #1

hello,
yesterday i installed hlstats on my webserver.
everything works great except google maps. it always results to an error even though i used the api key correctly.
what can it be wrong?
my hlstats page: https://hlstats.xtreme-servers.eu
zo6zo6 is offline
brlight
Senior Member
Join Date: Jun 2011
Old 01-06-2020 , 17:02   Re: google maps not showing
Reply With Quote #2

Put your apikey without <> instead of <your api key>

PHP Code:
echo ('<*****="https://maps.googleapis.com/maps/api/js?key=YOURAPIKEY&callback=initMap" type="text/javascript"></script>'); 

Last edited by brlight; 01-06-2020 at 17:24.
brlight is offline
zo6zo6
Member
Join Date: Feb 2018
Old 01-07-2020 , 09:43   Re: google maps not showing
Reply With Quote #3

Quote:
Originally Posted by brlight View Post
Put your apikey without <> instead of <your api key>

PHP Code:
echo ('<*****="https://maps.googleapis.com/maps/api/js?key=YOURAPIKEY&callback=initMap" type="text/javascript"></script>'); 
i tried this and now its worse. its not even loading the map window any more
zo6zo6 is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: Czech_Republic
Old 01-07-2020 , 15:57   Re: google maps not showing
Reply With Quote #4

Edit google_maps.php inside /web/includes/ and change line #45

PHP Code:
// Only replace URL in src="", don't change PHP code!
echo ('... src="//maps.google.com/maps/api/js?key=API_KEY" ....'); 
__________________

Last edited by NomisCZ; 01-07-2020 at 16:06. Reason: Cloudflare uber thing ...
NomisCZ is offline
zo6zo6
Member
Join Date: Feb 2018
Old 01-07-2020 , 18:03   Re: google maps not showing
Reply With Quote #5

Quote:
Originally Posted by NomisCZ View Post
Edit google_maps.php inside /web/includes/ and change line #45

PHP Code:
// Only replace URL in src="", don't change PHP code!
echo ('... src="//maps.google.com/maps/api/js?key=API_KEY" ....'); 
i started with a fresh google maps config file, changed only the url in line 45 and now i am back to the first problem. google maps are not loading correctly. it loads for a fraction of a second and then error
zo6zo6 is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: Czech_Republic
Old 01-07-2020 , 19:00   Re: google maps not showing
Reply With Quote #6

Quote:
Originally Posted by zo6zo6 View Post
i started with a fresh google maps config file, changed only the url in line 45 and now i am back to the first problem. google maps are not loading correctly. it loads for a fraction of a second and then error
Browser console error: ApiNotActivatedMapError - https://developers.google.com/maps/d...error-messages
__________________
NomisCZ is offline
zo6zo6
Member
Join Date: Feb 2018
Old 01-11-2020 , 13:42   Re: google maps not showing
Reply With Quote #7

Quote:
Originally Posted by NomisCZ View Post
Browser console error: ApiNotActivatedMapError - https://developers.google.com/maps/d...error-messages
thanks checking the console for errors solved it
zo6zo6 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode