Google Maps v3 API key won't work for local testing

前端 未结 2 990
情书的邮戳
情书的邮戳 2020-12-06 11:09

I have an API key. It\'s a \"Key for browser apps (with referers). It works fine, but I\'m not authorized when I try to use it on my local development server. I use MAMP and

2条回答
  •  离开以前
    2020-12-06 11:42

    As suggested in the official documentation:

    Tip: During development and testing, you can register a project for testing purposes in the Google API Console and use a generic, unrestricted API key. When you are ready to move your app or website into production, register a separate project for production, create a browser-restricted API key, and add the key to your application.

    You should register a different project and use its unrestricted API for developmental testing.

提交回复
热议问题