annotate gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp @ 680:ba3370dbc8c5

Parse time to live of a wms-layer from meta document and show it in html gui (issue197). gnv/trunk@830 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 26 Mar 2010 09:22:32 +0000
parents 8315b0a40329
children 271ec4d11a9f
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" %>
585
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
4 <%
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
5 String serverPath = (String) request.getAttribute("mapserver");
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
6 String mapfilePath = (String) request.getAttribute("mapfile");
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
7 String layerName = (String) request.getAttribute("layer");
680
ba3370dbc8c5 Parse time to live of a wms-layer from meta document and show it in html gui (issue197).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 677
diff changeset
8 String timeToLive = (String) request.getAttribute("ttl");
585
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
9 %>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
10
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
11 <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
12 <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
13 <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
14 <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
15 </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
16 <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
17 <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
18 <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
19 <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
20 <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
21 <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
22 <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
23 <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
24 <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
25 <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
26 <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
27 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
28 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
29 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
30 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
31
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
32 function init() {
677
8315b0a40329 Improved ExceptionHandling during WMS-Publishing.
Tim Englich <tim.englich@intevation.de>
parents: 585
diff changeset
33 <%if(request.getAttribute("wms_published") != null){ %>
585
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
34 map = new OpenLayers.Map('map');
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
35 var server = '<%=serverPath%>?MAP=<%=mapfilePath%>';
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
36 layer = new OpenLayers.Layer.WMS(
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
37 "MyWMS",
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
38 server,
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
39 {
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
40 layers: '<%=layerName%>',
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
41 format: 'image/png'
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
42 },
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
43 {
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
44 singleTile: 'true'
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
45 }
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
46 );
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
47
585
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
48 map.addLayer(layer);
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
49 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
677
8315b0a40329 Improved ExceptionHandling during WMS-Publishing.
Tim Englich <tim.englich@intevation.de>
parents: 585
diff changeset
50 <%}%>
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
51 }
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 </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
53 </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
54
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 <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
56 <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
57 <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
58 <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
59 <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
60 <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
61 </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
62 </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
63 </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
64 <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
65 <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
66 <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
67 <jsp:include page="footer.jsp" />
677
8315b0a40329 Improved ExceptionHandling during WMS-Publishing.
Tim Englich <tim.englich@intevation.de>
parents: 585
diff changeset
68 <%if(request.getAttribute("wms_published") != null){ %>
585
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
69 <div class="outerMap">
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
70 <div id="wms">
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
71 <table>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
72 <tr>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
73 <td class="parameter"><bean:message key="gnviewer.wms.server.path"/>:</td>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
74 <td class="wmsvalue"><%=serverPath%>?MAP=<%=mapfilePath%></td>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
75 </tr>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
76 <tr>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
77 <td class="parameter"><bean:message key="gnviewer.wms.server.layer"/>:</td>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
78 <td class="wmsvalue"><%=layerName%></td>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
79 </tr>
680
ba3370dbc8c5 Parse time to live of a wms-layer from meta document and show it in html gui (issue197).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 677
diff changeset
80 <tr>
ba3370dbc8c5 Parse time to live of a wms-layer from meta document and show it in html gui (issue197).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 677
diff changeset
81 <td class="parameter"><bean:message key="gnviewer.wms.layer.ttl"/>:</td>
ba3370dbc8c5 Parse time to live of a wms-layer from meta document and show it in html gui (issue197).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 677
diff changeset
82 <td class="wmsvalue"><%=timeToLive%></td>
ba3370dbc8c5 Parse time to live of a wms-layer from meta document and show it in html gui (issue197).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 677
diff changeset
83 </tr>
585
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
84 </table>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
85 </div>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
86 <div id="map"></div>
2e690cb2247c Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 584
diff changeset
87 </div>
677
8315b0a40329 Improved ExceptionHandling during WMS-Publishing.
Tim Englich <tim.englich@intevation.de>
parents: 585
diff changeset
88 <%}%>
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
89 </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
90 </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
91 </html>

http://dive4elements.wald.intevation.org