Google Maps shows "For development purposes only"

HtmlGoogle MapsGoogle Maps-Api-3

Html Problem Overview


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

enter image description here

How could I make this message go away?

My code is like that:

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script type="text/javascript">
  function initialize() {  
    var myLatlng = new google.maps.LatLng(50.5792659,8.6744471);
    var centerMap = new google.maps.LatLng(50.5792659,8.6744471);
    var div = document.getElementById('map');
  }
</script>

Then later I have

<p>
  <a
    href="https://www.google.com/maps/dir//50.5792659,8.6744471/@50.579266,8.674447,16z"
    target="_blank"
  >Route berechnen</a>
</p>

I don't see where this message originates from.

Html Solutions


Solution 1 - Html

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.

Solution 2 - Html

Watermarked with “for development purposes only” is returned when any of the following is true:

  1. The request is missing an API key.
  2. Billing has not been enabled on your account.
  3. The provided billing method is invalid (for example an expired credit card).
  4. A self-imposed daily limit has been exceeded.

Solution 3 - Html

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.

Solution 4 - Html

For my purposes I ended up using an alternative https://www.openstreetmap.org/ .

Solution 5 - Html

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!

enter image description here

Solution 6 - Html

Now google maps is free for development only.

> If you want to use map free like earlier, then create an account with > valid details (billing, payment, etc.) google gives $200 MONTHLY CREDIT > Which is EQUIVALENT To FREE USAGE > > For more details please see Googles new price details: google map new > pricing

Also see the old price details: Old one

Solution 7 - Html

try this code it doesn't show “For development purposes only”

<iframe src="http://maps.google.com/maps?q=25.3076008,51.4803216&z=16&output=embed" height="450" width="600"></iframe>

Solution 8 - Html

If your mapTypeId is SATELLITE or HYBRID

well, it is just a watermark, you can hide it if you change the <div> that has z-index=100 I use

setInterval(function(){
    $("*").each(function() {
        if ($(this).css("zIndex") == 100) {
            $(this).css("zIndex", "-100");
        }
    })}
, 10);

or you can use

map.addListener('idle', function(e) {
    //same function
}

but it is not as responsive as setInterval

Solution 9 - Html

For me, Error has been fixed when activated Billing in google console. (I got 1-year developer trial)

Solution 10 - Html

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.

Solution 11 - Html

I know this may not be related to the question, but i had the same issue on Vue. Even though i passed the API_KEY, i still had the same error. I tried @Mike Dubs suggestion, and it showed that i didn't pass API KEY(even though i did). I used vue2-google-maps library, and on documentation on how to setup google library with API KEY, they said that on main.js i should do an import like this:

> import * as VueGoogleMaps from 'vue2-google-maps';

But on my case that didn't work, but this did work:

> import * as VueGoogleMaps from > './../node_modules/vue2-google-maps/src/main';

Why, how, i don't know, but i think that vue somehow didn't understand the import.

Solution 12 - Html

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiontmightyView Question on Stackoverflow
Solution 1 - HtmlVictoria RuizView Answer on Stackoverflow
Solution 2 - HtmlRushikesh PanditView Answer on Stackoverflow
Solution 3 - HtmlPaweł DulakView Answer on Stackoverflow
Solution 4 - HtmlDaniel SokolowskiView Answer on Stackoverflow
Solution 5 - HtmlMike DubsView Answer on Stackoverflow
Solution 6 - HtmlSrikrushnaView Answer on Stackoverflow
Solution 7 - Htmlmahmud View Answer on Stackoverflow
Solution 8 - HtmlblesafhoView Answer on Stackoverflow
Solution 9 - HtmlDilanka FernandoView Answer on Stackoverflow
Solution 10 - HtmlKenneth KipchumbaView Answer on Stackoverflow
Solution 11 - HtmlrpajazitiView Answer on Stackoverflow
Solution 12 - HtmlvijeyView Answer on Stackoverflow