Starting playing with YUI3 and JavaScript Maps API. No problem :) I am really impressed by Google Wave, that is why I wanted to learn GWT. I cant wait to play with Google Wave.
Ciao On Jul 16, 9:43 pm, Eric Ayers <[email protected]> wrote: > Sorry it isn't working out. Just FYI, this particular behavior is > inherited from the JavaScript Maps API, so you'll have to deal with > the same thing if you re-code your logic in JavaScript > > > > On Thu, Jul 16, 2009 at 7:44 AM, alixeb<[email protected]> wrote: > > > Thanks for that ... Hmm not sure I want to carry on with GWT. > > I much prefer coding in JavaScript. Oh well I tried a bit, lol > > > Cheers > > > On 15 juil, 19:37, Eric Ayers <[email protected]> wrote: > >> I'm guessing that what's happening here is that the MapClickHandler is > >> getting in the way of closing the info window. Its not intuitive, > >> but the map click handler fires even when you are clicking on an > >> overlay on top of the map, like an InfoWindow: > > >>http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.0/com/google... > > >> On Wed, Jul 15, 2009 at 8:33 AM, alixeb<[email protected]> wrote: > > >> > Hiya, > > >> > I am a Front End Developer. I am trying to learn GWT. > >> > I think my code is pretty straightforward. > >> > I am creating a DockPanel and in the center of it I have adding a > >> > MapPage object that extends Vertical Panel. > > >> > Each time you click on the Map a marker appear which some text in > >> > InfoWindow. > >> > Interaction is pretty much what this example does : > >> >http://gwt.google.com/samples/HelloMaps-1.0.4/HelloMaps.html#Draggabl... > > >> > Ok for some reason when closing the InfoWindow using cross icon. > >> > I get 3 alert errors, which YES/NO button to debug with IE tool: > >> > Line: 1123 > >> > Error: 'this.ra' is null or not an object > >> > Click NO > >> > Line: 469 > >> > Error: 'null' is null or not an object > >> > Click NO > >> > Line: 469 > >> > Error: 'null' is null or not an object > > >> > In Eclipse: > >> > com.google.gwt.core.client.JavaScriptException: (TypeError): 'null' is > >> > null or not an object > >> > number: -2146823281 > >> > description: 'null' is null or not an object > >> > at com.google.gwt.maps.client.impl.OverlayImpl.bindConcreteOverlay > >> > (Native Method) > >> > at > >> > com.google.gwt.maps.client.overlay.Overlay$ConcreteOverlay.<init> > >> > (Overlay.java:42) > >> > at > >> > com.google.gwt.maps.client.overlay.Marker.<init>(Marker.java:130) > >> > at com.wikik.client.pages.MapPage$3.onClick(MapPage.java:96) > >> > at com.google.gwt.maps.client.MapWidget$8.callback(MapWidget.java: > >> > 481) > >> > at com.google.gwt.maps.client.impl.EventImpl$OverlayLatLngCallback > >> > $1.execute(EventImpl.java:193) > >> > at > >> > com.google.gwt.maps.client.impl.EventImpl.invokeAndReportUncaughtExceptions > >> > (EventImpl.java:260) > >> > at > >> > com.google.gwt.maps.client.impl.EventImpl.invokeAndMaybeReportUncaughtExceptions > >> > (EventImpl.java:246) > >> > at > >> > com.google.gwt.maps.client.impl.EventImpl.access$0(EventImpl.java: > >> > 241) > >> > at com.google.gwt.maps.client.impl.EventImpl > >> > $OverlayLatLngCallback.callbackWrapper(EventImpl.java:191) > > >> > The code of MapPage.java > > >> > import com.google.gwt.user.client.ui.VerticalPanel; > > >> > 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.event.MapClickHandler; > >> > import com.google.gwt.maps.client.geom.LatLng; > >> > import com.google.gwt.maps.client.overlay.Marker; > >> > import com.google.gwt.maps.client.overlay.MarkerOptions; > >> > import com.google.gwt.maps.client.InfoWindow; > >> > import com.google.gwt.maps.client.event.MarkerDragEndHandler; > >> > import com.google.gwt.maps.client.event.MarkerDragStartHandler; > > >> > public class MapPage extends VerticalPanel { > > >> > private MapWidget map; > >> > private Marker newMarker; > >> > private InfoWindow info = null; > > >> > private void createNewMarker() { > >> > MarkerOptions options = MarkerOptions.newInstance(); > >> > options.setDraggable(true); > >> > LatLng point = LatLng.newInstance(0,0); > >> > newMarker = new Marker(point, options); > >> > newMarker.setVisible(false); > > >> > newMarker.addMarkerDragEndHandler(new MarkerDragEndHandler() { > >> > public void onDragEnd(MarkerDragEndEvent event) { > >> > info.open(newMarker, new InfoWindowContent("heouhr > >> > oehro > >> > eh")); > >> > } > >> > }); > > >> > newMarker.addMarkerDragStartHandler(new > >> > MarkerDragStartHandler() > >> > { > >> > public void onDragStart(MarkerDragStartEvent event) { > >> > info.setVisible(false); > >> > } > >> > }); > >> > } > > >> > public MapPage() { > >> > map = new MapWidget(); > >> > map.setZoomLevel(2); > >> > map.setSize("100%", "100%"); > > >> > // Add some controls for the zoom level > >> > map.addControl(new LargeMapControl()); > > >> > // remember InfoWindow > >> > info = map.getInfoWindow(); > > >> > // initialise newMarketobject > >> > this.createNewMarker(); > > >> > map.addMapClickHandler(new MapClickHandler() { > >> > public void onClick(MapClickEvent event) { > >> > if (newMarker != null) { > >> > newMarker.setVisible(false); > >> > } > >> > LatLng point = event.getLatLng(); > >> > newMarker.setLatLng(point); > >> > map.addOverlay(newMarker); > > >> > info.open(newMarker, new > >> > InfoWindowContent("heouhr oehro eh")); > >> > } > >> > }); > >> > map.setVisible(true); > >> > add(map); > >> > } > >> > } > > >> > Any idea why I see some errors? > > >> > Cheers > > >> -- > >> Eric Z. Ayers - GWT Team - Atlanta, GA > >> USAhttp://code.google.com/webtoolkit/ > > -- > Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://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 -~----------~----~----~----~------~----~------~--~---
