Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp @ 971:a0e6566cd111
Integrated Openlayers using ext and geoext into the GNV-WebClient
gnv/trunk@1139 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 01 Jun 2010 12:55:24 +0000 |
parents | 5f29bfeb61bd |
children | 1bb54da8c8ed |
comparison
equal
deleted
inserted
replaced
970:d91ffd0e8239 | 971:a0e6566cd111 |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> | |
4 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> | |
3 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> | 5 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> |
4 <% | 6 <% |
5 String serverPath = (String) request.getAttribute("mapserver"); | 7 String serverPath = (String) request.getAttribute("mapserver"); |
6 String mapfilePath = (String) request.getAttribute("mapfile"); | 8 String mapfilePath = (String) request.getAttribute("mapfile"); |
7 String layerName = (String) request.getAttribute("layer"); | 9 String layerName = (String) request.getAttribute("layer"); |
8 String timeToLive = (String) request.getAttribute("ttl"); | 10 String timeToLive = (String) request.getAttribute("ttl"); |
11 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); | |
9 %> | 12 %> |
10 | |
11 <html xmlns="http://www.w3.org/1999/xhtml"> | 13 <html xmlns="http://www.w3.org/1999/xhtml"> |
12 <head> | 14 <head> |
13 <title> | 15 <title> |
14 <bean:message key="gnviewer.app.title"/> | 16 <bean:message key="gnviewer.app.title"/> |
15 </title> | 17 </title> |
18 <meta http-equiv="Content-Style-Type" content="text/css"/> | 20 <meta http-equiv="Content-Style-Type" content="text/css"/> |
19 <meta http-equiv="Expires" content="Mon, 01 Jan 1990 00:00:01 GMT"/> | 21 <meta http-equiv="Expires" content="Mon, 01 Jan 1990 00:00:01 GMT"/> |
20 <meta http-equiv="pragma" content="no-cache"/> | 22 <meta http-equiv="pragma" content="no-cache"/> |
21 <meta http-equiv="cache-control" content="no-cache"/> | 23 <meta http-equiv="cache-control" content="no-cache"/> |
22 <meta name="robots" content="noindex"/> | 24 <meta name="robots" content="noindex"/> |
25 | |
26 <link rel="stylesheet" type="text/css" href="scripts/ext/ext-2.3.0/resources/css/ext-all.css"></link> | |
27 <link rel="stylesheet" type="text/css" href="scripts/geoext/geoext-0.6/resources/css/geoext-all.css"></link> | |
28 <link rel="stylesheet" type="text/css" href="scripts/openlayers/OpenLayers-2.9/theme/default/style.css"></link> | |
23 <link href="styles/gnv.css" rel="stylesheet" type="text/css"/> | 29 <link href="styles/gnv.css" rel="stylesheet" type="text/css"/> |
24 <script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script> | 30 |
25 <script type="text/javascript"> | 31 <script type="text/javascript" src="scripts/ext/ext-2.3.0/adapter/ext/ext-base.js"></script> |
26 var lon = 5; | 32 <script type="text/javascript" src="scripts/ext/ext-2.3.0/ext-all.js"></script> |
27 var lat = 55; | 33 <script type="text/javascript" src="scripts/openlayers/OpenLayers-2.9/OpenLayers.js"></script> |
28 var zoom = 5; | 34 <script type="text/javascript" src="scripts/geoext/geoext-0.6/script/GeoExt.js"></script> |
29 var map, layer; | 35 <script type="text/javascript" src="<%=response.encodeURL("scripts/layers.jsp?uid="+System.currentTimeMillis())%>"></script> |
30 | 36 <script type="text/javascript" src="<%=response.encodeURL("scripts/viewport.jsp?uid="+System.currentTimeMillis())%>"></script> |
31 function init() { | 37 |
32 <%if(request.getAttribute("wms_published") != null){ %> | 38 <!-- save necessary variables here --> |
33 map = new OpenLayers.Map('map'); | 39 <script type="text/javascript"> |
34 var server = '<%=serverPath%>'; | 40 var options, layer, extent, map, mapPanel, infoControls; |
35 var back1 = new OpenLayers.Layer.WMS( | 41 var controls,layers, mouseLoc, grid; |
36 "Background1", | 42 var infoActive = false; |
37 "http://gdisrv.bsh.de/arcgis/services/Background/Background/MapServer/WMSServer?", | 43 </script> |
38 { | |
39 layers: '0', | |
40 format: 'image/png', | |
41 transparent: false | |
42 }, | |
43 { | |
44 isBaseLayer: 'true', | |
45 singleTile: 'true' | |
46 } | |
47 ); | |
48 | |
49 layer = new OpenLayers.Layer.WMS( | |
50 "MyWMS", | |
51 server, | |
52 { | |
53 layers: '<%=layerName%>', | |
54 format: 'image/png', | |
55 transparent: 'true' | |
56 }, | |
57 { | |
58 singleTile: 'true' | |
59 } | |
60 ); | |
61 | |
62 map.addLayers([back1, layer]); | |
63 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); | |
64 <%}%> | |
65 } | |
66 | |
67 function toggle(element) { | |
68 var ele = document.getElementById(element); | |
69 var vis = ele.style.visibility; | |
70 if (vis != "visible") { | |
71 ele.style.visibility = "visible"; | |
72 } | |
73 else { | |
74 ele.style.visibility = "hidden"; | |
75 } | |
76 } | |
77 | |
78 </script> | |
79 </head> | 44 </head> |
80 | 45 |
81 <body id="gnviewerbody" onLoad="init()"> | 46 <body id="gnviewerbody"> |
82 <div id="overlay"></div> | 47 <div id="overlay"></div> |
83 <div style="width:100%;left:0;top:0;width:100%;height:100%;position:absolute;visibility:hidden;"> | 48 <div style="width:100%;left:0;top:0;width:100%;height:100%;position:absolute;visibility:hidden;"> |
84 <div id="overlayContent"> | 49 <div id="overlayContent"> |
85 <p> | 50 <p> |
86 <bean:message key="gnviewer.productselection.overlay.title"/> | 51 <bean:message key="gnviewer.productselection.overlay.title"/> |
92 <jsp:include page="header.jsp" /> | 57 <jsp:include page="header.jsp" /> |
93 </div> | 58 </div> |
94 <div id="contentElement" class="contentElement"> | 59 <div id="contentElement" class="contentElement"> |
95 <jsp:include page="index.jsp" /> | 60 <jsp:include page="index.jsp" /> |
96 </div> | 61 </div> |
97 <br> | 62 <br/> |
98 <div id="footerElement"> | 63 <div id="footerElement"> |
99 <jsp:include page="footer.jsp" /> | 64 <jsp:include page="footer.jsp" /> |
100 </div> | 65 </div> |
101 </div> | 66 </div> |
102 </body> | 67 </body> |