Hi,
In my project I'm using Smart GWT and GWT OpenLayers (http://gwt-openlayers.sourceforge.net/). GWT OpenLayers has a GWT widget called MapWidget which contains a map.
I'm trying to put my map into a VLayout and have it fill up all available space. However, when I run my application the MapWidget always has a height of 0px. The code I'm using to add my MapWidget is as follows:
VLayout mapLayout = new VLayout();
mapLayout.setWidth100();
mapLayout.setHeight100();
mapLayout.setBackgroundColor("#FFFF99");
mapWidget = createMap();
mapLayout.addMember(mapWidget);
When I create my MapWidget, I try to make its size 100% by calling the widgets setWidth and setHeight methods. This all happens in createMap(). When I use the same createMap() method in a pure GWT application it works fine, so I don't think there's an issue there. I'm pretty sure the problem is with Smart GWT.
Has anybody has a similar problem before? Does anybody know how I might solve this?
Thanks!
Jon
In my project I'm using Smart GWT and GWT OpenLayers (http://gwt-openlayers.sourceforge.net/). GWT OpenLayers has a GWT widget called MapWidget which contains a map.
I'm trying to put my map into a VLayout and have it fill up all available space. However, when I run my application the MapWidget always has a height of 0px. The code I'm using to add my MapWidget is as follows:
VLayout mapLayout = new VLayout();
mapLayout.setWidth100();
mapLayout.setHeight100();
mapLayout.setBackgroundColor("#FFFF99");
mapWidget = createMap();
mapLayout.addMember(mapWidget);
When I create my MapWidget, I try to make its size 100% by calling the widgets setWidth and setHeight methods. This all happens in createMap(). When I use the same createMap() method in a pure GWT application it works fine, so I don't think there's an issue there. I'm pretty sure the problem is with Smart GWT.
Has anybody has a similar problem before? Does anybody know how I might solve this?
Thanks!
Jon
Comment