RussianFox / imap

Interactive map for Zabbix
https://zabbiximap.lisss.ru/
59 stars 43 forks source link

Google Maps does not working #38

Open Misairu opened 6 years ago

Misairu commented 6 years ago

https://github.com/RussianFox/imap/blob/fc5cc6e7c9f0535510462675aafeb1dd5d71da07/zabbix/imap.php#L648

Java script console shows "NoApiKeys" error. https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

Just need to add "key" parameter https://developers.google.com/maps/documentation/javascript/get-api-key

zanoniluiz commented 6 years ago

I'm also having this problem. Got any solutions?

Misairu commented 6 years ago

You need to modify string I marked. Must looks something like:

<script src="https://maps.google.com/maps/api/js?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&v=3&sensor=false&language=<?php echo CWebUser::$data['lang']; ?>"></script>

Where XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is your Google Map API key To get your own api key - follow the link https://developers.google.com/maps/documentation/javascript/get-api-key

zanoniluiz commented 6 years ago

good afternoon.

I made the change as you said, but now the following message is appearing:

Google Maps API error: RefererDeniedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-denied-map-error

After several email notifications, your app has been blocked because it is in disagreement with the Google Maps APIs Terms of Service. To request unlock and have your app evaluated evaluated, please complete this form. You will receive an email response within a few business days.

Did you have this same problem?

Misairu commented 6 years ago

Nope, I has not this problem. You can follow your own link and contact with Google support or find a valid api key from another project in Internet