Google Maps not loading; console API error
This topic contains 12 replies, has 3 voices, and was last updated by Stiofan O’Connor 9 years, 7 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: API-keys, google maps
-
AuthorPosts
-
March 24, 2016 at 6:16 pm #145621
Hi,
Just getting started with Geodirectory.
When adding places, the Google Map section of the page is blank, and with a street address entered along with the country and province, clicking the Set Address on Map button returns
Sorry, no record were found. Please adjust your search criteria and try again.This despite the same info placed directly into maps.google.com returns an accurate result.
The console in Google Chrome shows the following:
Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys util.js:219March 24, 2016 at 7:38 pm #145636Hi,
the warning isn’t the problem.
Please provide a link and admin credentials in a private reply and we will have a look at your settings.
Thanks
March 24, 2016 at 7:48 pm #145638This reply has been marked as private.March 24, 2016 at 8:07 pm #145642It seems to be the security plugin removing all version and query string from css and js files.
In this case it remvoes the setting to get the places from google api.Is there a setting to disable it from doing so? If not, you’ll need to disable the entire plugin and look for something more flexible.
Let us know,
Thanks
March 28, 2016 at 6:53 pm #152828I tried disabling any related settings, but nothing changed.
I then chose the nuclear option — this is just a staging site, after all — and deactivated all non-WPGeodirectory plug-ins.
Still no Google Maps.
The WordPress > Plug-ins > Geodirectory > MultiLocations > Add/Edit Location tab shows a Google Map centred on the default region for the locations I’ve entered. So my browser is clearly capable of displaying Google Maps.
Now what?
March 29, 2016 at 6:33 pm #153641Tap, tap, tap. Anybody home?
March 29, 2016 at 6:39 pm #153642Hi,
I’m sorry for the late repy, we had troubles with the server yesterday and missed many notifications. We are working hard now to recover.
I see your map loading fine now (see image attached). I guess you just need to clear your browser cache.
Let us know,
Thanks
March 29, 2016 at 6:55 pm #153674Thanks for the follow-up.
That’s nice that you see that, but I still don’t, on the admin site the map area is blank, and on the public side, I see a loading spinner centred on central Latvia on a dimmed map of Europe.
How do you propose I clear my browser cache? Option-clicking the page-reload button in Safari should do it (but doesn’t), and Firefox’s history shows literally nothing to clear — the button is greyed-out, even (I don’t normally use Firefox, so this isn’t surprising).
I just loaded the public page (that you screenshot, above) on 2 iOS devices that have never been here. They show Latvia, too.
Oh, and the dummy data that come with the plug-in all load up Latvia, too.
March 29, 2016 at 7:27 pm #153683Ok on the single page I see that too and there is an error:
TypeError: google.maps.places is undefined
autocomplete = new google.maps.places.Autocomplete(
I’ve asked to the developers to further follow up.
Thanks for your patience,
March 29, 2016 at 7:29 pm #153685Thanks; look forward to hearing back! 🙂
March 29, 2016 at 7:43 pm #153722If this helps, here’s a screenshot of the backend: no map loading, and an error about “no records found”. The fact that you saw a map with correct info is likely because I manually entered Lat/Long coordinate from a separate maps.google.com window.
March 29, 2016 at 9:30 pm #153755We have the answer! There was a function in my theme’s default functions.php whose comment was:
// to remove query strings from static resources, which Pingdom dislikes
Commenting it out sorted everything with the Google maps.
Sorry for the trouble.
March 30, 2016 at 11:44 am #154307Great! 🙂
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket