Thanks for the info.
Unfortunately re-ordering the load didn't solve the problem, but
removing the map from the load did.

Alex

On Oct 10, 6:37 pm, Eric Ayers <[email protected]> wrote:
> Try re-ordering the load so that the Maps API is loaded first before the
> visualization API.  You might check on the Visualization API group.  There
> was a thread about this on the gwt-google-apis group as well.
>
>
>
> On Sat, Oct 10, 2009 at 12:01 PM, Alex <[email protected]> wrote:
>
> > Hi,
>
> > I've got a problem with the Visualization API. Until recently the code
> > below worked just fine. But now I get the error:
>
> > [ERROR] Unable to load module entry point class
> > gwtVisualiztion.client.GWTvisualization (see associated exception for
> > details)
> > com.google.gwt.core.client.JavaScriptException: (TypeError): Object
> > expected
> >  number: -2146823281
> >  description: Object expected
>
> > According to the FAQs this is caused by a problem with the AJAX loader
> > script. The script tag however is part of the html code and the script
> > can be reached with the browser.
> > Any suggestions what might be wrong / or how to solve the problem
> > avoiding writing Runnable Java classes?
>
> > Gr,
>
> > Alex
>
> > ---------------------------------------------------------------------------------------------------------------------------------------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//
> > EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-
> > source/core/src/gwt-module.dtd">
> > <module rename-to='gwtvisualization'>
> >  <!-- Inherit the core Web Toolkit stuff.                        -->
> >  <inherits name='com.google.gwt.user.User'/>
>
> >  <!-- Inherit the default GWT style sheet.  You can change       -->
> >  <!-- the theme of your GWT application by uncommenting          -->
> >  <!-- any one of the following lines.                            -->
> >  <inherits name='com.google.gwt.user.theme.standard.Standard'/>
> >  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
> >  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->
>
> >  <!-- Other module inherits                                      -->
> >  <inherits name='com.google.gwt.visualization.Visualization'/>
>
> >  <!-- Specify the app entry point class.                         -->
> >  <entry-point class='gwtVisualiztion.client.GWTvisualization'/>
> > </module>
>
> > ---------------------------------------------------------------------------------------------------------------------------------------------
> > package gwtVisualiztion.client;
>
> > import com.google.gwt.core.client.EntryPoint;
> > import com.google.gwt.user.client.ui.RootPanel;
> > import com.google.gwt.visualization.client.visualizations.GeoMap;
> > import
> > com.google.gwt.visualization.client.visualizations.GeoMap.Options;
>
> > public class GWTvisualization implements EntryPoint {
> >        private DataModel myData;
> >        private GeoMap myMap;
> >        private Options myMapOptions;
>
> >       �...@override
> >        public void onModuleLoad() {
> >                myData = new DataModel();
> >                myData.fillDataTable();
> >                myMapOptions = Options.create();
> >                myMapOptions.setDataMode(GeoMap.DataMode.REGIONS);
> >                myMapOptions.setRegion("world");
> >                myMapOptions.setHeight(600);
> >                myMapOptions.setWidth(800);
> >                myMap = new GeoMap(myData.getDataTable(), myMapOptions);
> >                RootPanel.get("main").add(myMap);
> >        }
> > }
>
> > ---------------------------------------------------------------------------------------------------------------------------------------------
>
> > package gwtVisualiztion.client;
>
> > import com.google.gwt.visualization.client.DataTable;
> > import
> > com.google.gwt.visualization.client.AbstractDataTable.ColumnType;
>
> > public class DataModel {
> >        private DataTable myData;
>
> >        public DataModel() {
> >                this.setupDataTable();
> >        }
>
> >        private void setupDataTable() {
> >                myData = DataTable.create();
> >                myData.addColumn(ColumnType.STRING, "Country");
> >                myData.addColumn(ColumnType.NUMBER, "waarde");
> >        }
>
> >        public void addtoDataTable(String vak, int cijfer) {
> >                int rownr = myData.addRow();
> >                myData.setValue(rownr, 0, vak);
> >                myData.setValue(rownr, 1, cijfer);
> >        }
>
> >        public void fillDataTable() {
> >                myData.addRows(5);
> >                myData.setValue(0, 0, "NL");
> >                myData.setValue(0, 1, 100);
> >                myData.setValue(1, 0, "Germany");
> >                myData.setValue(1, 1, 50);
> >                myData.setValue(2, 0, "United States");
> >                myData.setValue(2, 1, 70);
> >                myData.setValue(3, 0, "UK");
> >                myData.setValue(3, 1, 150);
> >                myData.setValue(4, 0, "Spain");
> >                myData.setValue(4, 1, 125);
> >        }
>
> >        public DataTable getDataTable() {
> >                return myData;
> >        }
> > }
>
> > ---------------------------------------------------------------------------------------------------------------------------------------------
>
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
> > <html>
> >  <head>
> >    <meta http-equiv="content-type" content="text/html;
> > charset=UTF-8">
> >    <link type="text/css" rel="stylesheet"
> > href="GWTvisualization.css">
> >    <title>Web Application Starter Project</title>
> >    <script type="text/javascript" language="javascript"
> > src="gwtvisualization/gwtvisualization.nocache.js"></script>
> >  </head>
>
> >  <body>
>
> >    <!-- OPTIONAL: include this if you want history support -->
> >    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
> > style="position:absolute;width:0;height:0;border:0"></iframe>
>
> >    <script type="text/javascript" src="http://www.google.com/jsapi";></
> > script>
> >        <script type="text/javascript">
> >                google.load("visualization", "1", {'packages' : ["piechart",
> > "table", "motionchart", "geomap", "annotatedtimeline", "areachart",
> > "barchart", "columnchart", "orgchart", "gauge", "intensitymap",
> > "linechart", "map", "scatterchart"] });
> >        </script>
>
> >    <div id="main"></div>
> >  </body>
> > </html>
>
> --
> Eric Z. Ayers
> Google Web Toolkit, Atlanta, GA USA
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to