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

Google Maps API Key option not found


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kalapahar
Junior Member
Join Date: Jul 2016
Old 08-23-2016 , 17:47   Google Maps API Key option not found
Reply With Quote #1

I am trying to install HLStat in my CSGO server, it works ok with player name and score, but Maps are not showing, so I googled, and found that I need a API key to show google maps. But the thing is there is no place to put API Keys that I already generated.
In a tutorial it shows there should be text field to insert API Key, but in my case it's not there.

Can someone point me out my error, Thanks in Advance.
Attached Images
File Type: jpg Capture.JPG (39.5 KB, 288 views)
Kalapahar is offline
Kalapahar
Junior Member
Join Date: Jul 2016
Old 08-25-2016 , 10:57   Re: Google Maps API Key option not found
Reply With Quote #2

Found the work around. Modified the google_maps.php file located inside web/includes. There is a line 45,
Code:
echo ('<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>');
Turn it into
Code:
echo ('<script src="http://maps.google.com/maps/api/js?key=YOUR-API-KEY-HERE&callback=initMap" type="text/javascript"></script>');
It shows the world map though, but still the player location and server location is missing. Trying to find that out. If anyone can provide me with info, you are most welcome.
Kalapahar is offline
NxtGenCowboy
New Member
Join Date: Sep 2016
Old 09-16-2016 , 17:45   Re: Google Maps API Key option not found
Reply With Quote #3

Has anyone been able to fix this?
NxtGenCowboy is offline
Kalapahar
Junior Member
Join Date: Jul 2016
Old 09-17-2016 , 08:03   Re: Google Maps API Key option not found
Reply With Quote #4

Quote:
Originally Posted by NxtGenCowboy View Post
Has anyone been able to fix this?
I have seen that for few players, the country flag comes out automatically, but about 95% of the don't have. Also it might be a possibility for intra-country server connection.

Regarding map location, no idea how to solve but I'm guessing that the map data is somehow not loading or working properly.
Kalapahar is offline
jesuscakes
Junior Member
Join Date: Jan 2013
Old 10-24-2016 , 06:55   Re: Google Maps API Key option not found
Reply With Quote #5

Came here to ask this same question. Will dig around in the logs and see if I can find anything.
jesuscakes is offline
jesuscakes
Junior Member
Join Date: Jan 2013
Old 10-24-2016 , 10:17   Re: Google Maps API Key option not found
Reply With Quote #6

NM, it works fine after making the change you recommended. It only shows people currently connected though.
jesuscakes is offline
Kalapahar
Junior Member
Join Date: Jul 2016
Old 10-27-2016 , 01:30   Re: Google Maps API Key option not found
Reply With Quote #7

Well, though it shows the map but location is not shown in the map. More advance help appreciated.
Kalapahar is offline
narugo
Member
Join Date: Mar 2013
Location: São Paulo - Brazil
Old 10-28-2016 , 18:41   Re: Google Maps API Key option not found
Reply With Quote #8

I was with same problem but when tried same code in another host this worked.

Code:
echo ('<script src="//maps.googleapis.com/maps/api/js?key=api key" type="text/javascript"></script>');
remember api key need 3-4 days to activate.

here is my site http://hlstatsx.tk/

http://hlstatsx.ga

working very good with insurgency 2014
__________________
narugo is offline
Send a message via Skype™ to narugo
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 20:29.


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