annotate gnv/src/main/webapp/scripts/olutils.jsp @ 987:42da41835b54

Rename olutils.js to olutils.jsp to enable possibility of i18n in this file. gnv/trunk@1173 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 08 Jun 2010 12:54:10 +0000
parents
children e3301755bd3c
rev   line source
987
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 function handleMeasurements(event) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 var geometry = event.geometry;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 var units = event.units;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5 var order = event.order;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
6 var measure = event.measure;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 var element = document.getElementById('measurements');
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 var out = "";
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 if(order == 1) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 out += "L\u00e4nge: " + measure.toFixed(3) + " " + units;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 } else {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 out += "Fl\u00e4che: " + measure.toFixed(3) + " " + units + "<sup>2</sup>";
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 element.innerHTML=out;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 };
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 function readWMC(merge) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 var layers = mapPanel.layers;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 map = mapPanel.map;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 var format = new OpenLayers.Format.WMC({'layerOptions': {buffer: 0}});
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 var text = document.getElementById("wmc").value;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28 merge = true;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 if(merge) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30 try {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31 map = format.read(text, {map: map});
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 } catch(err) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 document.getElementById("wmc").value = err;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 } else {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 map.destroy();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 try {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 var jsonFormat = new OpenLayers.Format.JSON();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 var mapOptions = jsonFormat.read();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 map = format.read(text, {map: mapOptions});
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 } catch(err) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 document.getElementById("wmc").value = err;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 // create MapPanel
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 mapPanel = new GeoExt.MapPanel({
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 border: true,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 title: "Karte",
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 region: "center",
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 map: map,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 zoom: 1,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 layers: map.layers
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 });
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 function writeWMC(merge) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59 var format = new OpenLayers.Format.WMC({'layerOptions': {buffer: 0}});
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
60
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
61 try {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
62 var text = format.write(map);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63 document.getElementById("wmc").value = text;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
64 } catch(err) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65 document.getElementById("wmc").value = err;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
66 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
67 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
70
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
71 function toggleGetFeatureInfo(evt) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
72 if (infoActive) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
73 infoControls.click.deactivate();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
74 infoActive = false;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
75 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 else {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
77 infoControls.click.activate();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
78 infoActive = true;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
79 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
80 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
81
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
82
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
83 function showInfo(evt) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
84 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
85
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
86
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
87 function addLayer() {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
88 var record = grid.getSelectionModel().getSelected();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
89
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
90 if (record) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
91 var copy = record.copy();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
92 copy.set("layer", record.get("layer"));
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
93 copy.get("layer").mergeNewParams({
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
94 format: "image/png",
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
95 transparent: true
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
96 });
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
97
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
98 mapPanel.layers.add(copy);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
99 mapPanel.map.zoomToExtent(OpenLayers.Bounds.fromArray(copy.get("llbbox")));
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
100 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
101 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
102
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
103
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
104 // this is just copied from OpenLayers.Util
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
105 function urlAppend(url, paramStr) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
106 var newUrl = url;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
107 if(paramStr) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
108 var parts = (url + " ").split(/[?&]/);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
109 newUrl += (parts.pop() === " " ?
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
110 paramStr :
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
111 parts.length ? "&" + paramStr : "?" + paramStr);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
112 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
113 return newUrl;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
114 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
115
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
116
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
117 function updateCapabilities() {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
118 var ele = Ext.Element.get('capfield');
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
119
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
120 var url = ele.getValue();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
121 var service = "SERVICE=WMS";
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
122 var request = "REQUEST=GetCapabilities";
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
123 url = urlAppend(url, service);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
124 url = urlAppend(url, request);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
125
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
126 store = new GeoExt.data.WMSCapabilitiesStore({
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
127 url: url
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
128 });
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
129 store.load();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
130
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
131 grid.destroy();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
132 grid = new Ext.grid.GridPanel({
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
133 id: 'wmsgrid',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
134 collapsible: false,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
135 split: false,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
136 border: true,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
137 // TODO: autoHeight might cause trouble
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
138 autoHeight: true,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
139 overflow: 'auto',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
140 store: store,
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
141 cm: new Ext.grid.ColumnModel([
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
142 {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
143 header: '<bean:message key="gnviewer.mapclient.wms.load.grid.name"/>',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
144 dataIndex: 'name',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
145 sortable: true
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
146 },
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
147 {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
148 id: 'title',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
149 header: '<bean:message key="gnviewer.mapclient.wms.load.grid.title"/>',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
150 dataIndex: 'title',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
151 sortable: true
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
152 }]),
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
153 renderTo: 'capgrid',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
154 bbar: [{
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
155 text: '<bean:message key="gnviewer.mapclient.wms.load.addlayer"/>',
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
156 handler: addLayer
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
157 }]
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
158 });
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
159 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
160
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
161
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
162 function editFeature(e) {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
163 var feature = e.feature;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
164
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
165 // TODO SET FEATURE ATTRIBUTES
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
166 //feature.attributes['lawa'] = 999;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
167 //feature.attributes['lawa_id'] = 999;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
168 //feature.attributes['w_gwk_lawa'] = 999;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
169 //feature.attributes['w_wrrl'] = 999;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
170 //feature.attributes['length_fee'] = 999;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
171 }
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
172
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
173 function updateControls() {
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
174 var controls = panel.controls;
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
175
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
176 controls.remove(drawPointControl);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
177 controls.remove(drawPathControl);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
178 controls.remove(drawPolygonControl);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
179
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
180 panel.destroy();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
181 panel = new OpenLayers.Control.Panel();
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
182 panel.addControls(controls);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
183
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
184 if (points.getVisibility())
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
185 panel.addControls(drawPointControl);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
186 if (lines.getVisibility())
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
187 panel.addControls(drawPathControl);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
188 if (polygons.getVisibility())
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
189 panel.addControls(drawPolygonControl);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
190
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
191 map.addControl(panel);
42da41835b54 Rename olutils.js to olutils.jsp to enable possibility of i18n in this file.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
192 }

http://dive4elements.wald.intevation.org