Thanks, Andrew - that sorted it. The callback thing was the clincher. The
GeoChart module appears to be clustered under "corechart" so there seems to
be no need to load it explicitly.
google.load('visualization', '1', {packages: ['corechart'],
callback:myCallbackFunction});
Thanks a bunch!
On Friday, 23 May 2014 14:27:28 UTC+10, Andrew Gallant wrote:
>
> There are a number of problems with that code. First, you aren't loading
> the "geochart" package, so you shouldn't be able to get *any* chart at
> all to draw. Second, you aren't wrapping your chart code in a callback
> function from the google loader, so it is quite likely that API components
> are not loading correctly. I made a fixed up version of the fiddle:
> http://jsfiddle.net/asgallant/PYBPR/
>
> For loading the API, you need to either use the autoloader, or manually
> call google.load. The autoloader overrides the manual call when both are
> used. To load the correct package and have a callback, you need to use one
> of these:
>
> <script type="text/javascript" src='https://www.google.com/jsapi
> '></script>
> <script type="text/javascript">
> function drawChart () {
> // chart code
> }
> google.load('visualization', '1', {packages:['geochart'], callback:
> drawChart});
> </script>
>
> Or this:
>
> <script type="text/javascript" src='https://www.google.com/jsapi?
> autoload={"modules":[{"name":"visualization","version":"1","packages":["geochart"],"callback":"drawChart"}]}
> '></script>
> <script type="text/javascript">
> function drawChart () {
> // chart code
> }
> </script>
>
> On Friday, May 23, 2014 12:00:15 AM UTC-4, Chris Carey wrote:
>>
>> We're having some issues with the GeoChart in IE. Works fine and well in
>> Chrome/Firefox/etc but IE9-12 throws an "invalid calling object" under
>> certain circumstances.
>>
>> I've implemented a simple use case here:
>> http://jsfiddle.net/QhvCG/10/
>>
>> Basically the thing is asked to re-render based on changing config for
>> region/resolution. Click the zoom buttons at the top left to trigger.
>> The sequence is:
>>
>> START : displays world map with resolution set to continents
>> ZOOM IN : zooms in correctly to the Oceania region (009), and sets
>> resolution to countries
>> ZOOM OUT: should return to START, but throws an error
>>
>> We've also had it throwing errors when sending new queries at it (when
>> using ChartWrapper) - it may or may not be related, but it's the same
>> error.
>>
>> Any thoughts on how to get around this?
>>
>> thanks in advance,
>> Chris
>>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.