[ Web Proxy ]
URL:
Viewing: https://developers.google.com/maps/documentation/javascript/troubleshooting [Back]  [Original]

Troubleshooting  |  Maps JavaScript API  |  Google for Developers Skip to main content
Send feedback

Troubleshooting Stay organized with collections Save and categorize content based on your preferences.

outlined_flag
Reminder: To use the Maps JavaScript API:

API Key and Billing Errors

Under certain circumstances, a darkened map, or 'negative' Street View image, watermarked with the text "for development purposes only", may be displayed. This behavior typically indicates issues with either an API key or billing. In order to use Google Maps Platform products, billing must be enabled on your account, and all requests must include a valid API key. The following flow will help troubleshoot this:

Are you using an API key?

I'm not sure. How can I check if I am using an API key?

An API key is passed as the key parameter in the URL that is used to load the Maps JavaScript API. Here are a few options to check if you are using an API key:

For web developers:

No, I am not using an API key.

To get an API key, click the button below. If you do not see a guided setup, follow the full instructions at Get Started with Google Maps Platform.
Get Started

Yes, I am using an API key.

Great! Lets move on and check if a billing account is attached to your project.

Is a billing account attached to your project?

I'm not sure. How can I check if billing account is attached to my project?

Go to the Billing page in the Google Cloud console and select the project under which your API key was created. To confirm the key is associated with the project:

  1. Go to the Credentials section, which can be accessed from the left side bar under Google Maps Platform > Credentials.
  2. Check that the API key you currently use on your website is listed. If that's not the case, switch to a different project, and check the credentials there.
  3. If you cannot locate the project for your API key, you may have lost access to this project. Ask others in your organization for help. If the original project cannot be located, you should:
    1. Create a new project. This can be done by selecting New Project from the projects list, or by selecting Create Project via the Resource Manager page.
    2. Create a new API key. This can be done on the Credentials page. Once there click Create credentials and then select API key.

Once you have located your project in the Cloud console, check if a billing account is attached by navigating to the Billing section in the left side menu.

No, a billing account is not attached to my project.

Go to the Enable Billing page in the Cloud console and add a billing account to your project. For additional information, see Get Started with Google Maps Platform.

Yes, a billing account is attached to my project.

Great! Lets make sure the provided billing method is valid.

Is the provided billing method no longer valid (for example an expired credit card)?

You can add, remove, or update a payment method in the Cloud console.

Is there an exceeded self-imposed daily limit on the API?

If you have set a daily limit on any of your APIs, which is common to prevent unexpected increases, you can resolve this by increasing your daily limit.

You can check your daily limits by going to the APIs & Services Dashboard in the Cloud console. Once there:

  1. Select a project if prompted.
  2. Select an API from the list, then click the Quotas tab.

Does your API key have an IP addresses restriction?

API keys with an IP addresses restriction can only be used with web services that are intended for use from the server side (such as the Geocoding API and other Web Service APIs). Most of these web services have equivalent services within the Maps JavaScript API (for example, see the Geocoding Service). To use the Maps JavaScript API client side services, you will need to create a separate API key which can be secured with an HTTP referrers restriction (see Get, add, and restrict an API key).

If your code isn't working:

To help you get your maps code up and running, Brendan Kenny and Mano Marks point out some common mistakes and how to fix them in this video.

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-19 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-19 UTC."],[],["Using the Maps JavaScript API requires a valid API key and enabled billing. Issues like a darkened map typically stem from these. Verify API key usage via browser checks, source code, or network traffic. Ensure the project linked to your API key has an active billing account. Check for invalid payment methods or exceeded API daily limits. If restricted by IP address, create a key with HTTP referrers. Troubleshoot by checking for typos, verifying map element properties, or using a JavaScript debugger.\n"]]

Web Proxy Viewer  |  New URL  |  Original Page