Tagged: Google Maps API
Hi,
we have a new download enfold version 3.8 fom today.
we have included the Google Api key under Google Services
But it is not possible to include a google map in a site.
We get always “Google Maps API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version”
Do you have any idee to fix this?
Regards
Biggy
Hey Biggy,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
Rikard
I’m inserting this code function.php
add_filter( ‘script_loader_src’, ‘fix_google_maps_api’, 10 , 99, 2 );
function fix_google_maps_api ( $url, $handle )
{
$key = ‘AIzaSyBrMN352bUaa1fGgaI87A7UCvNscKdjXXX’;
if ( strpos( $url, “maps.google.com/maps/api/js” ) !== false || strpos( $url, “maps.googleapis.com/maps/api/js” ) !== false )
{
if ( strpos( $url, “key=” ) === false )
{
$url = “http://maps.google.com/maps/api/js?v=3.27”;
$url = esc_url( add_query_arg( ‘key’,$key,$url) );
}
}
return $url;
}
Same Enfold release and same warning here, however maps are displayed correctly.
edit: Solved by creating a new API.
Regards,
Christian
Hi!
Please start a new thread under Enfold sub forum and attach temporary admin logins in private content field. If you post them here, they will be visible to creator of this thread as well
Regards,
Yigit
Das Thema kann geschlossen werden bitte
Grüße
Biggy