Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java @ 5612:4f935415bb20
Hopefully fix for some map resizing issues.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Tue, 09 Apr 2013 15:32:46 +0200 |
parents | 8d0af912351c |
children |
rev | line source |
---|---|
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import com.google.gwt.core.client.GWT; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import com.google.gwt.user.client.rpc.AsyncCallback; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
5 import com.smartgwt.client.types.VerticalAlignment; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import com.smartgwt.client.util.SC; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
7 import com.smartgwt.client.widgets.Canvas; |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
8 import com.smartgwt.client.widgets.Label; |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
9 import com.smartgwt.client.widgets.events.ParentMovedEvent; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
10 import com.smartgwt.client.widgets.events.ParentMovedHandler; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
11 import com.smartgwt.client.widgets.events.ResizedEvent; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
12 import com.smartgwt.client.widgets.events.ResizedHandler; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
13 import com.smartgwt.client.widgets.events.VisibilityChangedEvent; |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
14 import com.smartgwt.client.widgets.events.VisibilityChangedHandler; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
15 import com.smartgwt.client.widgets.layout.VLayout; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
16 import com.smartgwt.client.widgets.tab.events.TabSelectedEvent; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
17 import com.smartgwt.client.widgets.tab.events.TabSelectedHandler; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
19 import de.intevation.flys.client.client.Config; |
4801
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
20 import de.intevation.flys.client.client.FLYS; |
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
21 import de.intevation.flys.client.client.FLYSConstants; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
22 import de.intevation.flys.client.client.services.MapInfoService; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
23 import de.intevation.flys.client.client.services.MapInfoServiceAsync; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
24 import de.intevation.flys.client.client.ui.map.FloodMap; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
25 import de.intevation.flys.client.client.ui.map.MapPanel; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 import de.intevation.flys.client.shared.model.Data; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 import de.intevation.flys.client.shared.model.DataItem; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 import de.intevation.flys.client.shared.model.DataList; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 import de.intevation.flys.client.shared.model.DefaultData; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 import de.intevation.flys.client.shared.model.DefaultDataItem; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 import de.intevation.flys.client.shared.model.MapInfo; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
33 import java.util.List; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
34 |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
35 import org.gwtopenmaps.openlayers.client.Map; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
36 import org.gwtopenmaps.openlayers.client.control.Attribution; |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
37 import org.gwtopenmaps.openlayers.client.layer.TransitionEffect; |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
38 import org.gwtopenmaps.openlayers.client.layer.WMS; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
39 import org.gwtopenmaps.openlayers.client.layer.WMSOptions; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
40 import org.gwtopenmaps.openlayers.client.layer.WMSParams; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
41 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
43 public class DigitizePanel |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
44 extends SelectProvider |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
45 implements TabSelectedHandler, VisibilityChangedHandler { |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
4131
360e22afb98b
Cosmetics, warnings and minor TODOs.
Christian Lins <christian.lins@intevation.de>
parents:
4062
diff
changeset
|
47 private static final long serialVersionUID = 3529775660871273314L; |
360e22afb98b
Cosmetics, warnings and minor TODOs.
Christian Lins <christian.lins@intevation.de>
parents:
4062
diff
changeset
|
48 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 protected MapInfoServiceAsync mapInfo = GWT.create(MapInfoService.class); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 protected FloodMap floodMap; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
53 protected MapPanel mapPanel; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 public static final String UESK_BARRIERS = "uesk.barriers"; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
4801
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
57 /** The message class that provides i18n strings. */ |
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
58 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 public DigitizePanel() { |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 @Override |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 public Canvas create(DataList list) { |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
66 helperContainer.addVisibilityChangedHandler(this); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
67 |
872
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
68 DataList clone = (DataList) list.clone(); |
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
69 List<Data> all = clone.getAll(); |
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
70 all.remove(UESK_BARRIERS); |
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
71 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
72 Canvas widget = createWidget(list); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 final Config cfg = Config.getInstance(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 final String locale = cfg.getLocale(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 |
873
77a549772aa9
Query MapInfo object for correct river (was hard coded).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
872
diff
changeset
|
77 String river = getDataValue("state.winfo.river", "river"); |
1425
bc06a671ef60
Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1389
diff
changeset
|
78 mapInfo.getMapInfo(locale, river, new AsyncCallback<MapInfo>() { |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
79 @Override |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 public void onFailure(Throwable caught) { |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 String msg = caught.getMessage(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 GWT.log("Error while fetching MapInfo: " + msg); |
4801
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
84 SC.warn(FLYS.getExceptionString(MSG, caught)); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
87 @Override |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 public void onSuccess(MapInfo info) { |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
89 createMapWidget(info); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 }); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
93 return widget; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
97 /** |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
98 * This method creates the content of the widget. |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
99 * |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
100 * @param data The {@link DataList} object. |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
101 * |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
102 * @return a combobox. |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
103 */ |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
104 @Override |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
105 protected Canvas createWidget(DataList data) { |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
106 GWT.log("DigitizePanel - createWidget()"); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
107 |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
108 VLayout layout = new VLayout(); |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
109 layout.setAlign(VerticalAlignment.TOP); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
110 layout.setHeight(25); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
111 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
112 int size = data.size(); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
113 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
114 for (int i = 0; i < size; i++) { |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
115 Data d = data.get(i); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
116 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
117 Label label = new Label(d.getDescription()); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
118 label.setValign(VerticalAlignment.TOP); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
119 label.setHeight(20); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
120 label.setWidth(400); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
121 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
122 layout.addMember(label); |
4574
32a4651eef93
flys-client: Shapefile upload widget readded again (regression).
Christian Lins <christian.lins@intevation.de>
parents:
4553
diff
changeset
|
123 layout.addMember(getNextButton()); |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
124 } |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
125 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
126 layout.setAlign(VerticalAlignment.TOP); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
127 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
128 return layout; |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
129 } |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
130 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
131 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 @Override |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 protected Data[] getData() { |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
134 final Data[] total = new Data[1]; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
136 if (floodMap != null) { |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
137 DataItem item = new DefaultDataItem( |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
138 UESK_BARRIERS, UESK_BARRIERS, floodMap.getFeaturesAsGeoJSON()); |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
139 total[0] = new DefaultData( |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
140 UESK_BARRIERS, null, null, new DataItem[] { item }); |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
141 } |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
142 else { |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
143 // Happens when OpenLayers is missing |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
144 GWT.log("floodMap is null -> OpenLayers missing?"); |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
145 } |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 return total; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
151 public void createMapWidget(MapInfo mapInfo) { |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
152 mapPanel = new MapPanel(mapInfo, true); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 floodMap = mapPanel.getFloodMap(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
155 Map map = floodMap.getMap(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
156 |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
157 helperContainer.addResizedHandler(new ResizedHandler() { |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
158 @Override |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
159 public void onResized(ResizedEvent event) { |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
160 mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight()); |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
161 } |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
162 }); |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
163 helperContainer.addParentMovedHandler(new ParentMovedHandler() { |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
164 @Override |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
165 public void onParentMoved(ParentMovedEvent event) { |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
166 mapPanel.getFloodMap().updateSize(); |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
167 } |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
168 }); |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
169 helperContainer.addVisibilityChangedHandler(new VisibilityChangedHandler() { |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
170 @Override |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
171 public void onVisibilityChanged(VisibilityChangedEvent event) { |
5539
8d0af912351c
Revert config.yaml to usable version.
Christian Lins <christian.lins@intevation.de>
parents:
5538
diff
changeset
|
172 mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight()); |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
173 } |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
174 }); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
175 helperContainer.addMember(mapPanel); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
176 |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
177 parameterList.registerCollectionViewTabHandler(this); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
178 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
179 WMS axis = getLayer( |
4632
02cf2b1dff84
Make floodmap riveraxis layer name configurable.
Christian Lins <christian.lins@intevation.de>
parents:
4574
diff
changeset
|
180 mapInfo.getWmsUrl(), mapInfo.getWmsLayers(), |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
181 mapInfo.getProjection(), false, true); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
182 WMS back = getLayer( |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
183 mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(), |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
184 mapInfo.getProjection(), false, false); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
185 |
4553
fac54b8470d4
Map view in DigitizePanel now shows OSM background, river axis and
Christian Lins <christian.lins@intevation.de>
parents:
4476
diff
changeset
|
186 map.addLayer(back); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
187 map.addLayer(axis); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
188 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
189 String hws = getDataValue("state.winfo.uesk.dc-hws", "uesk.hws"); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
190 if (hws != null && hws.length() > 0) { |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
191 WMS hwsLayer = getLayer( |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
192 //TODO: Use Mapinfo to get hws layer infos. |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
193 mapInfo.getWmsUrl().replace("river", "user"), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
194 "ms_layer-hws-lines" + artifact.getUuid(), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
195 mapInfo.getProjection(), |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
196 false, true); |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
197 map.addLayer(hwsLayer); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
198 } |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
199 String userRgd = getDataValue("state.winfo.uesk.user-rgd", "uesk.user-rgd"); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
200 if (userRgd != null && userRgd.length() > 0) { |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
201 WMS userLayer = getLayer( |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
202 //TODO: Use Mapinfo to get hws layer infos. |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
203 mapInfo.getWmsUrl().replace("river", "user"), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
204 "ms_layer-user-rgd" + artifact.getUuid(), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
205 mapInfo.getProjection(), |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
206 false, true); |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
207 map.addLayer(userLayer); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
208 } |
5032
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
209 map.addControl(new Attribution()); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
210 map.zoomToMaxExtent(); |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
211 |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
212 mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight()); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
213 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
214 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
215 |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
216 protected WMS getLayer(String url, String layers, String proj, boolean isBaseLayer, boolean singleTiled) { |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
217 final WMSParams params = new WMSParams(); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
218 params.setLayers(layers); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
219 params.setFormat("image/png"); |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
220 params.setIsTransparent(!isBaseLayer); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
221 |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
222 final WMSOptions opts = new WMSOptions(); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
223 opts.setProjection(proj); |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
224 opts.setSingleTile(false); // FIXME: Make working... |
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
225 opts.setTransitionEffect(TransitionEffect.RESIZE); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
226 opts.setRatio(1); |
1302
17e7d5e437fb
Bumped OpenLayers to version 2.11 and GWT-OpenLayers to version 0.6
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
915
diff
changeset
|
227 opts.setBuffer(0); |
5032
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
228 if (layers.equals("OSM-WMS-Dienst")) { |
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
229 opts.setAttribution(MSG.attribution()); |
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
230 } |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
231 final WMS wms = new WMS(layers, url, params, opts); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
232 wms.setIsVisible(true); |
5612
4f935415bb20
Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents:
5539
diff
changeset
|
233 wms.setIsBaseLayer(isBaseLayer); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
234 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
235 return wms; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
236 } |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
237 |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
238 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
239 @Override |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
240 public void onTabSelected(TabSelectedEvent tse) { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
241 if (tse.getTabNum () != 0) { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
242 floodMap.hideBarrierLayer(); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
243 } |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
244 else { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
245 floodMap.showBarrierLayer(); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
246 } |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
247 } |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
248 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
249 @Override |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
250 public void onVisibilityChanged(VisibilityChangedEvent vce) { |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
251 if (!vce.getIsVisible()) { |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
252 floodMap.hideBarrierLayer(); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
253 mapPanel.getMapToolbar().activateDrawFeature(false); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
254 } |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
255 else { |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
256 floodMap.showBarrierLayer(); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
257 } |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
258 } |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
259 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
260 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |