Maps JS errors
-
I don’t want to use Google Maps. I don’t have an API key set. You shouldn’t be generating an error. You shouldn’t even be calling the API! >:[
Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
CC.j @ util.js:246
(anonymous) @ js?ver=4.9:145
(anonymous) @ js?ver=4.9:61
(anonymous) @ js?ver=4.9:59
(anonymous) @ js?ver=4.9:61
(anonymous) @ js?ver=4.9:121
(anonymous) @ js?ver=4.9:59
(anonymous) @ js?ver=4.9:121
Yd @ js?ver=4.9:61
Xd.oa @ js?ver=4.9:121
(anonymous) @ stats.js:1
js?ver=4.9:38 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
_.Ob @ js?ver=4.9:38
(anonymous) @ common.js:54
(anonymous) @ common.js:198
c @ common.js:48
(anonymous) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fjjml.dev%2Fcalendar%2F&callback=_xdc_._la1bpj&token=68558:1Hi there,
Sorry you are having issues with Google maps.
If you would like to remove it completely, you can add the following to your functions.php file in your theme.
function remove_events_map_apis() { wp_dequeue_script( 'tribe_events_google_maps_api' ); wp_dequeue_script( 'tribe_events_embedded_map' ); wp_dequeue_script( 'tribe-gmaps' ); wp_dequeue_script( 'tribe-events-pro-geoloc' ); } add_action( 'wp_print_scripts', 'remove_events_map_apis' );
Let me know if this works for you.
Thanks,
BrendanThat does not work. The scripts are still loaded, and the errors still appear.
Hi Greg,
Try adding a higher priority to the action. I have modified the above script to include a higher priority.
function remove_events_map_apis() { wp_dequeue_script( 'tribe_events_google_maps_api' ); wp_dequeue_script( 'tribe_events_embedded_map' ); wp_dequeue_script( 'tribe-gmaps' ); wp_dequeue_script( 'tribe-events-pro-geoloc' ); } add_action( 'wp_print_scripts', 'remove_events_map_apis', 100 );
Let me know if that works. Also, I am submitting a bug ticket for this since this error shouldn’t be happening in the first place.
Thanks,
BrendanHi Greg,
This function should work to dequeue the Google Maps API. There could be a conflict with another plugin or in your theme. While we wait for this to be resolved, you can try and test this function following our testing for conflicts guidelines.
Let me know how that goes.
Thanks,
BrendanHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team
The topic ‘Maps JS errors’ is closed to new replies.