<%-- $HeadURL$
 This file is part of deegree, http://deegree.org/
 Copyright (C) 2001-2009 by:
 - Department of Geography, University of Bonn -
 and
 - lat/lon GmbH -

 This library is free software; you can redistribute it and/or modify it under
 the terms of the GNU Lesser General Public License as published by the Free
 Software Foundation; either version 2.1 of the License, or (at your option)
 any later version.
 This library is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 details.
 You should have received a copy of the GNU Lesser General Public License
 along with this library; if not, write to the Free Software Foundation, Inc.,
 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

 Contact information:

 lat/lon GmbH
 Aennchenstr. 19, 53177 Bonn
 Germany
 http://lat-lon.de/

 Department of Geography, University of Bonn
 Prof. Dr. Klaus Greve
 Postfach 1147, 53001 Bonn
 Germany
 http://www.geographie.uni-bonn.de/deegree/

 e-mail: info@deegree.org
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="author" content="lat/lon GmbH" />
		<meta name="KeyWords" content="WMS deegree OGC iGeoPortal lat/lon" />
		<meta name="audience" content="" />
		<title>Digitizer Test-Form</title>
		<link href="./../../css/deegree.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
        <!--
            .sel {width: 200px;}
            .inp {width: 180px;}
        -->
        </style>
		<script language="JavaScript1.2" type="text/javascript" src="../../javascript/rpc.js"></script>
		<script type="text/javascript">
		<!--
			function init() {
				parent.templateDoc = this;
			}
			
			function getRPCFragment( ) {
				// rpcFrag contains any positive number of parameters. 
                // it must contain at least one parameter, that will be the second parameter (param[1]) 
                // of the rpc request sent to the DigitizeListener. 
                // the first parameter (param[0]) has already been set in digitizer_window.jsp.
                // see digitizer_rpcRequest_definition.xml for more info on the expected rpc structure;
                
                // second param (param[1])
                var rpcFrag = '<param><value><struct>';
				if ( parent.geometry != null ) {
					rpcFrag += createMember( 'GEOMETRY', '<![CDATA['+parent.geometry+']]>', 'string' );
					rpcFrag += createMember( 'CRS', parent.crs, 'string' );
				}
				rpcFrag += createMember( 'GEO_ID', '<![CDATA[' + document.getElementById( 'geoId' ).value + ']]>', 'string' );
                rpcFrag += createMember( 'COMMENT', '<![CDATA[' + document.getElementById( 'comment' ).value + ']]>', 'string' );
			  	rpcFrag += '</struct></value></param>';
                
                // more params (param[2] .. param[n])
                // they need to be handled by derived Listeners!
                // see digitizer_rpcRequest_definition.xml and module documentation for more info.
                /*
                var i = 0;
				while ( parent.document.getElementById( "image" + i) != null ) {
					var gm = parent.document.getElementById( "image" + i).src;
					rpcFrag += '<param><value><string><![CDATA[' + gm + ']]></string></value></param>';				
					i++;
				}
                */

				return rpcFrag;
			}
		// -->
		</script>
	</head>
	<body class="pDigitizerWindowInside" bgcolor="#FFD48A" onload="init();" marginheight="0" marginwidth="0">
		<form id="theCountyForm">
			<table border="0" width="25%">
				<tr>
					<td>
						<p>Now you can start digitizing new features for Utah!<br /><br />
						After entering all necessary values in the form you can "save" your new digitized feature.<br /><br /></p>
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>geographicIdentifier<br /><input type="text" id="geoId" name="geoId" size="20" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
                <tr>
                    <td>comments<br /><input type="text" id="comment" name="comment" size="20" /></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                </tr>
			</table>
		</form>
	</body>
</html>
