• Resolved marinafatbuzz

    (@marinafatbuzz)


    Hello,

    I have been using the plugin for a while now. But recently it started showing an API error and a warning. (see below)

    Google Maps JavaScript API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error

    Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

    I have two pages where I am using a map; the contact page and the store locator page. The former uses ACF Map field and the latter your plugin.

    I have enqueued the API script on my functions in order to have the ACF script too (see the code below).

    /* Google Map */
    function my_theme_add_scripts() {
     wp_enqueue_script( 'google-map', 'https://maps.googleapis.com/maps/api/js?key=XXX', array(), '3', true );
     wp_enqueue_script( 'google-map-init', get_template_directory_uri() . '/dist/scripts/google-maps.js', array('google-map', 'jquery'), '0.1', true );
    }
    
    add_action( 'wp_enqueue_scripts', 'my_theme_add_scripts' );
    
    function my_acf_google_map_api( $api ){
    
     $api['key'] = 'XXX';
    
     return $api;
    
    }
    
    add_filter('acf/fields/google_map/api', 'XXX');

    And it was working just fine up until the day before. Is it something to do with Google changing the API console or is it something with the plugin?

    NOTE: When I saw this error I updated to latest version but the same issue still occurs.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Map API Error’ is closed to new replies.