Cannot Locate Google Maps Static Map API Key - google-maps

How do I obtain an API Key to embed static Google Maps images in my website?
So I want to embed Google Maps images on my site for locations I have the lat and long for. Building the URL is easy enough, but I'm having a world op trouble locating my API Key.
I've enabled the Static Maps API in the console, but the documentation I can find (https://developers.google.com/maps/documentation/embed/guide) specifies that I should proceed to the Services item in the left-hand menu. However, there is no such Services item in the left-hand menu in the Console. And the screen captures included with the documentation seem to refer to earlier versions of the Console (mine is more modern and responsive--unfortunately, I cannot include a screen capture).
How do I obtain an API Key to embed static Google Maps images in my website?

First of all, the document you have linked is a different API altogether.
Here's the link for Static Map API key documentation.
Now with regard to locating the API key, you're probably looking at an updated version of Developers Console. On Left go to APIs & auth instead.
Choose the API(s) you want for your application. Activate them.
Then go to Credentials on left. This is where you'll find the key.

Related

Meaning of "Errors" graph in Google Cloud Platform

Lately, we were experiencing issues with the Google Maps API. I just checked my Google Cloud Platform Dashboard and the "Errors" graph shows 100%.
Can someone point me in the right direction as to what this value means? (The service seems to work again, but the value is staying on 100%.)
I recommend you to:
Click on the API name Maps Statics API this will take you to that
particular API Overview page
Click on Metrics (left menu)
That should show you several graphs see the one that says Errors by API method
to see which method is generating errors
Google Maps Static API can only be invalid requests, because it's for embedding Google Maps.

Google Maps REST API to Create Custom Maps?

I have a database table with a listing of thousands of locations. I would like to create a custom map (accessible from the main Google Maps splash page by going to Menu->Your places->Maps. These are the same maps that you can create yourself at google.com/maps) using REST URLs to drop dots associated with my location addresses. The populated custom map will then be accessed through google.com/maps. I am not looking to embed Google Maps on a web page.
I've looked here, but I have not been able to find a set of REST URLs that I can use to do this. Most of the APIs provided by Google comes in the form of client-side JavaScript libraries.
Is there a way to create a custom map using exposed REST endpoints from Google?
The brief answer is no.
Maps Data API has not been available since 2011 (see Maps Data API deprecation announcement) and as for now there still is no way of doing it programmatically (see Allow programmatic access to MyMaps)

GMaps RefererDeniedMapError - JS Browser key

Since last week, we have been facing an issue related to the maps loading in our customer website.
Website pages' and domains are:
http://eduscopio.it/percorso-studenti-scelta-scuola-superiore (click on the search icon to jump to the map slide)
http://lavoro.eduscopio.it/percorso-studenti-scelta-scuola-superiore (click on the search icon to jump to the map slide)
The javascript console shows us "js?key=:32 Google Maps API error: RefererDeniedMapError".
After reading the documentation, and many topics on forum and stackoverflow, we tried to perform these operations in order to try get the map working again:
we added the api key (the website wasn't using it)
we rebuilt part of the layout to allow the Google logo and TOS to be clickable and viewable (they where partly hidden or not clickable due to an overlay)
we restricted domains and allowed the use of api key to some certain domains
we tried to renew the api key many times
The websiste is public and the usage is free without any sort of subscription. According to the API console, we didn't reach the quota limit.
On the API console there are no more details provided in regards to the error an no one between us has been contacted via e-mail
Thank you in advance, best regards

Google maps: how to generate a key for Google Maps v2?

I have an old website that uses Google maps v2. Previously the website was running under http://domain1.edu. Now it is runs under http://domain2.edu. It appears that I need to update the map key.
On the internet, I was looking for how to do this. I find incomplete info at Google's own website. Here is the link for v2 map key: https://developers.google.com/maps/documentation/javascript/v2/introduction?csw=1#Obtaining_Key
It says:
To create your API key, visit the APIs Console at https://code.google.com/apis/console and log in with your Google Account.
Click the Services link from the left-hand menu, then activate the Google Maps API v2 service.
Once the service has been activated, your API key is available from the API Access page, in the Simple API Access section. Maps API applications use the Key for browser apps
First, I am unable to find "Google Maps API v2" service mentioned above. I am able to find Google Maps API v3, and so I enabled it. I used the key mentioned at https://developers.google.com/maps/documentation/javascript/tutorial#api_key
However, the website key is still not working.
Here is the page with Google map: http://nmai.si.edu/nafvf/attend.aspx
Anyone knows how to fix this?
Thanks and regards!
You are using the deprecated Google Maps Javascript API v2, those keys are no longer available (as the documentation you point to indicates). You need to use a v3 key, and make sure you have the referrers set correctly for that key (you really should update your map to use the v3 API...)
working example (copied from Mike Williams' v2 tutorial, just changed the key)
This link says how to generate the key for android. You need to get the SHA1 of your signing key and then gotto google console to generate the key.

Google static maps API page mentions that static maps to be used only in browser

In the Google static maps API description (http://code.google.com/apis/maps/documentation/staticmaps/), I found the following statement : (present in the "Overview" section)
"Note that static maps may only be displayed within browser content; use of static maps outside of the browser is not allowed."
I need some help in deciphering the above statement.
Does this mean that the Google static maps has to be used inside a browser and cannot be used in context of a application doing http requests?
Thanks in advance for the help.
Interesting question.
This section from the "Google Maps API Family" FAQ says:
Can I use Google Maps in my non-Web application?
Yes, the Google Maps APIs can now be used in Desktop applications, provided that they adhere to the other restrictions of the Terms of Service. Note that in order for a desktop application to be deemed "publicly accessible", there must be a publicly accessible webpage from which it can be downloaded. See Section 7.1c of the Terms of Service for more information.
The FAQ also explicitly includes the Static Maps API as part of the set of "Google Maps APIs" mentioned above:
What are the Google Maps APIs?
The Google Maps APIs give developers several ways of embedding Google Maps into web pages, and allows for either simple use or extensive customization. There are now several API offerings: Google Maps Javascript API, Google Maps API for Flash, Google Static Maps API. In addition, we also offer the Mapplets API to enable the creation of mini-applications that run inside Google Maps. Depending on your needs, you may find yourself using one or a combination of these APIs.
The problem is that Section 10.8 of the Terms of Use is still saying:
10 - Except as explicitly permitted in Section 7 or the Maps APIs Documentation, you must not (nor may you permit anyone else to):
...
10.8 - use the Static Maps API other than in an implementation in a web browser;
It seems that using the Static Maps in a non-Web application is explicitly permitted in the Maps APIs Documentation, but I wonder if Section 10.8 takes precedence.
I will try to seek further information about this issue, and will update this answer accordingly.
Related links:
Google Maps API Group: J2SE Desktop App Options
Google Maps API Group: Static Maps and Mobile Applications