I have requested a link for embedding google maps on my website on
https://developers.google.com/maps/documentation/embed/start
and have authorized everyone with the link to use it
Referers: Any referer allowed
https://code.google.com/apis/console/
but I still receive a
The Google Maps API server rejected your request. This API project is not authorized
to use this API. Please ensure that this API is activated in the APIs Console:
Learn more: https://code.google.com/apis/console
Is there some other way to test my website locally with embedded google maps?
EDIT:
They say:
Easy embedding
Google Maps Embed API maps are easy to add to your webpage—just set the URL
you build as the value of an iframe's src attribute. Control the size of the
map with the iframe's height and width attributes. No JavaScript required.
but I still can't access the link.
The problem was that they have their "quick start" out of date.
https://developers.google.com/maps/documentation/embed/start
It says you should only provide them with your API key but the thing is that there is a new version of the same website which they don't have links to from their guide but which you get a link to elsewhere( I got offered when in "billing" )
The new service is called Cloud Console and I found the API on/off buttons there.
https://console.developers.google.com/project/...
You have to enable the "Static Maps API", "Google Maps API" and "Google Maps Embed API" and make sure to have your link in an iframe div
As Dominik said, go here:
https://console.developers.google.com/project/%your-project-name%/apiui/apis/library?q=google%20maps
Enable both APIs:
Google Maps Embed API
Static Maps API
Then go here:
https://console.developers.google.com/project/%your-project-name%/apiui/credential
Create New Key
Browser Key
And you're done.
I also had to enable the Google Maps JavaScript API.
Related
I used a new key and got:
"This page can't load google maps correctly"
What does it really mean?
<script src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY&libraries=places" async defer"></script>
This is a key from a commercial account.
For anyone who runs into this "This page can't load google maps correctly" error and has added the Places library in the JavaScript API script, i.e.:
<script src="https://maps.googleapis.com/maps/api/js?key=KEY&libraries=places"></script>
You must enable the Places API. It's not enough to enable the JavaScript API only. Refer to Google's documentation:
Before using the Places library in the Maps JavaScript API, first
ensure that the Places API is enabled in the Google Cloud Platform
Console, in the same project you set up for the Maps JavaScript API.
Hope this helps.
I have used Google maps,places,directions javascript API in my web application. Application loads different places based on user input by making ajax call to the google api. Fortunately Google is able to crawl the ajax lately.
When I was checking the URLs in the Googles webmaster tool 'Fetch as Google' feature, the response is like below
Here is the google maps api robots.txt file
Is google maps api blocking Google bot? in that case please suggest me what would be approach should I follow to to get the page content?
We took contact with Google Maps Support and they confermed it was a bug at their side! However, no statements were made about when we could expect a fix.
I have the following Google Developer Console APIs with ON status:
Google Maps Embed API
Google Maps Javascript API v3
Static Maps API
BigQuery AP
Google Cloud SQL
Google Cloud Storage
Google Cloud Storage JSON API
I have the following link in an HTML email:
<img src='http://maps.google.com/staticmap?center=-15,-47&zoom=11&size=600x200&key=myKey'/>
But I never get an image. The key works OK for an embedded map using an iframe.
What am I doing wrong?
If you are using Google static Map API, you should use this URL:
http://maps.googleapis.com/maps/api/staticmap?center=-15,-47&zoom=11&size=600x200&key=myKey
Of course, replace 'myKey' to your valid key.
It won't work because you're trying to put it in an email, browsers work differently to email clients. Email clients block iframes for security purposes, see:
Is there no way to embed a Google Map into an HTML email?
You can check if your api key is working using the Google Maps API console https://code.google.com/apis/console/?pli=1
Update
also you might want to update the bit of the string 'myKey' with your api key :)
Good day.
Now i create api Key for browser apps (with referers).
Referers: *.invait.ru/*
But on site i get error:
Google does not permit the use of the Maps API for this application.
API Google key provided is invalid or do not have permission to use it
with Google Maps JavaScript API v3 on this site.
Screenshot:
Tell me please why i get it error and how remove error and use google map api v3?
For domain use Referers: invait.ru/*
I m working on an application which renders google maps on an image as below
<img alt="Google Maps (Scotland)" src="http://maps.google.com/staticmap?size=480x200&maptype=mobile\&markers=55.9368450758,-3.03604939504,reda|55.9454374538,-3.18124534297,redb&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
The map is not getting rendered and when I right click on the source of image and click the url, I get the following message
"The Google Maps API server rejected your request. This site or IP is not authorized to use this API key."
I have checked the API Access on https://code.google.com/apis/console the API key seems to be all correct. Just wondering how to fix the site and IP bit?
See below the settings in google API console
Make sure you have enabled "Static Maps API" service in addition to "Google Maps API".
Make sure you have enabled the Google Maps related Services ("Google Maps Embed API" and "Static Maps API") like bellow:
And then mark them:
In the new layout you find it here:
It works for me when I enable "Google Maps Embed API" and "Static Maps API"
Make sure you have a Browser key in the Simple API Access section, and make sure the Referers is set to Any referer allowed
Activate Google Map Key here: https://console.developers.google.com/apis/api/maps_embed_backend/overview?project=[your-project]
It will enable your map instantly.
I had the same issue. I used this instead of this and that resolved the issue. Some other api parameters didn't work on the second URL either (specifically marker styles), guessing the old API is deprecated
Would also recommend using https as opposed to http. This way your users wont get cert warnings if they view the page over SSL
Not only you need to enable google static API, but also you need to include your api_key in the link.
From june 2018 you have to configure a billing account to continue using Maps static API; google "donate" 200$/day of credit
Maps Static API Usage and Billing
add key in the url is not enough
As commented by Pointy, you need to use an API key with all referrers allowed in order to use Static Maps.
You can achieve that just by removing all the referrers from the list of authorized referrers. Or just create a new API key and use it without further configuration.
More info at the Documentation