changeset 9701:0caaca0df028

another try for river axis legend
author dnt_bjoernsen <d.tironi@bjoernsen.de>
date Wed, 20 Jan 2021 19:25:47 +0100
parents b2768f367dff
children 20456a3c92e2
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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() {

http://dive4elements.wald.intevation.org