annotate gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp @ 584:b31e81f35b64

Adjusted rendering of OpenLayers client. gnv/trunk@732 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 04 Mar 2010 14:27:26 +0000
parents 3f7bbc6dc751
children 2e690cb2247c
rev   line source
572
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml">
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 <head>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 <title>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 <bean:message key="gnviewer.app.title"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 </title>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 <meta http-equiv="Content-Script-Type" content="text/javascript"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 <meta http-equiv="Content-Style-Type" content="text/css"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 <meta http-equiv="Expires" content="Mon, 01 Jan 1990 00:00:01 GMT"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 <meta http-equiv="pragma" content="no-cache"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 <meta http-equiv="cache-control" content="no-cache"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 <meta name="robots" content="noindex"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 <link href="styles/default.css" rel="stylesheet" type="text/css"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 <script type="text/javascript" src="scripts/gnviewer.js"></script>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 <script type="text/javascript">
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 var lon = 5;
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 var lat = 55;
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 var zoom = 5;
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 var map, layer;
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 function init() {
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 if (getURLParam("target") == "wms") {
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 map = new OpenLayers.Map('map');
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 layer = new OpenLayers.Layer.WMS(
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 "MyWMS",
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 "http://denmark.atlas/cgi-bin/mapserv-gp?MAP=/opt/artifacts/mapfiles/mapfile.map",
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 {
584
b31e81f35b64 Adjusted rendering of OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 572
diff changeset
32 layers: getURLParam("layer"),
b31e81f35b64 Adjusted rendering of OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 572
diff changeset
33 format: 'image/png'
572
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 },
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 {
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 singleTile: 'true'
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 }
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 );
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 map.addLayer(layer);
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 }
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 }
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 function getURLParam(strParamName){
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 var strReturn = "";
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 var strHref = window.location.href;
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 if ( strHref.indexOf("?") > -1 ){
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 var aQueryString = strQueryString.split("&");
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ) {
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 var aParam = aQueryString[iParam].split("=");
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 strReturn = aParam[1];
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 break;
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58 }
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 }
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 }
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 return strReturn;
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 }
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 </script>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 </head>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 <body id="gnviewerbody" onLoad="init()">
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 <div id="overlay"></div>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 <div style="width:100%;left:0;top:0;width:100%;height:100%;position:absolute">
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 <div id="overlayContent">
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 <p>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 <bean:message key="gnviewer.productselection.overlay.title"/>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 </p>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 </div>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 </div>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 <div id="page">
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 <jsp:include page="header.jsp" />
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 <jsp:include page="index.jsp" />
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 <jsp:include page="footer.jsp" />
584
b31e81f35b64 Adjusted rendering of OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 572
diff changeset
80
b31e81f35b64 Adjusted rendering of OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 572
diff changeset
81 <div id="map"></div>
572
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 </div>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 </body>
3f7bbc6dc751 Sourced JavaScript script tags for loading and rendering an OpenLayers client out to an own jsp page.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 </html>

http://dive4elements.wald.intevation.org