OpenLayers Wrapper: detach / re-attach issues

Hi,

I have the following issue with the OpenLayers Wrapper component:

When I remove the component from its current layout, and then add it to another layout, only some controls are displayed and the map itself is not visible. It seems the component can’t handle being detached and then re-attached.

I need this for implementing a generic “maximize” functionality where I replace the content in an outer layout with a the component that was in one of the child layouts (and the “restore” functionality where the component is re-inserted in its original layout).

Pressing F5 (browser refresh) makes the map component visible again (although the map location is reset).

For other components, like InvientCharts, this works as expected, so I really think the issue is in the OpenLayers Wrapper component.

Does anyone have any idea what could be wrong or how to work around it?

Thanks

Hi,

Do you have a simple test case for this? I’m going to work on this project a bit next week so I could look into this if you post an issue report with a test case to the project page.

A workaround that could work: create new map instead of recycling old.

cheers,
matti

I’ve created
Issue 90
for this, including a small piece of code that mimics what I’m doing: adding an attached map to a different layout (thereby implicitly removing it from the original layout it was in) at the click of a button.

Thanks for looking into this.
Herman

Matti,
Were you able to look into this issue?

Thanks
Herman

Hi,

I worked an hour last week with the project, but didn’t get into this yet. Just reviewed and committed one patch.

cheers,
matti

Hi,

The issue should now be tackled in SVN. Can you build a snapshot (simply “mvn install” should do it) and verify things work in your app?

cheers,
matti

I’ve already tested the sample code I posted in the issue and at least that’s working great now.
I hope to be able to try tomorrow at work as well.

Thanks for the quick resolution!

Herman

For some reason it still fails in the project at work, still exactly the same problem (I did recompile the widgetset).
I’ll try to find out what the difference is between this and the test example and report back here.

For some reason I was still not using the latest widgetset (I guess I still don’t fully understand the Eclipse+WTP+M2E+GWT+Vaadin interaction).
Now that I am, I noticed that it’s better, but not completely fixed. When reattaching, the map is drawn, but if the layout slot is bigger than the one when detaching, the additional tiles are blank. A browser refresh is needed to load them. I added new test code to issue 90 to show this behaviour.

Thanks
Herman