Google maps not loading
-
I’m placing maps in a hidden div and it’s being made visible onclick and it;s being loaded only partially as in this link http://imgur.com/aUBUPbz
This seems to be a common problem with the maps API and the recommended solution is to use google.maps.event.trigger(map, “resize”).
Has anyone encountered this issue before and how could I call the above call using Google Maps Builder?
-
I’m having the same issue as this, any solutions?
UPDATE: SEE BELOW.
Just found the solution: Make sure you have the following in the relevant template files:
header.php (between your <head></head> tags):
<?php wp_head(); ?>footer.php:
<?php wp_footer(); ?>Hey we are aware of the issue of having a google map in a hidden element which is then toggled. We’re working towards a fix.
@tjcafferkey – ALL WordPress themes should have these two critical functions. If your theme does NOT then it’s considered broken. Plugins rely on these two functions, and a number more, to work properly.
Yes, in this case I had just forgotten to put the footer function in the theme so it’s likely some others may have done the same as me.
I loaded the map div normally and on page load, I just hid the map. That removed the errors from the layout. And onclick, it’s showing the map as expected.
Also, make sure if you click to show the map before the page is loaded, it doesn’t hide the map. We used a global variable to check if a click event has occurred or not.
@tjcafferkey: That wasn’t the issue for us.
It does obviously cause a minimal bad UI experience to the user based on their internet speed. But until a fix is made available or we find a better method, We are going to use this method.
@devin Walker: Is there any scheduled release date for a fix?
We will be coming out with a development roadmap soon that will have bug fixes and feature requests on it. Until then, I don’t have any solid date to give you.
Cool. Thanks for the plugin though! It’s a really good one.
Thanks! We’re working to improve it more. If you like it please consider rating it! :]
https://wordpress.org/support/view/plugin-reviews/google-maps-builder
I am stucked with the problem that the maps does not show up on my web site.
I have checked the recommended solution, i.e.Make sure you have the following in the relevant template files:
header.php (between your <head></head> tags):
<?php wp_head(); ?>footer.php:
<?php wp_footer(); ?>But it does not help.
Any ideas out there?
Hi All,
I’m also getting this. wp_head() and wp_footer() are indeed in the theme (Ward Theme by Bavotasan). I think the issue is occuring as I’m trying to display the map inside a “Shortcodes Ultimate” Plugin Tab element, so yes it’s hidden upon initial page load. I’m currently checking if there is a solution based on triggering a map resize… eg:
Thanks
@surferdude I think your issue is somewhat different. I would be helpful to open a separate ticket with this and include a link to your site so we can see the problem live if possible.
Ah ok, no problem will do thanks π
thank you tjcafferkey it solved my problem.
The topic ‘Google maps not loading’ is closed to new replies.