Tagged: google api key, google map
-
AuthorPosts
-
September 26, 2017 at 5:31 pm #857042
I have been having problems getting embedded Google Maps to display and the API keys I create to work, even though it looks like I am doing everything correctly. See my previous post (https://kriesi.at/support/topic/google-map-not-displaying-after-making-recomended-fix/).
I still am having problems on one of our websites (the contact page where the map should display is linked in the private info).
One of our developers had a look and saw this error in the Chrome developer tools console:
https://developers.google.com/maps/documentation/javascript/error-messages#retired-version
Does this mean anything to you or help at all?September 26, 2017 at 6:11 pm #857067Hey NicomIT,
Please try disabling all active plugins and see if the issue resolves.
Best regards,
Jordan ShannonSeptember 26, 2017 at 7:26 pm #857102Hi Jordan,
I gave that a try, but no luck. When I added the map and tried to fetch the corridnates, I got this message:An error occurred
Google changed the way google maps work. You now need to enter a valid Google Maps API Key
You can read a description on how to create and enter that key here: Enfold Google SettingsSeptember 26, 2017 at 10:38 pm #857170Hi,
Please provide a link to the page/site in question.
Best regards,
Jordan ShannonSeptember 27, 2017 at 2:02 pm #857493In the private info is a copy of the page where I am trying to embed the map. The grey area is where the map should be displaying. I still get the error message from my previous post every time I try to enter our address and fetch the coordinates.
September 27, 2017 at 3:11 pm #857523Hi,
Apologies for the amount of time this is taking to solve, but it is uncommon. We have seen users recently with that error message, however, the map still displays. Can you check if the following block is in your functions.php file and if so please remove it:
function ava_googlemaps_apikey() { $prefix = is_ssl() ? "https" : "http"; wp_deregister_script('avia-google-maps-api'); wp_register_script( 'avia-google-maps-api', $prefix.'://maps.google.com/maps/api/js?key=AIzaSyAidX34J-pkIHmOUFdVrt05MpzDHz-VZUk', array('jquery'), '3', true); wp_enqueue_script('avia-google-maps-api'); } add_action('init', 'ava_googlemaps_apikey');
Best regards,
Jordan ShannonSeptember 27, 2017 at 3:43 pm #857540I checked and that code isn’t in the ‘functions.php’ file in both the child and parent themes. I did use that fix in another website a while ago when Google changed things requiring an API to be used. It was provided here. I removed it from that website and after getting an API created/adding it in the theme options, eventually we were able to get the map to work. But that hasn’t been the case with this website for some reason.
September 27, 2017 at 4:19 pm #857584Hi,
Please allow me to get my teammates thoughts on this issue.
Best regards,
Jordan ShannonSeptember 27, 2017 at 4:57 pm #857617Hi!
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look? Did you provide the coordinates for the map? I am seeing this
https://cl.ly/1O3K122F0o0EIf you need further assistance please let us know.
Best regards,
VictoriaSeptember 27, 2017 at 5:02 pm #857621Sure, here you go.
September 27, 2017 at 7:16 pm #857680Hi NicomIT,
Looks like your key is not activated? Are you using this key for just this project or for multiple projects?
Best regards,
VictoriaSeptember 27, 2017 at 7:18 pm #857682Hi!
It appears the API key you have entered is not valid. Please check Enfold > Google Services for more info.
Please follow the step by step instructions in the below link to create a new API key
Regards,
VinaySeptember 27, 2017 at 8:43 pm #857701I created the key only for this website and the map on the contact page, so it’s not being used anywhere else. Under “Key Restriction” where the API is managed via Google APIs & services, I have “HTTP referrers (web sites)” selected and both nicomit.com/* and http://www.nicomit.com/* added under “Accept requests from these HTTP referrers (web sites)”. And the key was activated under “Google Maps JavaScript API” in the library section of Google APIs & services.
This is pretty much exactly what I did when creating two other keys we are using in another two different websites that the embedded map is working on.September 29, 2017 at 9:34 am #858364Hi,
What is the login url? I tried “wp-login” and “wp-admin” but it’s not working. Did you remove the map in the contact page?
Best regards,
IsmaelSeptember 29, 2017 at 1:42 pm #858469Hi Ismael,
Those should work. Maybe try ‘wp-login.php’ if you haven’t already.I removed the map on the live page. But it’s still on the copy of the page I made (linked below). But the page isn’t displaying anything where the map should be. Just a big grey area. Likely because I can’t get the coordinates when I enter the street address, city and country. That’s when I get the error I mentioned earlier:
An error occurred
Google changed the way google maps work. You now need to enter a valid Google Maps API Key
You can read a description on how to create and enter that key here: Enfold Google SettingsSeptember 30, 2017 at 7:19 am #858675Hi,
The “wp-login” is still not working. It redirects to the home page. This is the error in the console.
avia.js?ver=4.1:123 [AVIA-MAP-ERROR] Latitude or Longitude missing
util.js:216 Google Maps API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version
uB.j @ util.js:216Did you fetch the coordinates?
Best regards,
IsmaelOctober 2, 2017 at 5:30 pm #859302I’m not sure why the login link isn’t working. If you can send me your IP address, I can add it to the lock out white list in the security tool I am using to see if that helps.
I’m not able to fetch the coordinates. When I try, I get the error I mentioned in my last post. I don’t know what to do to address the error from Google. if you can suggest something, I can try to address that.
October 3, 2017 at 8:05 am #859490Hey!
Could you please disable the plugin temporarily so that we can check the dashboard? The map should still be working even if it’s using the “retired” version. The problem is that you can’t fetch the coordinates so we need to inspect the map element.
Cheers!
IsmaelOctober 3, 2017 at 1:35 pm #859622Hi Ismael,
I deactivated the security plugin. Hopefully that works and you can login.
RyanOctober 4, 2017 at 8:25 am #859977Hi,
Are you sure that API project was activated correctly? This is the error in the dashboard.
14:16:57.036 js?v=3.27&callback=av_backend_maps_loaded&key=AIzaSyAFQ9Lum_M4yb2Pn0hFHsjqz7Gm_iYJrKA:38 Geocoding Service: This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/geocoding_backend?project=_ For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key
_.rb @ js?v=3.27&callback=av_backend_maps_loaded&key=AIzaSyAFQ9Lum_M4yb2Pn0hFHsjqz7Gm_iYJrKA:38
14:17:01.678Please generate an API key again or create a project from scratch. Just click the “Get a key” button in the following link.
// https://developers.google.com/maps/documentation/javascript/get-api-key
If it’s still not working, please post the gmail account and the security question so that we can test it.
Best regards,
IsmaelOctober 4, 2017 at 3:07 pm #860158As far as I know, the API was created correctly. However I created a new one via the link you just provided (
) and was able to get the map to work. I have no idea what was different about how this key was created, but it worked, so everything is fine now. Thanks for the help.
October 4, 2017 at 3:17 pm #860167Also, I just looked at both keys I created. The new one that worked is unrestricted and the other key is not. That looks to be the only difference between them. However, my understanding is the key should be restricted (Google actually recommends that).
The keys I created for other websites using the embedded map have ‘HTTP referrers (web sites)’ enabled under key restrictions and their domain added under ‘Accept requests from these HTTP referrers (web sites)’. That is what I did for the first key here that didn’t work. I’m kind of confused about what the correct way to create the API keys should be.
October 5, 2017 at 6:21 am #860438 -
AuthorPosts
- You must be logged in to reply to this topic.