Hello G, I looked over your files and didn't see anything obvious. Unfortunately, the maps documents haven't been updated for GWT 1.6 or the Google Plugin. Here are some suggestions:
1) Did you try using hosted mode and setting a break point in your EntryPoint class? 2) You also could try running in web mode under firebug and see that the maps API URL (http://maps.google.com/maps) is being successfully loaded. On Tue, Jun 9, 2009 at 8:21 PM, G<[email protected]> wrote: > > I am fairly new to GWT + Google Maps toolkit. > > I am using eclipse pulgin on windows and was able to successfully > compile and deploy ExampleWebApp on Google AppEngine & Tomcat. > > I am now struggling to get the SimpleMaps example working. I have > 1.6.4 plugin & gwt-maps-1.0.4. I am not getting any compile time or > runtime error but the map itself is not showing (I ran ethereal and > looks like there is no request made). I checked my proxy settings in > the hosted browser and I can access google page without any problem. > (I went through most of the questions on the forums but it didnt seem > to help in my case). > I didnt run applicationcreator & packageCreator because: > #1 I just couldn't find those scripts. (Can you please point me to it, > it was not there in the \gwt-windows-1.6.4 dir) > # 2 I read that GWT 1.6 onwards, I dont have to run those to create > GWT eclipse project. > > I am enclosing the files I used; hope someone can point me something > obvious. I did include the gwt_maps.jar as external jars and as I > mentioned I do not get any error whatsoever. I even tried deploying to > google and tomcat and firefox browser, the map just doesn't come up. > All I see is blank... > > SimpleMaps.gwt.xml (shows under com.google.gwt.maps.GoogleMaps in > eclipse) > =========================================================== > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4// > EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro- > source/core/src/gwt-module.dtd"> > <module rename-to='simplemaps'> > > <!-- Load the Google Maps GWT bindings from the gwt-google-apis > project --> > <!-- Added by projectCreator if you use the -addModule argument --> > <inherits name="com.google.gwt.maps.GoogleMaps" /> > <inherits name="com.google.gwt.user.User" /> > <!-- > If you want to deploy this application outside of localhost, > you must obtain a Google Maps API key at: > http://www.google.com/apis/maps/signup.html > Replace the src attribute below with a URL that contains your key. > --> > <!-- script src="http://maps.google.com/maps? > gwt=1&file=api&v=2&key=http://maps.google.com/maps? > file=api&v=2&sensor=true&key=ABQIAAAAVGwKqoUDHju3NY7XZfVXYxRg-2eqO4pXlrSv1PRvWeooUrxUGxSRAPkLn_MJwxBWIVlKup4OMI1z2w" > / > --> > <entry-point class='com.google.gwt.maps.GoogleMaps.client.SimpleMaps'/ >> > > <!-- You can usually run under localhost without a > key --> > <!-- Set the 'sensor' parameter to true if your app makes use of an > onboard > positioning sensor, such as a GPS reciever. > --> > <script src="http://maps.google.com/maps? > gwt=1&file=api&v=2.148" /> > </module> > > > > SimpleMaps.java > ============= > > package com.google.gwt.maps.GoogleMaps.client; > > import com.google.gwt.core.client.EntryPoint; > import com.google.gwt.maps.client.InfoWindowContent; > import com.google.gwt.maps.client.MapWidget; > import com.google.gwt.maps.client.control.LargeMapControl; > import com.google.gwt.maps.client.geom.LatLng; > import com.google.gwt.maps.client.overlay.Marker; > import com.google.gwt.user.client.ui.RootPanel; > > public class SimpleMaps implements EntryPoint { > private MapWidget map; > > // GWT module entry point method. > public void onModuleLoad() { > LatLng cawkerCity = LatLng.newInstance(39.509,-98.434); > // Open a map centered on Cawker City, KS USA > > map = new MapWidget(cawkerCity, 2); > map.setSize("500px", "300px"); > > // Add some controls for the zoom level > map.addControl(new LargeMapControl()); > > // Add a marker > map.addOverlay(new Marker(cawkerCity)); > > // Add an info window to highlight a point of interest > map.getInfoWindow().open(map.getCenter(), > new InfoWindowContent("World's Largest Ball of Sisal Twine")); > > // Add the map to the HTML host page > RootPanel.get("mapsTutorial").add(map); > } > } > > > > Web.xml > ======= > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE web-app > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" > "http://java.sun.com/dtd/web-app_2_3.dtd"> > > <web-app> > > <!-- Default page to serve --> > <welcome-file-list> > <welcome-file>SimpleMaps.html</welcome-file> > </welcome-file-list> > > <!-- Servlets --> > <servlet> > <servlet-name>greetServlet</servlet-name> > <servlet- > class>com.google.gwt.maps.GoogleMaps.server.GreetingServiceImpl</ > servlet-class> > </servlet> > > <servlet-mapping> > <servlet-name>greetServlet</servlet-name> > <url-pattern>/simplemaps/greet</url-pattern> > </servlet-mapping> > > </web-app> > > > > > SimpleMaps.html > ============= > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <!-- The HTML 4.01 Transitional DOCTYPE declaration--> > <!-- above set at the top of the file will set --> > <!-- the browser's rendering engine into --> > <!-- "Quirks Mode". Replacing this declaration --> > <!-- with a "Standards Mode" doctype is supported, --> > <!-- but may lead to some differences in layout. --> > > <html> > <head> > <meta http-equiv="content-type" content="text/html; > charset=UTF-8"> > > <!-- > --> > <!-- Consider inlining CSS to reduce the number of requested files > --> > <!-- > --> > <link type="text/css" rel="stylesheet" href="SimpleMaps.css"> > > <!-- --> > <!-- Any title is fine --> > <!-- --> > <title>Web Application Starter Project</title> > > <!-- --> > <!-- This script loads your compiled module. --> > <!-- If you add any GWT meta tags, they must --> > <!-- be added before this line. --> > <!-- --> > </head> > > <!-- --> > <!-- The body can have arbitrary html, or --> > <!-- you can leave the body empty if you want --> > <!-- to create a completely dynamic UI. --> > <!-- --> > <body> > > <h1>SimpleMaps</h1> > > <div id="mapsTutorial"></div> > > </body> > </html> > > > > .classpath > ========= > > <?xml version="1.0" encoding="UTF-8"?> > <classpath> > <classpathentry kind="src" path="src"/> > <classpathentry kind="con" > path="com.google.appengine.eclipse.core.GAE_CONTAINER"/> > <classpathentry kind="con" > path="com.google.gwt.eclipse.core.GWT_CONTAINER"/> > <classpathentry kind="con" > path="org.eclipse.jdt.launching.JRE_CONTAINER"/> > <classpathentry kind="lib" path="D:/downloads/gwt-maps-1.0.4/gwt- > maps-1.0.4/gwt-maps.jar"/> > <classpathentry kind="lib" path="D:/downloads/gwt-maps-1.0.4/gwt- > maps-1.0.4/gwt-maps"/> > <classpathentry kind="output" path="war/WEB-INF/classes"/> > </classpath> > > > .project > ====== > <?xml version="1.0" encoding="UTF-8"?> > <projectDescription> > <name>SimpleMaps</name> > <comment></comment> > <projects> > </projects> > <buildSpec> > <buildCommand> > <name>org.eclipse.jdt.core.javabuilder</name> > <arguments> > </arguments> > </buildCommand> > <buildCommand> > > <name>com.google.gwt.eclipse.core.gwtProjectValidator</name> > <arguments> > </arguments> > </buildCommand> > <buildCommand> > > <name>com.google.appengine.eclipse.core.enhancerbuilder</name> > <arguments> > </arguments> > </buildCommand> > <buildCommand> > > <name>com.google.appengine.eclipse.core.projectValidator</name> > <arguments> > </arguments> > </buildCommand> > <buildCommand> > > <name>com.google.gdt.eclipse.core.webAppProjectValidator</name> > <arguments> > </arguments> > </buildCommand> > </buildSpec> > <natures> > <nature>org.eclipse.jdt.core.javanature</nature> > <nature>com.google.appengine.eclipse.core.gaeNature</nature> > <nature>com.google.gwt.eclipse.core.gwtNature</nature> > <nature>com.google.gdt.eclipse.core.webAppNature</nature> > </natures> > </projectDescription> > > > > > > -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
