Tagged: google maps
-
AuthorPosts
-
July 6, 2016 at 8:25 pm #657709
I just transferred my site from .net to .com and am getting the following error on my Google Maps now:
Oops! Something went wrong.This page didn’t load Google Maps correctly. See the JavaScript console for technical details.
They load briefly and then disappear, followed by the message relayed above.
I tried rebuilding the page to no avail. Is there an easy/quick fix for this?
July 6, 2016 at 8:55 pm #657715I’ve read through a few threads about getting an API key, but I’m lost with how to do that – https://developers.google.com/maps/documentation/javascript/get-api-key#premium-auth – I went to that page and from there, I’m not sure where to go or what to do.
Easier fix?
July 6, 2016 at 10:30 pm #657748Hey!
You have to create a new app and get the API key from that application and use it.
Let me know if you do have more questions, we would love to assistBest regards,
BasilisJuly 6, 2016 at 11:11 pm #657766Hi,
This part is getting me hung up
“You have to create a new app and get the API key from that application and use it.”
After getting to https://console.developers.google.com, I have no clue what to do or how to get the correct key.
July 6, 2016 at 11:35 pm #657775I think I have the correct API key – it is one for a browser.
Here is what I added to my the functions.php file of my child theme (in bold):
<?php
//
// Recommended way to include parent theme styles.
// (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
//
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}
//
// Your code goes below
//function gmaps_workaround(){
?>
<!–Google Maps JavaScript API –>
<script src=”https://maps.googleapis.com/maps/api/js?key=MY_API_CODE_HERE”
type=”text/javascript”></script>
<?php
}
add_action(‘wp_footer’, ‘gmaps_workaround’);- This reply was modified 8 years, 5 months ago by shawnbanack.
July 7, 2016 at 3:55 am #657822Any word on this?
- This reply was modified 8 years, 5 months ago by shawnbanack.
July 7, 2016 at 9:00 pm #658215After spending more time on this than reasonable, the only “fix” that actually worked was the one provided by @Mensmaximus.
“@vinay yes it is a change in the google api however it is a theme issue because the theme is using a deprecated api call.
For those in need of a quick fix please go to https://console.developers.google.com create an account, an app and then a browser api key. If you don’t know what I am talking about visit https://developers.google.com/maps/documentation/javascript/get-api-key for help.
After you have created your key login to your ftp account and browse to /wp-content/themes/enfold/js/. Copy the file shortcode.js to your local computer. Open it in a text editor and locate line 458
src: ‘https://maps.googleapis.com/maps/api/js?v=3.24&callback=aviaOnGoogleMapsLoaded’
Now append your key to that line:
Save the file and copy it back to your server. You might make a copy of the old file and keep it if you need it again.
The same change must be made to the file /wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/js/avia-element-behavior.js on line 55.
Remember this file will be overwritten with the next update.
Important: You need to clear you browser cache and any cache from caching plugins to see the changes.”
Going forward, I understand this will need to be updated repeatedly as updates come out – would it not be possible to supply a Google API Key field in the editor, which will automatically insert the codes where required?
July 7, 2016 at 9:05 pm #658216Hey!
Yes, that is what we will do
Kriesi is working on the update and will allow users do that.Thanks a lot for your patience and understanding
Cheers!
BasilisAugust 9, 2016 at 4:03 pm #670370My maps are no longer working either. please advise. thanks . Jen
August 9, 2016 at 4:17 pm #670373Hi!
Please make sure that you are using the latest version of Enfold which is currently 3.7.1 – http://kriesi.at/documentation/enfold/updating-your-theme-files/ and check out this post – http://kriesi.at/documentation/enfold/how-to-register-a-google-maps-api-key/
Best regards,
YigitAugust 9, 2016 at 4:47 pm #670398excellent. fixed. thanks.
August 9, 2016 at 4:48 pm #670400Hey!
Great!
We will keep the thread open will wait to hear from the OP. If you have any other questions or issues, please feel free to start a new thread.Regards,
YigitAugust 11, 2016 at 7:51 pm #671538This is still not working – latest version of WP and Enfold ????
August 15, 2016 at 4:29 am #672440It worked!
Everything is here: http://kriesi.at/documentation/enfold/how-to-register-a-google-maps-api-key/Thanks!
August 15, 2016 at 4:42 am #672445Hi,
@andyqueanda: Thanks for sharing.
For anyone else with the issue, just follow the instructions provided in the link above.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Google Maps Error – Oops! Something went wrong. This page didn't load Google Map’ is closed to new replies.