Google Maps Javascript Error

We are seeing reports of the below error in Google javascript console.

Loading the Google Maps JavaScript API without a callback is not supported: https://developers.google.com/maps/documentation/javascript/url-params#required_parameters

Can you please advise?

Hello @sitesadmin_localiq,

To better assist you with your issue, please provide us the URL of the page with your Map on it so we can investigate it. Meanwhile, please make sure to update to the latest version of the theme. We have the following:

  • Pro 6.1.10 or
  • X theme 10.1.10
  • Cornerstone 7.1.10

Best Regards.

Hi @ruenel,

The problem still exists in Pro 6.2.1.

For reference, the error is caused by not passing the callback parameter in the URL for the ‘x-google-map’ script (see x_element_render_map in cornerstone/includes/elements/definitions/map.php).

Adding a callback to the query args will prevent the error message; if there’s not a callback actually used, adding a noop function will do the trick, like so:

$map_google_api_script = ‘https://maps.googleapis.com/maps/api/js?v=3&callback=Function.prototype’;

We’ll add a null callback like stated so it’ll hide the error/warning. It doesn’t look like it actually effects anything luckily so I think you can ignore unless you have an issue with your maps. Should be in a release or two. Thanks for bringing this to our attention.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.