comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java @ 1365:4c65c5b60a86

First step of refactoring the map creation - implemented a MapOutputService. flys-client/trunk@3066 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 25 Oct 2011 10:29:37 +0000
parents 9981ba2ee13a
children 9085cffbb7c4
comparison
equal deleted inserted replaced
1364:9981ba2ee13a 1365:4c65c5b60a86
41 import de.intevation.flys.client.shared.model.OutputMode; 41 import de.intevation.flys.client.shared.model.OutputMode;
42 42
43 import de.intevation.flys.client.client.Config; 43 import de.intevation.flys.client.client.Config;
44 import de.intevation.flys.client.client.services.StepForwardService; 44 import de.intevation.flys.client.client.services.StepForwardService;
45 import de.intevation.flys.client.client.services.StepForwardServiceAsync; 45 import de.intevation.flys.client.client.services.StepForwardServiceAsync;
46 import de.intevation.flys.client.client.services.MapOutputService;
47 import de.intevation.flys.client.client.services.MapOutputServiceAsync;
46 import de.intevation.flys.client.client.event.RedrawRequestHandler; 48 import de.intevation.flys.client.client.event.RedrawRequestHandler;
47 import de.intevation.flys.client.client.event.RedrawRequestEvent; 49 import de.intevation.flys.client.client.event.RedrawRequestEvent;
48 import de.intevation.flys.client.client.ui.CollectionView; 50 import de.intevation.flys.client.client.ui.CollectionView;
49 import de.intevation.flys.client.client.ui.OutputTab; 51 import de.intevation.flys.client.client.ui.OutputTab;
50 import de.intevation.flys.client.client.ui.ThemePanel; 52 import de.intevation.flys.client.client.ui.ThemePanel;
59 public static final String WSPLGEN_FACET = "floodmap.wsplgen"; 61 public static final String WSPLGEN_FACET = "floodmap.wsplgen";
60 62
61 63
62 protected StepForwardServiceAsync feedService = 64 protected StepForwardServiceAsync feedService =
63 GWT.create(StepForwardService.class); 65 GWT.create(StepForwardService.class);
66
67 protected MapOutputServiceAsync mapService =
68 GWT.create(MapOutputService.class);
64 69
65 protected MapToolbar controlPanel; 70 protected MapToolbar controlPanel;
66 protected ThemePanel themePanel; 71 protected ThemePanel themePanel;
67 protected Widget mapPanel; 72 protected Widget mapPanel;
68 73
76 CollectionView collectionView 81 CollectionView collectionView
77 ){ 82 ){
78 super(title, collection, collectionView, mode); 83 super(title, collection, collectionView, mode);
79 84
80 floodMap = new FloodMap(getSrid(), getMaxExtent()); 85 floodMap = new FloodMap(getSrid(), getMaxExtent());
86
87 mapService.doOut(collection, "http://localhost:8181",
88 new AsyncCallback<Void>() {
89 public void onFailure(Throwable caught) {
90 GWT.log("MAP ERROR: " + caught.getMessage());
91 }
92
93 public void onSuccess(Void v) {
94 GWT.log("MAP SUCCESS!");
95 }
96 }
97 );
81 98
82 initLayout(); 99 initLayout();
83 initLayers(); 100 initLayers();
84 initBarriers(); 101 initBarriers();
85 } 102 }

http://dive4elements.wald.intevation.org