[Google Maps] How to use clientid instead of API key ?

[Google Maps] How to use clientid instead of API key ?

  
Forge Component
(20)
Published on 9 Mar by Steve Collins
20 votes
Published on 9 Mar by Steve Collins

Hi,

I have to use cliendid instead of APIkey so how can i pass client id in Map web block ?

Do i have need to change in default source of google map ?

Thanks & Regards

DM Singh 

Hi DM,

I don't have a client id to try this, but looking at the Goggle Maps component there's a hack that you can try.

In Service Center, set this in the "APILibraries" Site property of the Google Maps component:

&client=<YOUR CLIENT ID>

When the APILibraries is not empty it will add that as a value of the parameter libraries. But since you're adding the & character it will add in fact two parameters and the url will be something like this:

maps.googleapis.com/maps/api/js?v=3.26&libraries=&client=<YOUR CLIENT ID>

Try it and tell me if it works.

Cheers,

José