changeset 835:c89a42950d11

Removed the digitize controls from map widget that is used in the floodmap state. flys-client/trunk@2548 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 24 Aug 2011 09:26:33 +0000
parents 77469d7f3c93
children 0fe456332785
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java
diffstat 2 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Aug 24 09:06:35 2011 +0000
+++ b/flys-client/ChangeLog	Wed Aug 24 09:26:33 2011 +0000
@@ -1,3 +1,9 @@
+2011-08-24  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java:
+	  The toolbar used in this map widget will no longer contain digitize
+	  controls.
+
 2011-08-24	Sascha L. Teichmann	<sascha.teichmann@intevation.de> 
 
 	* src/main/java/de/intevation/flys/client/shared/model/ArtifactFilter.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Wed Aug 24 09:06:35 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Wed Aug 24 09:26:33 2011 +0000
@@ -223,6 +223,10 @@
     protected String getGeoJSONFromDynamic(ArtifactDescription desc) {
         DataList list = desc.getCurrentData();
 
+        if (list == null) {
+            return null;
+        }
+
         List<Data> datas = list.getAll();
         for (Data data: datas) {
             String key = data.getLabel();
@@ -264,6 +268,11 @@
 
         for (int i = 1; i <= num; i++) {
             AttributedTheme theme = (AttributedTheme) themeList.getThemeAt(i);
+
+            if (theme == null) {
+                continue;
+            }
+
             String srid = theme.getAttr("srid");
 
             if (srid != null && srid.length() > 0) {
@@ -284,6 +293,11 @@
 
         for (int i = 1; i <= num; i++) {
             AttributedTheme theme = (AttributedTheme) themeList.getThemeAt(i);
+
+            if (theme == null) {
+                continue;
+            }
+
             String tmp = theme.getAttr("extent");
 
             if (theme.getActive() == 1) {
@@ -365,7 +379,7 @@
 
 
     protected MapToolbar createControlPanel(Canvas wrapper) {
-        return new MapToolbar(floodMap, wrapper);
+        return new MapToolbar(floodMap, wrapper, false);
     }
 
 

http://dive4elements.wald.intevation.org