Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/scripts/viewport.jsp @ 1017:cce6596560e6
After resizing the window, the map panel is resized as well (currently just the width changes) (issue307).
gnv/trunk@1247 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 30 Jun 2010 05:50:46 +0000 |
parents | 3665834344a8 |
children | 4eb7fa8a36ed |
comparison
equal
deleted
inserted
replaced
1016:3665834344a8 | 1017:cce6596560e6 |
---|---|
98 mapPanel = new GeoExt.MapPanel({ | 98 mapPanel = new GeoExt.MapPanel({ |
99 border: true, | 99 border: true, |
100 region: "center", | 100 region: "center", |
101 map: map, | 101 map: map, |
102 layers: layers | 102 layers: layers |
103 | |
104 }); | 103 }); |
105 | 104 |
106 //map.setCenter(INITIAL_CENTER); | 105 //map.setCenter(INITIAL_CENTER); |
107 | 106 |
108 | 107 |
290 mapPanel | 289 mapPanel |
291 ] | 290 ] |
292 }); | 291 }); |
293 <%}%> | 292 <%}%> |
294 map.zoomToExtent(CURRENT_EXTENT); | 293 map.zoomToExtent(CURRENT_EXTENT); |
294 | |
295 // some code for automatically resizing the map panel if the window size | |
296 // changes | |
297 window.onresize=function() { | |
298 var mapcontainer = Ext.get('mapcontainer'); | |
299 mapPanel.setSize(mapcontainer.getSize()); | |
300 } | |
295 }); | 301 }); |