How to Fix the Google Maps JavaScript API Error apinotactivatedmaperror

When you are working with the Google Maps JavaScript API, you might encounter an error message like “ApiNotActivatedMapError”. This error appears because the API you’re trying to use hasn’t been activated in your Google Cloud project. Without the activation, the features provided by that API won’t work, and hence you’ll see this error.

If you’re searching for what this error then you are at the right place, this blog post is here to help. Let’s break it down step by step.

What Causes the "ApiNotActivatedMapError"?

The Google Maps Platform provides multiple APIs, such as the Maps JavaScript API, Places API, and Directions API. Each API has to be activated individually in your Google Cloud project.

If you attempt to use the Google Maps JavaScript API without activating it, you’ll get the “google maps javascript api error apinotactivatedmaperror”. This simply means Google hasn’t been told to allow your project to use this service yet.

Step-by-Step Guide to Fix the Error

Here’s how you can fix the “google maps javascript api error apinotactivatedmaperror”:

    1. Log in to the Google Cloud Console:
      • Visit the Google Cloud Console.
      • Sign in with your Google account.
    2. Select Your Project:
      • In the top menu, select the project linked to your application.
      • If you don’t have a project yet, create a new one.
    3. Go to the API Library:
      • On the left-hand menu, click “APIs & Services”, then select “Library”.
Google Maps JavaScript API Error apinotactivatedmaper (API Library)
    1. Enable the API:
      • In the library, search for the “Maps JavaScript API”.
      • Click on it and press “Enable”.
Google Maps JavaScript API Error apinotactivatedmaper
    1. Check for Additional APIs:
      • Some features may require enabling other APIs. For example:
        • Using Places data? Enable the “Places API”.
        • Need Directions? Enable the “Directions API”.
    2. Ensure Billing Is Active:
      • Even though you get free usage for the Google Maps Platform, your project must have billing enabled.
      • Link a billing account to your project under “Billing” in the console.
    3. Check API Key Restrictions:
      • Navigate to “Credentials” under “APIs & Services”.
      • Make sure your API key isn’t restricted in a way that blocks the Maps JavaScript API.

Why This Error Appears

The “google maps javascript api error apinotactivatedmaperror” is a common issue developers face, especially when setting up Google Maps for the first time. It’s Google’s way of ensuring security and control over which applications can use its services.

Key Things to Remember

    • Always activate the API you need from the Google Cloud Console.
    • Billing information must be set up for your project, even if you stay within the free tier.
    • Check for additional APIs required by the feature that you are trying to implement.

Additional Resources

Other Articles

Frequently Asked Questions

1. How do I fix a Google Maps API error?

Navigate to the Credentials area, found in the left sidebar under Google Maps Platform → Credentials.

Verify that the API key you are using on your site is included in the list.

→ View failed API requests

Errors are organized by service name by default; however, you can modify the sorting order by clicking on a column header. To examine the failed requests, refer to the “Errors / Impacted API calls monitoring

Example: Click on Show more to access additional details regarding your error messages.

  • OptimizeTours: This is a synchronous API that necessitates the client to pause and await the server’s reply before moving on to additional tasks.
  • BatchOptimizeTours: This is an asynchronous API that enables the client to continue with other activities while waiting for the server to complete and respond.
Scroll to Top