branflake2267 / GWT-Maps-V3-Api

GWT Maps V3 Javascript Bindings
Other
144 stars 113 forks source link

Passing widgets for InfoWindows not working #200

Closed markusolsson closed 10 years ago

markusolsson commented 10 years ago

I'm trying to display widgets in InfoWindows just like you do in the showcase InfoWindowMapWidget.

That code works, but I run into problems when passing a widget to the GWT Maps API instead of creating it within the API.

Problem appears after clicking a marker, closing the InfoWindow and clicking the marker again.

This is the stacktrace I get:

07:41:23.339 [ERROR] [connect] (Node.java:-1) 2014-01-27 07:41:23,338 [ERROR] Exception caught
com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(6531)]): this.removeChild is not a function
    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.gwt.dom.client.Node$.removeChild$(Node.java)
    at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:71)
    at com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:202)
    at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:96)
    at com.google.gwt.user.client.ui.FlowPanel.add(FlowPanel.java:44)
    at com.google.gwt.maps.client.events.MapPanel.add(MapPanel.java:43)
    at com.google.gwt.maps.client.overlays.InfoWindowOptions$.setContent$(InfoWindowOptions.java:64)
    at se.codemill.gwt.maps.client.maps.GoogleMapsWidget3Impl.drawInfoWindow2(GoogleMapsWidget3Impl.java:938)
    at se.codemill.gwt.maps.client.maps.GoogleMapsWidget3Impl.access$6(GoogleMapsWidget3Impl.java:913)
    at se.codemill.gwt.maps.client.maps.GoogleMapsWidget3Impl$6.onEvent(GoogleMapsWidget3Impl.java:379)
    at se.codemill.gwt.maps.client.maps.GoogleMapsWidget3Impl$6.onEvent(GoogleMapsWidget3Impl.java:1)
    at com.google.gwt.maps.client.events.MapHandlerRegistration.formatEvent(MapHandlerRegistration.java:201)
    at com.google.gwt.maps.client.events.MapHandlerRegistration.onCallback(MapHandlerRegistration.java:183)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:744)

We're using the gwt-maps-api-3.10.0-alpha-6.jar and GWT version 2.6.0-rc3

twistedpair commented 10 years ago

@markusolsson Can you provide the code of a simple case that reproduces this error? Thanks.

markusolsson commented 10 years ago

Hi, I'm not able to reproduce it anymore so I'll close this ticket

BR Markus

twistedpair commented 10 years ago

Thanks for your help @markusolsson.