mstahv / v-leaflet

Leaflet add-on for Vaadin
Other
43 stars 38 forks source link

Error when remove LPopup from LMap #81

Closed gbuompastore closed 9 years ago

gbuompastore commented 9 years ago

I'm using v-leaflet plugin with LPopup as component. When i add LPopup to map it works, but when i try to remove LPopup, using removeComponent ( lmap method), i get this error from the browser console:

Wed May 13 11:19:49 GMT+200 2015 com.vaadin.client.ApplicationConnection SEVERE: Error sending hierarchy change eventscom.google.gwt.event.shared.UmbrellaException: Exception caught: undefined at Unknown.Eg(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.Ig(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.Og(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown._x(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.cy(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.zx(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.JEb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.XEb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.hSb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.cSb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.nRb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.lRb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.S1b(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.eval(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.ti(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.wi(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.eval(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown._f(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5) at Unknown._invokeFunction(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5) at Unknown._invokeCallback(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5) at Unknown.jQuery.atmosphere.AtmosphereRequest._websocket.onmessage(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5) Caused by: java.lang.ClassCastException at Unknown.Eg(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.Mg(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown._Vd(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.dE(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.Zbe(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.mUb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.Ix(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.zx(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.JEb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.XEb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.hSb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.cSb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.nRb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.lRb(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.S1b(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.eval(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.ti(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.wi(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown.eval(com.lucana.sigeosh.widgetset.SigeoshWidgetset-0.js) at Unknown._f(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5) at Unknown._invokeFunction(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5) at Unknown._invokeCallback(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5) at Unknown.jQuery.atmosphere.AtmosphereRequest._websocket.onmessage(http://localhost:8080/sigeosh/VAADIN/vaadinPush.debug.js?v=7.4.5)

mstahv commented 9 years ago

I can't reproduce this issue. Which version of v-leaflet are you using? On which browser does the issue happen?

gbuompastore commented 9 years ago

0.63, but i've found issue in 0.61/0.6.2 too. The issue is verified on all browser (IE11, Chrome 42, Firefox 37)

mstahv commented 9 years ago

Hi, I think there is something bit more complicated needed to reproduce the issue. I created a test and tried it with web socket push as well, but didn't manage to reproduce this. This is my test case: https://github.com/mstahv/v-leaflet/blob/6ba858fc8fa4a6cef2b7ab6798b0c75bca849ba4/src/test/java/org/vaadin/addon/leaflet/demoandtestapp/RemoveMarker.java

I'd be really helpful if you could provide a receded test case for me. Thanks in advance.

mstahv commented 9 years ago

Argh, I completely mixed Popup and Marker, easy to reproduce now with RemovePopup method. Sorry.

mstahv commented 9 years ago

0.6.4 now includes a fix for this issue.

gbuompastore commented 9 years ago

Thanks A Lot!