From: Thierry T. <te...@ya...> - 2009-10-26 17:50:39
|
Hello, I try to update the size of a map according to the size of its resizable container. I handle the resize event of the container and try to notify map and its layers to be also resized but it seems not to work. My maps come from geoserver and are displayed using GWT and GWT-Ext... Here is my code: mapWidget.setSize(panel.getWidth()+"px", panel.getHeight()+"px"); //mapWidget.getMap().updateSize(); Layer[] layers = mapWidget.getMap().getLayers(); for (Layer layer : layers) { JSObject props = layer.getJSObject(); props.setProperty("width", panel.getWidth()); props.setProperty("height", panel.getHeight()); layer.redraw(true); } panel.doLayout(false); Is my code correct or/and is there another way to do? Moreover I'm astonished not to find the updateSize on the map object. This one seems to implement this feature... Thanks very much for your answer and your great tool!! Thierry |