annotate gnv/src/main/webapp/scripts/viewport.jsp @ 973:1bb54da8c8ed

Added more resources which are required to use the ol-client properly gnv/trunk@1141 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 01 Jun 2010 14:15:10 +0000
parents a0e6566cd111
children 5779220ebb80
rev   line source
971
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url=";
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 Ext.BLANK_IMAGE_URL = "scripts/openlayers/OpenLayers-2.9/theme/default/img/blank.gif";
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 /**
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5 * XXX
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
6 * Change specific attributes for map, wfs-t, etc here. Do not change these
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 * settings inline the code!
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 */
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 PROJECTION = "EPSG:4326";
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 PROJECTIONS = [PROJECTION, 'EPSG:4326'] // Projection used in projection selector
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 MAX_EXTENT = new OpenLayers.Bounds(-17.44,29.41,40.04,77.66);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 INITIAL_CENTER = new OpenLayers.LonLat(5, 55);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 Ext.onReady(function() {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 /* this function call initialized the layers that are defined by the user.
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 * The variable 'layer' and 'layers' are initialized in this function as
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 * well, that are used in the following code! So do not remove this function
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 * call.
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 */
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 initLayers();
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 var options = {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 maxExtent: MAX_EXTENT,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 projection: PROJECTION,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 zoom: 5,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 controls: [],
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28 units: 'm'
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 };
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 /* ------------------------ Create map and add controls ---------------------*/
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 // create map
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 map = new OpenLayers.Map(options);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 map.displayProjection = new OpenLayers.Projection(PROJECTION);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 // add controls
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 var nav = new OpenLayers.Control.NavigationHistory();
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 map.addControl(nav);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 panel = new OpenLayers.Control.Panel();
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 controls = {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 previous: nav.previous,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 next : nav.next,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 navigate: new OpenLayers.Control.MouseDefaults(
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 displayClass: 'olControlPan',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 title:'Verschieben der Karte'
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 ),
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 zoombox: new OpenLayers.Control.ZoomBox(
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 displayClass: 'olControlZoomBox',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56 title: 'Zum Zoomen ziehen Sie eine Box auf, indem Sie klicken und ziehen'
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 ),
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59 info : new OpenLayers.Control.WMSGetFeatureInfo({
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
60 displayClass: "olControlFeatureInfo",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
61 url: 'http://fluggs.wupperverband.de/wmsconnector/com.esri.wms.Esrimap/WV_WMS',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
62 title: 'Identify features by clicking',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63 queryVisible: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
64 eventListeners: {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65 getfeatureinfo: function(event) {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
66 mapPanel.map.addPopup(new OpenLayers.Popup.FramedCloud(
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
67 "chicken",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68 mapPanel.map.getLonLatFromPixel(event.xy),
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69 null,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
70 event.text,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
71 null,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
72 true
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
73 ));
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
74 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
75 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 })
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
77 };
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
78
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
79 for (var key in controls) {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
80 panel.addControls([controls[key]]);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
81 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
82
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
83 map.addControl(panel);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
84 map.addControl(new OpenLayers.Control.PanZoomBar({zoomWorldIcon: 'true'}));
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
85 map.addControl(new OpenLayers.Control.MouseDefaults());
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
86 map.addControl(new OpenLayers.Control.ScaleLine());
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
87 // Displaying the mouse postion
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
88 mousePosition = new OpenLayers.Control.MousePosition();
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
89 map.addControl(mousePosition);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
90
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
91 /* --------------------------------------------------------------------------- */
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
92
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
93 // create MapPanel
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
94 mapPanel = new GeoExt.MapPanel({
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
95 border: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
96 region: "center",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
97 map: map,
973
1bb54da8c8ed Added more resources which are required to use the ol-client properly
Tim Englich <tim.englich@intevation.de>
parents: 971
diff changeset
98 layers: layers
1bb54da8c8ed Added more resources which are required to use the ol-client properly
Tim Englich <tim.englich@intevation.de>
parents: 971
diff changeset
99
971
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
100 });
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
101
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
102 // map.setCenter(INITIAL_CENTER);
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
103
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
104 /* --------------------------- Layer Tree ----------------------------------- */
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
105
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
106
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
107 // LayerTree
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
108 var tree = new Ext.tree.TreePanel({
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
109 border: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
110 enableDD: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
111 region: "east",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
112 title: "LayerTree",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
113 width: 200,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
114 split: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
115 collapsible: false,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
116 collapseMode: "mini",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
117 autoScroll: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
118 loader: new Ext.tree.TreeLoader({
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
119 applyLoader: false,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
120 }),
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
121 root: {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
122 nodeType: "async",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
123 children: [{
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
124 nodeType: "gx_baselayercontainer",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
125 expanded: true
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
126 }, {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
127 nodeType: "gx_overlaylayercontainer",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
128 expanded: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
129 loader: {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
130 filter: function(record) {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
131 var layer = record.get("layer");
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
132 return layer.displayInLayerSwitcher === true &&
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
133 layer.isBaseLayer === false;
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
134 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
135 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
136 }]
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
137 },
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
138 rootVisible: false,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
139 lines: false
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
140 });
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
141
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
142 /*-------------------------------- Feature grid -------------------------------*/
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
143
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
144 // create legend panel
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
145 legendPanel = new GeoExt.LegendPanel({
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
146 id: 'legendpanel',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
147 dynamic: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
148 border: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
149 title: 'Legende',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
150 collapsible: false,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
151 split: false,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
152 defaults: {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
153 labelCls: 'legend',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
154 style: 'padding: 5px'
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
155 },
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
156 bodyStyle: 'padding:5px',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
157 width: 250,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
158 autoScroll: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
159 region: 'east'
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
160 //layerStore: mapPanel.layers
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
161 });
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
162
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
163
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
164 // use separate panels
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
165 // Create GUI
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
166
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
167 var mylegend = new Ext.Panel(
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
168 {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
169 region: "west",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
170 title: '',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
171 split: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
172 width: 250,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
173 minSize: 225,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
174 maxSize: 400,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
175 collapsible: false,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
176 overflow: 'auto',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
177 margins: '0 0 0 5',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
178 layout: 'accordion',
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
179 layoutConfig: {
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
180 animate: true,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
181 activeOnTop: false
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
182 },
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
183 items: [
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
184 tree,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
185 legendPanel
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
186 ]
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
187 }
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
188 );
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
189
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
190 // The main panel
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
191 new Ext.Panel({
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
192 renderTo: "mapcontainer",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
193 layout: "border",
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
194 width: 700,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
195 height: 420,
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
196 items: [mapPanel, mylegend]
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
197 });
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
198
a0e6566cd111 Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
199 });

http://dive4elements.wald.intevation.org