comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java @ 5813:e0ab5a566688

Rework FeatureInfo Window fopr issue 775 Looks much better now :)
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 24 Apr 2013 14:58:14 +0200
parents af2aa716152f
children a4ff4167be1e
comparison
equal deleted inserted replaced
5812:c24820c235d9 5813:e0ab5a566688
18 import de.intevation.flys.client.client.FLYSConstants; 18 import de.intevation.flys.client.client.FLYSConstants;
19 import de.intevation.flys.client.client.services.GFIService; 19 import de.intevation.flys.client.client.services.GFIService;
20 import de.intevation.flys.client.client.services.GFIServiceAsync; 20 import de.intevation.flys.client.client.services.GFIServiceAsync;
21 import de.intevation.flys.client.shared.model.FacetRecord; 21 import de.intevation.flys.client.shared.model.FacetRecord;
22 import de.intevation.flys.client.shared.model.Theme; 22 import de.intevation.flys.client.shared.model.Theme;
23 import de.intevation.flys.client.shared.model.AttributedTheme;
23 import de.intevation.flys.client.client.ui.ThemePanel; 24 import de.intevation.flys.client.client.ui.ThemePanel;
24 25
25 26
26 public class GetFeatureInfo implements MapClickListener { 27 public class GetFeatureInfo implements MapClickListener {
27 28
57 map.removeListener(this); 58 map.removeListener(this);
58 } 59 }
59 } 60 }
60 61
61 62
62 protected void newGetFeatureInfoWindow(List<FeatureInfo> features) { 63 protected void newGetFeatureInfoWindow(List<FeatureInfo> features, String title) {
63 if (gfiWindow != null) { 64 if (gfiWindow != null) {
64 gfiWindow.destroy(); 65 gfiWindow.destroy();
65 } 66 }
66 67
67 gfiWindow = new GetFeatureInfoWindow(features); 68 gfiWindow = new GetFeatureInfoWindow(features, title);
68 gfiWindow.show(); 69 gfiWindow.show();
69 } 70 }
70 71
71 72
72 @Override 73 @Override
78 SC.say(MSG.requireTheme()); 79 SC.say(MSG.requireTheme());
79 } 80 }
80 81
81 for (ListGridRecord rec : themePanel.getSelectedRecords()) { 82 for (ListGridRecord rec : themePanel.getSelectedRecords()) {
82 Theme act_theme = ((FacetRecord)rec).getTheme(); 83 Theme act_theme = ((FacetRecord)rec).getTheme();
84 final AttributedTheme at = (AttributedTheme)act_theme;
83 gfiService.query( 85 gfiService.query(
84 act_theme, 86 act_theme,
85 infoFormat, 87 infoFormat,
86 map.getExtent().toString(), 88 map.getExtent().toString(),
87 map.getProjection(), 89 map.getProjection(),
95 } 97 }
96 98
97 @Override 99 @Override
98 public void onSuccess(List<FeatureInfo> features) { 100 public void onSuccess(List<FeatureInfo> features) {
99 if (features != null && !features.isEmpty()) 101 if (features != null && !features.isEmpty())
100 newGetFeatureInfoWindow(features); 102 newGetFeatureInfoWindow(features, at.getAttr("description"));
101 } 103 }
102 } 104 }
103 ); 105 );
104 break; // More intelligent handling when more then one is selected 106 break; // More intelligent handling when more then one is selected
105 } 107 }

http://dive4elements.wald.intevation.org