Mercurial > dive4elements > gnv-client
annotate gnv/src/main/webapp/scripts/viewport.jsp @ 1016:3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
gnv/trunk@1244 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 29 Jun 2010 15:41:10 +0000 |
parents | e2c4e9886dc3 |
children | cce6596560e6 |
rev | line source |
---|---|
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
1 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
2 <%@page import="de.intevation.gnv.action.MapClientStandaloneAction"%> |
984
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
3 <%@page import="de.intevation.gnv.artifactdatabase.objects.map.MapService"%> |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
4 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
5 <% |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
6 boolean standalone = request.getParameter(MapClientStandaloneAction.MAPCLIENTSTANDALONE_KEY) != null && |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
7 request.getParameter(MapClientStandaloneAction.MAPCLIENTSTANDALONE_KEY).equals("true"); |
984
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
8 MapService mapService = SessionModelFactory.getInstance().getSessionModel(request).getLocalMapService(); |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
9 %> |
1000
905cc67da916
Customize Look and Feel to styleguide of the bsh.
Tim Englich <tim.englich@intevation.de>
parents:
997
diff
changeset
|
10 OpenLayers.ImgPath = "images/ol/"; |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url="; |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
12 OpenLayers.Lang.setCode('<%=SessionModelFactory.getInstance().getSessionModel(request).getCurrentLocale().getLanguage() %>'); |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 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
|
14 |
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 * XXX |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 * 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
|
18 * settings inline the code! |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 */ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 PROJECTION = "EPSG:4326"; |
984
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
21 MAX_EXTENT = new OpenLayers.Bounds(-90,-180,90,180); |
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
22 CURRENT_EXTENT = new OpenLayers.Bounds(<%=mapService.getBBoxValue().replace(' ',',')%>); |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 INITIAL_CENTER = new OpenLayers.LonLat(5, 55); |
984
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
24 GETFEATUREINFO_URL = "<%=mapService.getURL()%>"; |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 Ext.onReady(function() { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 /* 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
|
29 * 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
|
30 * 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
|
31 * call. |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 */ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 initLayers(); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 var options = { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 maxExtent: MAX_EXTENT, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 projection: PROJECTION, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 controls: [], |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 units: 'm' |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 }; |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 |
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 /* ------------------------ 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
|
44 // create map |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 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
|
46 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
|
47 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 // add controls |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 var nav = new OpenLayers.Control.NavigationHistory(); |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
52 nav.previous.title = "<bean:message key="gnviewer.mapclient.controls.nav.previous.title"/>"; |
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
53 nav.next.title = "<bean:message key="gnviewer.mapclient.controls.nav.next.title"/>"; |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 map.addControl(nav); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 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
|
57 controls = { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 previous: nav.previous, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 next : nav.next, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 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
|
61 { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
62 displayClass: 'olControlPan', |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
63 title:'<bean:message key="gnviewer.mapclient.controls.navigate.title"/>' |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 } |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 ), |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
66 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
|
67 { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
68 displayClass: 'olControlZoomBox', |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
69 title: '<bean:message key="gnviewer.mapclient.controls.zoombox.title"/>' |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
70 } |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
71 ), |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
72 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
|
73 displayClass: "olControlFeatureInfo", |
983
45ea5feb94c0
Make GetFeatureInforRequest-Url configurable. Change responsetype of GetFeatureInfo-request to gml
Tim Englich <tim.englich@intevation.de>
parents:
982
diff
changeset
|
74 url: GETFEATUREINFO_URL, |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
75 title: '<bean:message key="gnviewer.mapclient.controls.info.title"/>', |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
76 queryVisible: true, |
983
45ea5feb94c0
Make GetFeatureInforRequest-Url configurable. Change responsetype of GetFeatureInfo-request to gml
Tim Englich <tim.englich@intevation.de>
parents:
982
diff
changeset
|
77 infoFormat: 'application/vnd.ogc.gml', |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
78 eventListeners: { |
997
f55692e3e0ce
Modified output of the GetfeatureInfo-request.
Tim Englich <tim.englich@intevation.de>
parents:
984
diff
changeset
|
79 getfeatureinfo: parseGetFeatureInfoData |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
80 } |
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 }; |
997
f55692e3e0ce
Modified output of the GetfeatureInfo-request.
Tim Englich <tim.englich@intevation.de>
parents:
984
diff
changeset
|
83 |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
84 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
|
85 panel.addControls([controls[key]]); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
86 } |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
87 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
88 map.addControl(panel); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
89 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
|
90 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
|
91 // Displaying the mouse postion |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
92 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
|
93 map.addControl(mousePosition); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
94 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
95 /* --------------------------------------------------------------------------- */ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
96 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
97 // create MapPanel |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
98 mapPanel = new GeoExt.MapPanel({ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
99 border: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
100 region: "center", |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
101 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
|
102 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
|
103 |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
104 }); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
105 |
984
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
106 //map.setCenter(INITIAL_CENTER); |
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
107 |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
108 |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
109 store = new GeoExt.data.WMSCapabilitiesStore({ |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
110 }); |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
111 |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
112 grid = new Ext.grid.GridPanel({ |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
113 id: 'wmsgrid', |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
114 collapsible: false, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
115 split: false, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
116 border: true, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
117 //height: 400, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
118 autoHeight: true, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
119 store: store, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
120 cm: new Ext.grid.ColumnModel([ |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
121 { |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
122 header: '<bean:message key="gnviewer.mapclient.wms.load.grid.name"/>', |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
123 dataIndex: 'name', |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
124 sortable: true |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
125 }, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
126 { |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
127 id: 'title', |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
128 header: '<bean:message key="gnviewer.mapclient.wms.load.grid.title"/>', |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
129 dataIndex: 'title', |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
130 sortable: true |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
131 }]), |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
132 renderTo: 'capgrid', |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
133 bbar: [{ |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
134 text: '<bean:message key="gnviewer.mapclient.wms.load.addlayer"/>', |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
135 handler: addLayer |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
136 }] |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
137 }); |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
138 var cap = new Ext.Panel({ |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
139 id: 'wmspanel', |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
140 border: true, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
141 region: 'east', |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
142 title: '<bean:message key="gnviewer.mapclient.wms.load.title"/>', |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
143 collapsible: false, |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
144 split: false, |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
145 height: 400, |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
146 contentEl: 'cap' |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
147 |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
148 }); |
1016
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
149 |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
150 var capstore = new Ext.data.SimpleStore({ |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
151 fields: ['name','url'], |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
152 data : [['<bean:message key="gnviewer.mapclient.wms.local.service.name"/>','<%=mapService.getURL()%>'],<jsp:include page="/WEB-INF/config/reachable-servers.conf" />] |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
153 }); |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
154 capfield = new Ext.form.ComboBox({ |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
155 id: 'capfield', |
1016
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
156 store: capstore, |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
157 displayField:'name', |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
158 width: 245, |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
159 valueField: 'url', |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
160 mode: 'local', |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
161 triggerAction: 'all', |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
162 selectOnFocus: true, |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
163 renderTo: 'urlinput', |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
164 editable: false, |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
165 value: '<%=mapService.getURL()%>' |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
166 |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
167 }); |
1016
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
168 |
3665834344a8
Issue317: Provide a Comboboy with given WMS instead of an Textfield
Tim Englich <tim.englich@intevation.de>
parents:
1013
diff
changeset
|
169 |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
170 |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
171 var capbutton = new Ext.Button({ |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
172 id: 'capbutton', |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
173 region: 'west', |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
174 handler: updateCapabilities, |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
175 text: '<bean:message key="gnviewer.mapclient.wms.load.bt.text"/>', |
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
176 tooltip: '<bean:message key="gnviewer.mapclient.wms.load.bt.tooltip"/>', |
975
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
177 renderTo: 'urlbutton' |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
178 }); |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
179 |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
180 |
5779220ebb80
Added functionality to read WMS-Capabilities-Documents
Tim Englich <tim.englich@intevation.de>
parents:
973
diff
changeset
|
181 |
971
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 /* --------------------------- Layer Tree ----------------------------------- */ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
184 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
185 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
186 // LayerTree |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
187 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
|
188 border: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
189 enableDD: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
190 region: "east", |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
191 title: "<bean:message key="gnviewer.mapclient.layercontrol"/>", |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
192 width: 200, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
193 split: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
194 collapsible: false, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
195 collapseMode: "mini", |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
196 autoScroll: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
197 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
|
198 applyLoader: false, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
199 }), |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
200 root: { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
201 nodeType: "async", |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
202 children: [{ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
203 nodeType: "gx_baselayercontainer", |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
204 text: "<bean:message key="gnviewer.mapclient.layercontrol.baselayer"/>", |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
205 expanded: true |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
206 }, { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
207 nodeType: "gx_overlaylayercontainer", |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
208 text: "<bean:message key="gnviewer.mapclient.layercontrol.overlay"/>", |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
209 expanded: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
210 loader: { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
211 filter: function(record) { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
212 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
|
213 return layer.displayInLayerSwitcher === true && |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
214 layer.isBaseLayer === false; |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
215 } |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
216 } |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
217 }] |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
218 }, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
219 rootVisible: false, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
220 lines: false |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
221 }); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
222 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
223 /*-------------------------------- Feature grid -------------------------------*/ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
224 |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
225 // create legend paneclass="headerLineLinksl |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
226 legendPanel = new GeoExt.LegendPanel({ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
227 id: 'legendpanel', |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
228 dynamic: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
229 border: true, |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
230 title: '<bean:message key="gnviewer.mapclient.legend"/>', |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
231 collapsible: false, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
232 split: false, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
233 defaults: { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
234 labelCls: 'legend', |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
235 style: 'padding: 5px' |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
236 }, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
237 bodyStyle: 'padding:5px', |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
238 width: 250, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
239 autoScroll: true, |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
240 region: 'east', |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
241 }); |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
242 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
243 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
244 // use separate panels |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
245 // Create GUI |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
246 |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
247 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
|
248 { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
249 region: "west", |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
250 title: '', |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
251 split: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
252 width: 250, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
253 minSize: 225, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
254 maxSize: 400, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
255 collapsible: false, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
256 overflow: 'auto', |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
257 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
|
258 layout: 'accordion', |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
259 layoutConfig: { |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
260 animate: true, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
261 activeOnTop: false |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
262 }, |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
263 items: [ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
264 tree, |
1012
5b118b59dc14
Do some GUI-Improvements in the Map-Client
Tim Englich <tim.englich@intevation.de>
parents:
1011
diff
changeset
|
265 legendPanel, |
5b118b59dc14
Do some GUI-Improvements in the Map-Client
Tim Englich <tim.englich@intevation.de>
parents:
1011
diff
changeset
|
266 cap |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
267 ] |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
268 } |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
269 ); |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
270 <%if (!standalone){%> |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
271 // The main panel |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
272 new Ext.Panel({ |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
273 renderTo: "mapcontainer", |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
274 layout: "border", |
980
80a5cde45d12
Added i18n support to the mapclient.
Tim Englich <tim.englich@intevation.de>
parents:
975
diff
changeset
|
275 height: 400, |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
276 items: [mapPanel, mylegend] |
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
277 }); |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
278 <%}else{ %> |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
279 // Create GUI |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
280 new Ext.Viewport({ |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
281 layout: "border", |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
282 items: [ |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
283 { |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
284 region: "north", |
1013
e2c4e9886dc3
Syncronized size of the headline of fullscreen-mode of the map-client to the size of the headline of the web-client.
Tim Englich <tim.englich@intevation.de>
parents:
1012
diff
changeset
|
285 contentEl: "headline", |
982
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
286 cls: 'title', |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
287 height: 40 |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
288 }, |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
289 mylegend, |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
290 mapPanel |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
291 ] |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
292 }); |
cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
Tim Englich <tim.englich@intevation.de>
parents:
980
diff
changeset
|
293 <%}%> |
984
cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
Tim Englich <tim.englich@intevation.de>
parents:
983
diff
changeset
|
294 map.zoomToExtent(CURRENT_EXTENT); |
971
a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
295 }); |