Troubleshooting

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:

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.

  • Look for typos. Remember that JavaScript is a case-sensitive language.
  • Check the basics - some of the most common problems occur with the initial map creation. Such as:
    • Confirm that you've specified the zoom and center properties in your map options.
    • Ensure that you have declared a div element in which the map will appear on the screen.
    • Ensure that the div element for the map has a height. By default, div elements are created with a height of 0, and are therefore invisible.
    Refer to our examples for a reference implementation.
  • Use a JavaScript debugger to help identify problems, like the one available in the Chrome Developer Tools. Start by looking in the JavaScript console for errors.
  • Post questions to Stack Overflow. Guidelines on how to post great questions are available on the Support page.