title: GWT Google Maps: setCenter: not a LatLng or LatLngLiteral: in property lat: not a number
body: <p>I'm using GWT (version 2.61) and gwt-maps (version 3.8.0) in an effort to display a Google Map via GWT.</p>
  
  <p>The basics seem to work, but now I'm trying to run the CitySimple example that comes with the gwt-maps zip. <a href="https://developers.google.com/maps/documentation/javascript/examples/circle-simple" rel="nofollow">Here</a> it is in straight JavaScript, but I'm trying to do it through GWT.</p>
  
  <p>However, when I run the sample, I get the following error upon startup:</p>
  
  <pre><code>com.google.gwt.core.client.JavaScriptException: (InvalidValueError) @com.google.maps.gwt.client.Circle::create(Lcom/google/maps/gwt/client/CircleOptions;)([JavaScript object(17)]): setCenter: not a LatLng or LatLngLiteral: in property lat: not a number
      at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
      at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
      at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      at com.google.maps.gwt.client.Circle$.create(Circle.java)
      at com.test.client.GwtTest.renderMap(GwtTest.java:80)
  </code></pre>
  
  <p>The map shows up, but none of the city circles show up. It seems to believe that the lat value in my LatLng type is not a number, which is impossible in GWT, since Java will <em>only</em> take a double value.</p>
  
  <p>Here is the GWT code I'm running:</p>
  
  <pre><code>package com.test.client;
  
  import java.util.HashMap;
  
  import com.google.gwt.ajaxloader.client.AjaxLoader;
  import com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions;
  import com.google.gwt.core.client.EntryPoint;
  import com.google.gwt.dom.client.Document;
  import com.google.maps.gwt.client.Circle;
  import com.google.maps.gwt.client.CircleOptions;
  import com.google.maps.gwt.client.GoogleMap;
  import com.google.maps.gwt.client.LatLng;
  import com.google.maps.gwt.client.MapOptions;
  import com.google.maps.gwt.client.MapTypeId;
  
  public class GwtTest implements EntryPoint {
  
      static class City {
          LatLng center;
          Long population;
  
          City(LatLng center, Long population) {
              this.center = center;
              this.population = population;
          }
      }
  
      private static java.util.Map&lt;String, City&gt; citymap = new HashMap&lt;String, City&gt;();
      static {
          citymap.put("Chicago", new City(LatLng.create(41.878113, -87.629798), 2842518L));
          citymap.put("New York", new City(LatLng.create(40.714352, -74.005973), 8143197L));
          citymap.put("Los Angeles", new City(LatLng.create(34.052234, -118.243684), 3844829L));
      }
  
      @Override
      public void onModuleLoad() {
          AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
          options.setOtherParms("sensor=false");
          Runnable callback = new Runnable() {
              public void run() {
                  renderMap();
              }
          };
          AjaxLoader.loadApi("maps", "3", callback, options);
      }
  
      public static void renderMap() {
          MapOptions mapOpts = MapOptions.create();
          mapOpts.setZoom(4);
          mapOpts.setCenter(LatLng.create(37.09024, -95.712891));
          mapOpts.setMapTypeId(MapTypeId.TERRAIN);
          GoogleMap map = GoogleMap.create(Document.get().getElementById("map_canvas"), mapOpts);
  
          for (String cityName : citymap.keySet()) {
  
              System.out.println("City: " + cityName);
  
              City city = citymap.get(cityName);
  
              // Construct the circle for each value in citymap. Scale population by 20.
              CircleOptions populationOptions = CircleOptions.create();
              populationOptions.setStrokeColor("#ff0000");
              populationOptions.setStrokeOpacity(0.8);
              populationOptions.setStrokeWeight(2);
              populationOptions.setFillColor("#ff0000");
              populationOptions.setFillOpacity(0.35);
              populationOptions.setMap(map);
  
              System.out.println("Lat: " + city.center.lat());
              System.out.println("Lng: " + city.center.lng());
  
              populationOptions.setCenter(city.center);
  
              populationOptions.setRadius(city.population / 20);
              Circle.create(populationOptions);
          }
      }
  }
  </code></pre>
  
  <p>As you can see, all of the LatLng values have numbers for their lats and lngs, so this error doesn't make any sense to me.</p>
  
  <p>For completeness, here is my html file:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;                                               
      &lt;link type="text/css" rel="stylesheet" href="GwtTest.css"&gt;                               
      &lt;title&gt;GWT Test&lt;/title&gt;
      &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" language="javascript"
          src="gwttest/gwttest.nocache.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p&gt;Testing&lt;/p&gt;
      &lt;div style="width:500px; height:500px"&gt;
          &lt;div id="map_canvas" style="width: 100%; height: 100%;"&gt;Map is loading...&lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And here is my GWT module xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!--
    When updating your version of GWT, you should also update this DTD reference,
    so that your app can take advantage of the latest GWT module capabilities.
  --&gt;
  &lt;!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.6.1//EN"
    "file:///C:/Users/kworkman/Desktop/gwt-2.6.1/gwt-module.dtd"&gt;
  &lt;module rename-to='gwttest'&gt;
    &lt;!-- Inherit the core Web Toolkit stuff.                        --&gt;
    &lt;inherits name='com.google.gwt.user.User'/&gt;
    &lt;inherits name="com.google.maps.gwt.GoogleMaps" /&gt;
    &lt;inherits name="com.google.gwt.ajaxloader.AjaxLoader" /&gt;
  
    &lt;!-- Inherit the default GWT style sheet.  You can change       --&gt;
    &lt;!-- the theme of your GWT application by uncommenting          --&gt;
    &lt;!-- any one of the following lines.                            --&gt;
    &lt;inherits name='com.google.gwt.user.theme.clean.Clean'/&gt;
    &lt;!-- &lt;inherits name='com.google.gwt.user.theme.standard.Standard'/&gt; --&gt;
    &lt;!-- &lt;inherits name='com.google.gwt.user.theme.chrome.Chrome'/&gt; --&gt;
    &lt;!-- &lt;inherits name='com.google.gwt.user.theme.dark.Dark'/&gt;     --&gt;
  
    &lt;!-- Other module inherits                                      --&gt;
  
    &lt;!-- Specify the app entry point class.                         --&gt;
    &lt;entry-point class='com.test.client.GwtTest'/&gt;
  
    &lt;!-- Specify the paths for translatable code                    --&gt;
    &lt;source path='client'/&gt;
    &lt;source path='shared'/&gt;
  
    &lt;!-- allow Super Dev Mode --&gt;
    &lt;add-linker name="xsiframe"/&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>Can anybody see anything I'm doing wrong? I'm still brand new to GWT so I wouldn't be shocked if I was doing something stupid, but this error seems to directly contradict the code, so I'm at a bit of a loss.</p>
  
  <p>I have googled the error, but every problem I've seen was caused by people passing in Strings instead of numbers to the LatLng type, which I'm not doing.</p>