New Landing How can we help? Themeforest Theme Support Uplift Google Maps API warning: NoApiKeys

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Uplift
  • #276792
    Creadicted
    Member
    Post count: 1

    Hello,
    as the title says. I can not integrate Maps in the theme.
    The JS error:

    
    js:32 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.ab @ js:32(anonymous function) @ common.js:51(anonymous function) @ common.js:189c @ common.js:45(anonymous function) @ AuthenticationService.Authenticate?1shttp%3A%2F%…:1
    util.js:211 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

    Is there a way to add the API Key?
    Best

    #276878
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    1- Please get a KEY here Please get a api key here https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true.

    2- Open to edit functions.php file of theme :-

    Find this code:-
    wp_enqueue_script('google-maps', '//maps.google.com/maps/api/js', 'jquery', NULL, TRUE);

    Change to:-
    wp_enqueue_script('google-maps', '//maps.google.com/maps/api/js?key=PUT_YOUR_KEY', 'jquery', NULL, TRUE); //Dont forget to put key

    Thanks
    Mohammad

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register