ThinkGeo.com    |     Documentation    |     Premium Support

Google Overlay question

Working with google after they changed their pricing structure recently. I am trying to find anything that tells me what keys/codes/ids I need from the large set of options they provide.

I have created my account, enable static maps API, created a service account key (JSON version). In this key I see lots of fields
private_key_id
private_key
Client_id
and several others.

When trying to load the Private Key and Client ID values into the overlay constructor, I still get an error about access forbidden. I am wonder if you have any documentation on what values I need to be using so I know I should be getting valid images back. The private key in the file I got looks like this:

“-----BEGIN PRIVATE KEY-----\n[1675 characters]\n-----END PRIVATE KEY-----\n”
Do I need that entire string, or do I parse out parts of it?

I need help figuring out what values to pass into your constructor since the ones I have been trying are not working.

Hi Jake,

Please visit the documentation here: https://developers.google.com/maps/documentation/maps-static/get-api-key#client-id

The parameter you need passed in our class is Client ID and private key(signature).

Wish that’s helpful.

Regards,

Ethan

That information still doesn’t describe what is needed to be passed into the constructor for your layer.

Do I need an API Key
OAuth 2.0 client ID
Service account key

Each of those have keys that can be used for static maps, but so far I have not found the combination that lets me view the layer successfully. I can’t tell if that is because the combination of keys I am using is wrong, I am adding too much text to the keys, or if there is another reason. I would like to verify that I am using a correct key, if I can get that, then I can start tracking down connection issues.

If you can’t provide what a sample key should look like, can you please let me know which type of credential I should be trying to use?

Hi Jake,

The parameters that are passed into the constructor of GoogleMapsLayer are Client ID and Signature(private key), and the signature is generated using your private cryptographic key. After you purchase Google Maps APIs Premium Plan license, your will receive an email from google, and this email contains your client ID and your private cryptographic key.

Here attached is a google map demo, you can refer it. The client id and private key are modified in the sample, and they are invalid. You are refer that for your private key.
GoogleMapsDemo.zip (9.9 KB)

If you have any questions, please feel free to contact us.

Thanks
Mark

Mark, thanks for the response, but I don’t believe that is a valid option anymore with Google’s new pricing. I don’t believe that client ID is possible to get anymore, nor do I see where the private key is generated. I have been on the phone with Google, whose map department apparently doesn’t have a phone support system in place, and so far no one has been able to help me generate the required key. I am hoping the map department will be able to help as soon as they contact me.

Until then, what have you learned from your side on the new billing structure that Google has put in place last month? How does this impact your call to them going forward and what new keys/IDs will need to be used?

Thanks
Jake

I have gotten more information from Google, if we require a clientID and a Private key we would need to get a premium account. However they are not sure why those are needed to use the maps. It sounds like the API key would be all they need to use their platform, has any thought gone into requiring just an API key rather than the client ID for the layer? Below is the response they sent to my inquiry about needing a client ID.

"However, you do not need a client id to use Google Maps Platform - it sounds like you’re running into an issue with the third party application. While we are limited to best efforts in addressing issues with third party applications, I would suggest investigating whether this tool supports API keys, or finding an alternative that does. "

Hi Jake,

Our team need some time to research about it.

Any update I will let you know.

Regards,

Ethan

Hi Jake,

Our API don’t need to upgrade follow Google this time, it just works well.

As below is some informationby out research, wish that’s helpful.

There are two type user for Google API keys, Standard API users, must use API key. Premium Plan customers: must use Client ID and digital signature. ThinkGeo google user must be one Premium Plan customers.

  • Standard API users: If you’re using the API under the standard plan, you must use an API key. In addition, we recommend that you include a digital signature. The digital signature is required under certain circumstances. See more about API keys and digital signatures for the standard API.

  • Premium Plan customers: For production-ready apps, you must use a browser-restricted API key that is set up in the Google Maps APIs Premium Plan project created for you when you purchased the Premium Plan, as well as a digital signature. Alternatively, you can authenticate your application using use a client ID and digital signature(instead of an API key).

A. How to get the client ID and digital signature?

Upon purchasing your Google Maps APIs Premium Plan license, you will receive a welcome email from Google that contains your client ID and your private cryptographic key.

B. If you are not sure signature, you can generate a digital signature to use with a client ID, to create a digital signature for your request, follow the steps in the detailed guide below.

If you need any more information, please let me know that.

Regards,

Ethan

Im using the WebServer Edition
class GoogleMapsLayer
requires a Client Id on creation. With the new Billing Set up We will no longer have a client Id to give.

Hi Jarek,

Please view the updated previous reply, it contains the answer about your question.

Regards,

Ethan