From: dan t. <dan...@go...> - 2010-03-11 19:43:55
|
Hi Chris, I've been wanted to do exactly the same thing. You just need to set everything to 100%, then add a DeferredCommand in your entry point method that calls map.updatesize(); For example... public void onModuleLoad() { ... final MapWidget mapWidget = new MapWidget("100%", "100%", config); ... DockLayoutPanel dp = new DockLayoutPanel(Unit.PCT); dp.setHeight("100%"); dp.setWidth("100%"); dp.add(mapWidget); RootLayoutPanel.get().add(dp); ... mapWidget.getMap().setCenter(new LonLat(lon, lat), zoom); DeferredCommand.addCommand(new Command() { @Override public void execute() { mapWidget.getMap().updateSize(); } }); } You can see the class in full here: * http://code.google.com/p/dantwining/source/browse/trunk/FullScreenMap/src/com/dantwining/webmap/client/FullScreenMap.java * On 8 March 2010 04:09, Christopher Navarro <cna...@gm...> wrote: > Is there a way to dynamically resize the Map in GWT-OL so that it takes up > all of the available browser window space? > > Thanks, > Chris > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |