Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/scripts/viewport.jsp @ 982:cd9414538f10
Added possibility to switch to FullScreen-Mode of the MapClient.
gnv/trunk@1161 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 07 Jun 2010 09:54:47 +0000 |
parents | 80a5cde45d12 |
children | 45ea5feb94c0 |
comparison
equal
deleted
inserted
replaced
981:10bee74ab915 | 982:cd9414538f10 |
---|---|
1 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> | 1 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> |
2 <%@page import="de.intevation.gnv.action.MapClientStandaloneAction"%> | |
2 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> | 3 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> |
4 <% | |
5 boolean standalone = request.getParameter(MapClientStandaloneAction.MAPCLIENTSTANDALONE_KEY) != null && | |
6 request.getParameter(MapClientStandaloneAction.MAPCLIENTSTANDALONE_KEY).equals("true"); | |
7 %> | |
3 OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url="; | 8 OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url="; |
4 OpenLayers.Lang.setCode('<%=SessionModelFactory.getInstance().getSessionModel(request).getCurrentLocale().getLanguage() %>'); | 9 OpenLayers.Lang.setCode('<%=SessionModelFactory.getInstance().getSessionModel(request).getCurrentLocale().getLanguage() %>'); |
5 Ext.BLANK_IMAGE_URL = "scripts/openlayers/OpenLayers-2.9/theme/default/img/blank.gif"; | 10 Ext.BLANK_IMAGE_URL = "scripts/openlayers/OpenLayers-2.9/theme/default/img/blank.gif"; |
6 | 11 |
7 /** | 12 /** |
8 * XXX | 13 * XXX |
9 * Change specific attributes for map, wfs-t, etc here. Do not change these | 14 * Change specific attributes for map, wfs-t, etc here. Do not change these |
10 * settings inline the code! | 15 * settings inline the code! |
11 */ | 16 */ |
12 PROJECTION = "EPSG:4326"; | 17 PROJECTION = "EPSG:4326"; |
13 PROJECTIONS = [PROJECTION, 'EPSG:4326'] // Projection used in projection selector | |
14 MAX_EXTENT = new OpenLayers.Bounds(-17.44,29.41,40.04,77.66); | 18 MAX_EXTENT = new OpenLayers.Bounds(-17.44,29.41,40.04,77.66); |
15 INITIAL_CENTER = new OpenLayers.LonLat(5, 55); | 19 INITIAL_CENTER = new OpenLayers.LonLat(5, 55); |
16 | 20 |
17 Ext.onReady(function() { | 21 Ext.onReady(function() { |
18 | 22 |
141 border: true, | 145 border: true, |
142 region: 'east', | 146 region: 'east', |
143 title: '<bean:message key="gnviewer.mapclient.wms.load.title"/>', | 147 title: '<bean:message key="gnviewer.mapclient.wms.load.title"/>', |
144 collapsible: false, | 148 collapsible: false, |
145 split: false, | 149 split: false, |
146 contentEl: 'cap', | 150 height: 400, |
147 height: 400 | 151 contentEl: 'cap' |
152 | |
148 }); | 153 }); |
149 | 154 |
150 var capfield = new Ext.form.TextField({ | 155 var capfield = new Ext.form.TextField({ |
151 id: 'capfield', | 156 id: 'capfield', |
152 region: 'east', | 157 region: 'east', |
206 lines: false | 211 lines: false |
207 }); | 212 }); |
208 | 213 |
209 /*-------------------------------- Feature grid -------------------------------*/ | 214 /*-------------------------------- Feature grid -------------------------------*/ |
210 | 215 |
211 // create legend panel | 216 // create legend paneclass="headerLineLinksl |
212 legendPanel = new GeoExt.LegendPanel({ | 217 legendPanel = new GeoExt.LegendPanel({ |
213 id: 'legendpanel', | 218 id: 'legendpanel', |
214 dynamic: true, | 219 dynamic: true, |
215 border: true, | 220 border: true, |
216 title: '<bean:message key="gnviewer.mapclient.legend"/>', | 221 title: '<bean:message key="gnviewer.mapclient.legend"/>', |
251 cap, | 256 cap, |
252 legendPanel | 257 legendPanel |
253 ] | 258 ] |
254 } | 259 } |
255 ); | 260 ); |
256 | 261 <%if (!standalone){%> |
257 // The main panel | 262 // The main panel |
258 new Ext.Panel({ | 263 new Ext.Panel({ |
259 renderTo: "mapcontainer", | 264 renderTo: "mapcontainer", |
260 layout: "border", | 265 layout: "border", |
261 height: 400, | 266 height: 400, |
262 items: [mapPanel, mylegend] | 267 items: [mapPanel, mylegend] |
263 }); | 268 }); |
264 | 269 <%}else{ %> |
270 // Create GUI | |
271 new Ext.Viewport({ | |
272 layout: "border", | |
273 items: [ | |
274 { | |
275 region: "north", | |
276 contentEl: "title", | |
277 cls: 'title', | |
278 height: 40 | |
279 }, | |
280 mylegend, | |
281 mapPanel | |
282 ] | |
283 }); | |
284 <%}%> | |
265 }); | 285 }); |