1<!-- $HeadURL: svn+ssh://jmays@svn.wald.intevation.org/deegree/apps/igeoportal-standard/trunk/addwms.jsp $ --> 2<%-- 3 This file is part of deegree, http://deegree.org/ 4 Copyright (C) 2001-2009 by: 5 - Department of Geography, University of Bonn - 6 and 7 - lat/lon GmbH - 8 9 This library is free software; you can redistribute it and/or modify it under 10 the terms of the GNU Lesser General Public License as published by the Free 11 Software Foundation; either version 2.1 of the License, or (at your option) 12 any later version. 13 This library is distributed in the hope that it will be useful, but WITHOUT 14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 15 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 16 details. 17 You should have received a copy of the GNU Lesser General Public License 18 along with this library; if not, write to the Free Software Foundation, Inc., 19 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 21 Contact information: 22 23 lat/lon GmbH 24 Aennchenstr. 19, 53177 Bonn 25 Germany 26 http://lat-lon.de/ 27 28 Department of Geography, University of Bonn 29 Prof. Dr. Klaus Greve 30 Postfach 1147, 53001 Bonn 31 Germany 32 http://www.geographie.uni-bonn.de/deegree/ 33 34 e-mail: info@deegree.org 35--%> 36<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 37<%@ page import="org.deegree.i18n.Messages" %> 38<%@ page import="java.util.Locale" %> 39<% 40 Locale loc = request.getLocale(); 41%> 42<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 43<html> 44 <head> 45 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 46 <meta name="author" content="lat/lon GmbH" /> 47 <meta name="KeyWords" content="deegree iGeoPortal lat/lon" /> 48 <title>deegree iGeoPortal</title> 49 <link href="css/deegree.css" rel="stylesheet" type="text/css" /> 50 <script LANGUAGE="JavaScript1.2" TYPE="text/javascript"> 51 var version = '1.1.1'; 52 // if version is not set, the highest version supported by the WMS is taken 53 54 function take() { 55 var url = document.getElementById( "wmsurl" ).value; 56 if ( url.length < 12 ) { 57 alert( url + " is not a valid URL to access a WMS" ); 58 return; 59 } 60 61 var s = "<methodCall><methodName>GetWMSLayer</methodName>" + 62 "<params><param><value><struct>" + 63 "<member><name>VERSION</name><value><string>" + version + "</string></value></member>"+ 64 "<member><name>WMSURL</name><value><string>" + url.replace( /&/g, "&") + "</string></value></member>"; 65 66 if( opener.controller.vSessionKeeper != null && opener.controller.vSessionKeeper.id != null ) { 67 s += "<member><name>SESSIONID</name><value><string>" + opener.controller.vSessionKeeper.id + "</string></value></member>"; 68 } 69 s += "</struct></value></param></params></methodCall>"; 70 71 document.getElementById( "rpc" ).value = s; 72 document.forms[0].method = "post"; 73 document.forms[0].action = "control"; 74 document.forms[0].submit(); 75 } 76 77 function change() { 78 var list = document.getElementById( "knownwms" ); 79 for (var i = 0; i < list.options.length;i++ ) { 80 if ( list.options[i].selected ) { 81 document.getElementById( "wmsurl" ).value = list.options[i].value; 82 break; 83 } 84 } 85 } 86 87 88 </script> 89 </head> 90 <body class="pAddWMS"> 91 <!-- HEADER AREA --> 92 <table> 93 <tbody> 94 <tr> 95 <td colspan="2"> </td> 96 </tr> 97 <tr> 98 <td width="30"> </td> 99 <td class="header"><%=Messages.get( loc, "IGEO_STD_ADDWMS_HEADER" ) %></td> 100 </tr> 101 </tbody> 102 </table> 103 <form action="javascript:take();"> 104 <input type="hidden" id="rpc" name="rpc" value=""> 105 <!-- TEXT AREA --> 106 <table> 107 <tr> 108 <td colspan="4"> </td> 109 </tr> 110 <tr> 111 <td width="30"> </td> 112 <td width="120" class="text"><%=Messages.get( loc, "IGEO_STD_ADDWMS_KNOWN" ) %></td> 113 <td width="*"> 114 <select id="knownwms" onchange="change()" style="width: 340px;"> 115 <option value="http://"><%=Messages.get( loc, "IGEO_STD_ADDWMS_SELECT" ) %></option> 116 <jsp:include page="addwms.list" flush="true"/> 117 <!-- 118 all wms entries made in addwms.list are displayed here 119 --> 120 </select> 121 </td> 122 <td width="30"> </td> 123 </tr> 124 <tr> 125 <td colspan="4"> </td> 126 </tr> 127 <tr> 128 <td width="30"> </td> 129 <td width="120" class="text"><%=Messages.get( loc, "IGEO_STD_ADDWMS_URL" ) %></td> 130 <td width="*"><input style="color:#111111" type="text" name="wmsurl" id="wmsurl" value="http://" size="40px;" style="width: 340px;" /></td> 131 <td width="30"> </td> 132 </tr> 133 <!-- 134 <tr> 135 <td colspan="4"> </td> 136 </tr> 137 <tr> 138 <td width="30"> </td> 139 <td width="120" class="text">WMS Version:</td> 140 <td width="*"> 141 <input type="radio" name="version" value="1.1.0" checked="checked" onchange="setVersion(this)" />1.1.0 142 <input type="radio" name="version" value="1.1.1" onchange="setVersion(this)" />1.1.1 143 </td> 144 <td width="30"> </td> 145 </tr> 146 --> 147 </table> 148 <!-- BUTTON AREA --> 149 <br /><br /> 150 <a href="javascript:take()" class="buttonArea1" title="<%=Messages.get( loc, "IGEO_STD_BTN_CONTINUE_TT" ) %>"><%=Messages.get( loc, "IGEO_STD_BTN_CONTINUE" ) %></a> 151 <a href="javascript:window.close()" class="buttonArea2" title="<%=Messages.get( loc, "IGEO_STD_BTN_CANCEL_TT" ) %>"><%=Messages.get( loc, "IGEO_STD_BTN_CANCEL" ) %></a> 152 </form> 153 </body> 154</html>