[Google Charts: Visualization - Geomap] Suddenly gives "Google Maps API error: MissingKeyMapError"

909 views
Skip to first unread message

Luca Ricci

unread,
Jul 7, 2016, 12:17:37 PM7/7/16
to Google Visualization API
I was using Google Charts with Geomap to display stats on users provenance and started giving me "Google Maps API error: MissingKeyMapError", but I'm not using Google Maps API, am I?
Should I activate an API Key for Google Maps API or is a temporary problem of Google Chats due to the recent change of policy for Google Maps API that now require an API Key to work?
If I should activate an API Key which type of Key should I enable (Google Maps JavaScript API, Google Static Maps API, Google Maps Embed API, Google Maps Geocoding API, ...)?

Thank in advance for your help.

Kenneth Kousen

unread,
Jul 9, 2016, 4:47:31 PM7/9/16
to Google Visualization API
I'm getting the same error when using google.visualization.Map. I also get a warning that the sensor parameter is not required.

Luca Ricci

unread,
Jul 11, 2016, 3:34:18 AM7/11/16
to Google Visualization API
Just for record,
I found this issue on google visualization repo:  https://github.com/google/google-visualization-issues/issues/2292
They answer:
Thanks for reporting this. We observed this happening recently, and are working on setting up an API key to avoid that warning message. I believe the sensor message will be avoided with our new way of using the maps API. You can try it now by changing 'current' to 'upcoming' in your google.charts.load() call.

Kenneth Kousen

unread,
Aug 7, 2016, 6:42:10 PM8/7/16
to Google Visualization API
Is there any resolution for this yet? I'm still stuck with something that used to work fine, and flashes a map but then gives the MissingKeyMapError. 

I tried generating a key for localhost and appending it to the jsapi call, but nothing changed.

Please help.

Ken

Daniel LaLiberte

unread,
Aug 9, 2016, 12:34:49 PM8/9/16
to Google Visualization API
If you are loading with google.charts.load(), and you load '45' or 'upcoming', you can now add a property to specify a mapsApiKey that you set up for your application.   This is instead of using the generic key that will result in throttling for your users, and a message in your console.

We need to add documentation for how to do this, but until then, here is a very rough outline:  Read the docs at https://developers.google.com/maps/documentation/javascript/get-api-key to find out how to get your own key.  When using Google Charts, your code will look something like this:

  var myMapsApiKey = 'SomeMagicToSetThis';
  google.charts.load('45', { mapsApiKey: myMapsApiKey, packages: [ 'geochart'] });



--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/fc26337f-ef7a-4c74-8acf-906d2f7d3aa0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Luca Ricci

unread,
Aug 10, 2016, 4:33:59 AM8/10/16
to Google Visualization API
Great! I just followed your instructions and it works!
Thanks!
It may be obvious, but the Goggle API to enable in order to use this service is the 'Google Maps JavaScript API'
I'm looking forward to the release for the 'current' version.
Thanks again.
Greetings.

Il giorno martedì 9 agosto 2016 18:34:49 UTC+2, Daniel LaLiberte ha scritto:
If you are loading with google.charts.load(), and you load '45' or 'upcoming', you can now add a property to specify a mapsApiKey that you set up for your application.   This is instead of using the generic key that will result in throttling for your users, and a message in your console.

We need to add documentation for how to do this, but until then, here is a very rough outline:  Read the docs at https://developers.google.com/maps/documentation/javascript/get-api-key to find out how to get your own key.  When using Google Charts, your code will look something like this:

  var myMapsApiKey = 'SomeMagicToSetThis';
  google.charts.load('45', { mapsApiKey: myMapsApiKey, packages: [ 'geochart'] });



On Sun, Aug 7, 2016 at 6:42 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
Is there any resolution for this yet? I'm still stuck with something that used to work fine, and flashes a map but then gives the MissingKeyMapError. 

I tried generating a key for localhost and appending it to the jsapi call, but nothing changed.

Please help.

Ken

On Thursday, July 7, 2016 at 12:17:37 PM UTC-4, Luca Ricci wrote:
I was using Google Charts with Geomap to display stats on users provenance and started giving me "Google Maps API error: MissingKeyMapError", but I'm not using Google Maps API, am I?
Should I activate an API Key for Google Maps API or is a temporary problem of Google Chats due to the recent change of policy for Google Maps API that now require an API Key to work?
If I should activate an API Key which type of Key should I enable (Google Maps JavaScript API, Google Static Maps API, Google Maps Embed API, Google Maps Geocoding API, ...)?

Thank in advance for your help.





--

Daniel LaLiberte

unread,
Aug 10, 2016, 12:09:10 PM8/10/16
to Google Visualization API
Great to hear that you got it working, and thanks for the clarification on which API needs be enabled.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

Neo Zion

unread,
Aug 10, 2016, 3:49:09 PM8/10/16
to Google Visualization API
Hey,

Version 45 doesn't work for me - the callback function passed to google.charts.setOnLoadCallback is not reached.
Version 44 do work but as I understand it can't accept mapsApiKey parameter.
Here we can see there is no version 45 yet: https://developers.google.com/chart/interactive/docs/release_notes
Please advise.

To post to this group, send email to google-visua...@googlegroups.com.



--

Daniel LaLiberte

unread,
Aug 10, 2016, 4:06:22 PM8/10/16
to Google Visualization API
Neo, have you tried '45' recently?  I just updated it, and more importantly, the loader so that it should be working more reliably. If it still does not work, I would like to investigate why so I will need to see the particulars of how you are loading it.

Please advise.

To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Neo Zion

unread,
Aug 10, 2016, 4:20:48 PM8/10/16
to Google Visualization API
I've tried it right now.
Here is a more extended piece of code:
        var key = '...';
google.charts.load('45', { 'packages': ['geochart'], mapsApiKey: key });
google.charts.setOnLoadCallback(function () {
   //not reached
   alert('great');
});
Please advise.

To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

Daniel LaLiberte

unread,
Aug 10, 2016, 4:34:14 PM8/10/16
to Google Visualization API
Maybe I'll need to see more of your example, or maybe the problem involves the mapsApiKey, but here is an example that works with version 45.  Notice I removed the loading of the jsapi library as well:  https://jsfiddle.net/dlaliberte/2cx0xfo7/1/

Please advise.

To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Neo Zion

unread,
Aug 10, 2016, 4:51:38 PM8/10/16
to Google Visualization API
Thanks to your fiddle I got it. The problem was that this file was located and loaded locally in the project that I'm working on:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
So it was the outdated version.
Now I'm loading this file directly from this URL and I'm passing the maps key as well and there are no errors nor warnings.
Thank you very much!

Daniel LaLiberte

unread,
Aug 10, 2016, 4:55:14 PM8/10/16
to Google Visualization API
Good to hear.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

Francesco Moglia

unread,
Feb 16, 2017, 9:01:36 AM2/16/17
to Google Visualization API
Hi, how could i resolve the same issue with the Embed API? I have a GEO chart to display google analytics' visitors.

Il giorno mercoledì 10 agosto 2016 22:55:14 UTC+2, Daniel LaLiberte ha scritto:
Good to hear.

On Wed, Aug 10, 2016 at 4:51 PM, Neo Zion <neo1...@gmail.com> wrote:
Thanks to your fiddle I got it. The problem was that this file was located and loaded locally in the project that I'm working on:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
So it was the outdated version.
Now I'm loading this file directly from this URL and I'm passing the maps key as well and there are no errors nor warnings.
Thank you very much!

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages