[PATCH] another try for river axis legend

Wald Commits scm-commit at wald.intevation.org
Wed Jan 20 19:25:55 CET 2021


# HG changeset patch
# User dnt_bjoernsen <d.tironi at bjoernsen.de>
# Date 1611167147 -3600
#      Wed Jan 20 19:25:47 2021 +0100
# Node ID 0caaca0df02876bb2d5182678e52a798c38d80db
# Parent  b2768f367dfff4c57354426ba9886bd102caacd2
another try for river axis legend

diff -r b2768f367dff -r 0caaca0df028 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java	Wed Jan 20 19:06:57 2021 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java	Wed Jan 20 19:25:47 2021 +0100
@@ -86,8 +86,8 @@
 //			url = " url " + ((Image) img).getUrl();
 			new MyLoadHandler(row, ((Image) img));
 
-		} else if (img instanceof Img) {
-			setDimensions(row, ((Img) img).getHeight(), ((Img) img).getWidth());
+//		} else if (img instanceof Img) {
+//			setDimensions(row, ((Img) img).getHeight(), ((Img) img).getWidth());
 //			url = " dataPath " + ((Img) img).getDataPath();
 		} else {
 			setDimensions(row, 150, 400); // not sure when this is executed
@@ -110,7 +110,7 @@
 		final String legend = at.getAttr("legend");
 		// TEST: final Image img = new Image("/images/FLYS_Donau.png"); (funktioniert!),
 		// ebenso FLYSResources.getTest();
-		if (legend != null && !"".equals(legend)) {
+//		if (legend != null && !"".equals(legend)) {
 
 			final String imgUrl = URL.encode(GWT.getHostPageBaseURL() + "images/wms_legend/" + legend);
 
@@ -118,14 +118,13 @@
 			new MyWMSLoadHandler(row, image);
 
 			return image;
-		}
-		final String imgUrl = MapUtils.getLegendGraphicUrl(at.getAttr("url"), at.getAttr("layers"));
+//		}
+//		final String imgUrl = MapUtils.getLegendGraphicUrl(at.getAttr("url"), at.getAttr("layers"));
+//		final Img img = new Img(imgUrl);
+//		img.setImageType(ImageStyle.CENTER);
+//		img.setAutoFit(true);
 
-		final Img img = new Img(imgUrl);
-		img.setImageType(ImageStyle.CENTER);
-		img.setAutoFit(true);
-
-		return img;
+//		return img;
 	}
 
 	private void init() {


More information about the Dive4Elements-commits mailing list