Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java @ 1377:b0fe35d4ce6b
Added a 'zoom to layer' menu item to the map theme panel which triggers a zoom to the specific layer/theme.
flys-client/trunk@3122 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 31 Oct 2011 11:52:42 +0000 |
parents | 28eb4dfe2cbf |
children | 78542ff1f562 |
comparison
equal
deleted
inserted
replaced
1376:28eb4dfe2cbf | 1377:b0fe35d4ce6b |
---|---|
399 | 399 |
400 map.raiseLayer(layers[0], (newIdx-oldIdx)*-1); | 400 map.raiseLayer(layers[0], (newIdx-oldIdx)*-1); |
401 map.zoomTo(map.getZoom()-1); | 401 map.zoomTo(map.getZoom()-1); |
402 map.zoomTo(map.getZoom()+1); | 402 map.zoomTo(map.getZoom()+1); |
403 } | 403 } |
404 }, | |
405 new MapThemePanel.LayerZoomCallback() { | |
406 public void onLayerZoom(Theme theme, String extent) { | |
407 Bounds zoomTo = boundsFromString(extent); | |
408 | |
409 if (zoomTo == null) { | |
410 GWT.log("WARNING: No valid bounds for zooming found!"); | |
411 return; | |
412 } | |
413 | |
414 getMap().zoomToExtent(zoomTo); | |
415 } | |
404 } | 416 } |
405 ); | 417 ); |
406 c.addChild(themePanel); | 418 c.addChild(themePanel); |
407 | 419 |
408 return c; | 420 return c; |