Google Charts: where do I put API Key?

Forum to discuss the new web client version of Servoy.

Google Charts: where do I put API Key?

Postby swingman » Wed Oct 28, 2020 12:30 pm

Hi all,

I'm in the NG-Client. I have put a Google chart-component onto a form and set the type to GeoChart. The map draws, but I get no markers.
In the console, I get warnings like:
Code: Select all
Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
Google Maps JavaScript API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
Geocoding Service: You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account


I have tried adding my API key as
key and apiKey in the options array, but so far I have had no luck.

Code: Select all
var options = {
           region: '150',
           displayMode: 'markers',
           colorAxis: {colors: ['green', 'blue']},
      apiKey: '<myKeyhere>',
      key: '<myKeyhere>'
         };

    elements.people_map.drawChart('GeoChart', data, options);


Any ideas?
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Google Charts: where do I put API Key?

Postby swingman » Thu Oct 29, 2020 12:08 pm

I may have run into problems because I have not set up a billing account with google.

Can someone confirm they have managed to use the GeoCharts option of the Google Charts component?
I see it mentioned in the code of the component on GitHub.
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 9 guests

cron