Google Maps shows “For development purposes only”

前端 未结 11 1707
旧巷少年郎
旧巷少年郎 2020-11-30 17:29

Google Maps show the message \"For development purposes only\" when I try to show it in my webpage:

How could I make this message go away?

My code i

相关标签:
11条回答
  • 2020-11-30 18:09

    It seems to me that when it displays the "For development purposes only", one cannot see the map configurations as well while developing(or rather playing around with the configurations). In my case I have not enabled billing to be associated with the API I am using and I am thinking that's the reason why its behaving this way.

    0 讨论(0)
  • 2020-11-30 18:10

    As recommended in a comment, I used the "Google Maps Platform API Checker" Chrome add-in to identify and resolve the issue.

    Essentially, this add-in directed me to here where I was able to sign in to Google and create a free API key.

    Afterwards, I updated my JavaScript and it immediately resolved this issue.

    Old JavaScript: ...script src="https://maps.googleapis.com/maps/api/js?v=3" ...

    Updated Javascript:...script src="https://maps.googleapis.com/maps/api/js?key=*****GOOGLE API KEY******&v=3" ...

    The add-in then validated the JS API call. Hope this helps someone resolve the issue quickly!

    0 讨论(0)
  • 2020-11-30 18:18

    You can't use iframe tag in HTML, here's what you can do:
    * just go into google maps point out your location
    * click on "Share"
    * go to "Embed a map"
    * copy the HTML code
    * paste it in your HTML page
    * adjust height and width according to your requirement
    * run it

    This might work

    0 讨论(0)
  • 2020-11-30 18:24

    If you want a free simple location map showing a single marked location, for your website, Then

    • Go to AddMap.
    • Here you can fill details to fully customize your map like location details, sizing and formatting of map.
    • Finally to add google map api key, Generate it using this method.

    Let me know If this would help..

    0 讨论(0)
  • 2020-11-30 18:25

    As Victoria wrote, Google Maps is no longer free, but you can switch your map provider. You may be interested in OpenStreetMap, there is an easy way to use it on your site described here: https://handyman.dulare.com/switching-from-google-maps-to-openstreetmap/

    Unfortunately, on the OpenStreetMap, there is no easy way to provide directions from one point to another, there is also no street view.

    0 讨论(0)
  • 2020-11-30 18:27

    Google Maps is no longer free. You have to associate a credit card so that you can get billed if your site has requests that exceed the $200 credit they give you monthly for free. That is why you get the watermarked maps.

    For more information, see: https://cloud.google.com/maps-platform/pricing/

    Update: A common problem with the new billing system is that you now have to activate each API separately. They all have different pricing (some are even free), so Google makes a point of having you enable them individually for your domain. I was never a heavy user of Google Maps, but I get the feeling that there are many more APIs now than there used to be.

    So if you're still getting a restricted usage message after you've enabled billing, find out what API you need exactly for the features you want to offer, and check if it's enabled. The API settings are annoyingly hard to find.

    1. Go to this link: https://console.developers.google.com/apis/dashboard.
    2. Then you select your project in the dropdown.
    3. Go to library on the left pane.
    4. Browse the available APIs and enable the one you need.
    0 讨论(0)
提交回复
热议问题