Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #1005260

    Hello, I am working on an issue involving the new Google Maps API (yes I know, you guys must hate it by now…)
    One of our client sites (link in private data) has a map that is returning a Javascript error.

    “Oops! Something went wrong.
    This page didn’t load Google Maps correctly. See the JavaScript console for technical details.”

    According to the Console, this would be caused by an invalid key. I have however created several new keys following instructions, enabled billing on the account and ensured the credit card works (it works for other sites in our organization).

    I contacted Google about this and they have pointed out that the key in the source code for the page shows that there are spaces (“%20” when URl encoded) in our “key” parameter. (see private data)

    When I check the Google services page on the API settings, there is NO space before or after the key. I have tried disabling server side static caching, deleting the key, saving settings then re-pasting making sure there is no space, etc. but the space persists.

    Any ideas?



    Hey Commun-IT,

    To be honest I doubt this code is from our theme. Please deactivte your wordpress plugins (and your custom code) to see if Enfold outputs the invalid code. Enfold normally adds following code to the website to load the maps (I can also see this code on your webswite in the footer area):

    <script id='avia_gmaps_framework_globals' type='text/javascript'>
     /* <![CDATA[ */  
    var avia_framework_globals = avia_framework_globals || {};
    	avia_framework_globals.gmap_api = '[YOURAPIKEY (with no spaces)]';
    	avia_framework_globals.gmap_maps_loaded = '[YOURAPIKEY (with no spaces)]&callback=aviaOnGoogleMapsLoaded';
    	avia_framework_globals.gmap_builder_maps_loaded = '[YOURAPIKEY (with no spaces)]&callback=av_builder_maps_loaded';
    	avia_framework_globals.gmap_backend_maps_loaded = '';
    	avia_framework_globals.gmap_source = '[YOURAPIKEY (with no spaces)]';
    	avia_framework_globals.gmap_avia_api = '';
    /* ]]> */ 

    Best regards,


    Thank you Dude!
    I didn’t think about that possibility – I thought it was a bit of theme code.
    It turned out it was an API key transferred improperly (and automatically) by our Geodirectory plugin was the culprit.
    Thank you. Case solved!



    Awesome! Glad it is solved. Please feel free to open a new thread if you need anything else.

    Best regards,

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.