ApiNotActivatedMapError for simple html page using google-places-api

226,369

Solution 1

To enable Api do this

  1. Go to API Manager
  2. Click on Overview
  3. Search for Google Maps JavaScript API(Under Google Maps APIs). Click on that
  4. You will find Enable button there. Click to enable API.

OR You can try this url: Maps JavaScript API

Hope this will solve the problem of enabling API.

Solution 2

Assuming you already have a application created under google developer console, Follow the below steps

  1. Go to the following link https://console.cloud.google.com/apis/dashboard? you will be getting the below page enter image description here
  2. Click on ENABLE APIS AND SERVICES you will be directed to following page enter image description here
  3. Select the desired option - in this case "Maps JavaScript API"
  4. Click ENABLE button as below, enter image description here

Note: Please use a server to load the html file

Solution 3

as of Jan 2017, unfortunately @Adi's answer, while it seems like it should work, does not. (Google's API key process is buggy)

you'll need to click "get a key" from this link: https://developers.google.com/maps/documentation/javascript/get-api-key

also I strongly recommend you don't ever choose "secure key" until you are ready to switch to production. I did http referrer restrictions on a key and afterwards was unable to get it working with localhost, even after disabling security for the key. I had to create a new key for it to work again.

Solution 4

Have you tried following the advice on the linked help page? The help page at http://g.co/mapsJSApiErrors says:

ApiNotActivatedMapError

The Google Maps JavaScript API is not activated on your API project. You may need to enable the Google Maps JavaScript API under APIs in the Google Developers Console.

See Obtaining an API key.

So check that the key you are using has Google Maps JavaScript API enabled.

Solution 5

I had the same error. To fix the error:

  1. Open the console menu Gallery Menu and select API Manager.
  2. On the left, click Credentials and then click New Credentials.
  3. Click Create Credentials.
  4. Click API KEY.
  5. Click Navigator Key (there are more options; It depends on when consumed).

You must use this new API Navigator Key, generated by the system.

Share:
226,369

Related videos on Youtube

Roy
Author by

Roy

Updated on July 08, 2022

Comments

  • Roy
    Roy almost 2 years

    I'm trying to create a simple html page (I'd later like to add an autocomplete input there) that include google-places-api. I have an api-key (which is enabled) but I still get an error message.

    Here is my html-

    <head>
        <meta charset="utf-8">
        <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=MY_KEY&libraries=places"></script>
        <title>test</title>
    </head>
    <body>
    </body>
    

    but I get this error message- enter image description here

    and in the console I get - Google Maps API error: Google Maps API error: ApiNotActivatedMapError

    I can't understand what the problem is.. Appreciate anybody's help

    • Илья Зеленько
      Илья Зеленько over 5 years
      2018: Click enable here.
    • Robert Dundon
      Robert Dundon over 4 years
      @ИльяЗеленько TIL Google JavaScript Map API !== Google Maps Embed API
    • Naveen Saroye
      Naveen Saroye about 4 years
      @Илья Зеленько thank you. it worked.
  • Peter David Carter
    Peter David Carter almost 8 years
    Is 'consumed' a typo? If so, what did you mean to write?
  • Adi
    Adi almost 8 years
    @TigerSpirt I am facing same problem. i have tried to generate new API Key but do not find "Navigator Key". Friends please help me.
  • bia.migueis
    bia.migueis about 7 years
    as mentioned by the op and as is my case i have both javascript api and distance matrix apis enabled already and still getting that error
  • bia.migueis
    bia.migueis about 7 years
    the get key from this 1 link finally created a working key for me. ty. all the other links i clicked to get key would get me the same non working one :S
  • João Pimentel Ferreira
    João Pimentel Ferreira over 6 years
    Where is the API Manager? I don't find those options? Could you send a URL?
  • Adi
    Adi over 6 years
  • Jo.
    Jo. over 6 years
    For this to work, I had to enable the APIs, and then create the key. Make sure you don't do it the other way around.
  • sathish kumar
    sathish kumar about 6 years
    For me it is saying you don't have permission to enable it. What I have to do now?
  • puddleglum
    puddleglum about 6 years
    @bia.migueis I affirm (Apr 2018). Tried getting a new key several times and all gave ApiNotActivatedMapError. This link worked (although I thought I'd been there before, so maybe one has to just keep trying, not sure)
  • Ahmed Jehanzaib
    Ahmed Jehanzaib almost 6 years
    For places API you should also enable Maps JavaScript API.
  • Chris
    Chris almost 6 years
    Just giving me thumbs up on this method. I screwed around in the API console for about an hour before trying this and it worked in a matter of seconds. Google needs to get their s**t together.
  • atul
    atul almost 5 years
    Those who can not find, type "Maps JavaScript API" in search box
  • trainoasis
    trainoasis over 4 years
    But I dont need Google Maps javascript API, just need Places API! Not using any maps, just autocomplete field. If Places API required another to be enabled, shouldnt that come with it automatically?
  • trainoasis
    trainoasis over 4 years
    But I dont need Google Maps Javascript API, just need Places API! Not using any maps, just autocomplete field. If Places API required another to be enabled, shouldnt that come with it automatically?
  • Deepak Keynes
    Deepak Keynes about 4 years
    2020: It says I dont have permission to "enable". Now what to do?
  • Deepak Keynes
    Deepak Keynes about 4 years
    It says "You dont have permission to to this". How to "enable" it?
  • Deepak Keynes
    Deepak Keynes about 4 years
    This API project is not authorized to use this API. Places API error: ApiNotActivatedMapError
  • Deepak Keynes
    Deepak Keynes about 4 years
    This API project is not authorized to use this API. Places API error: ApiNotActivatedMapError
  • Precious Tom
    Precious Tom about 4 years
    I'm facing the same permission issue, what next, I know I cannot trick Google by enabling through inspect element like I would most insecure sites. what else can I do?
  • Aravind
    Aravind about 4 years
    @PreciousTom I didn't get you
  • Michael Ashefor
    Michael Ashefor about 4 years
    @PreciousTom I was having same issue and that was because I was outside of the project. You have to select the project from the dropdown and then you'll be able to enable the key
  • Abhijit Mondal Abhi
    Abhijit Mondal Abhi over 3 years
    Works Fine. Cheers :)
  • Muhammad Mabrouk
    Muhammad Mabrouk over 3 years
    Thanks ❤ @Aravind
  • NoobCoder
    NoobCoder almost 3 years
    I am getting billing error You must enable Billing on the Google Cloud Project . How can I use it for free ?
  • Aravind
    Aravind almost 3 years
    @NoobCoder - I used this one for free
  • NoobCoder
    NoobCoder almost 3 years
    @Aravind Did you provide your card details ? If yes, then it is still free or some amount deducted ?
  • Aravind
    Aravind almost 3 years
    @NoobCoder no I didn't give my card information. may be it's a new release that they had it expects card details
  • Dhrumil Bhankhar
    Dhrumil Bhankhar about 2 years
    @JasonS This bug is still around as on 2022. I had to go to key & make some dummy changes & update it again to make it work with newly added API.