source: Discovery_Service/trunk/exist/selectFromMap.htm @ 122

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/Discovery_Service/trunk/exist/selectFromMap.htm@125
Revision 122, 3.5 KB checked in by mguiterr, 15 years ago (diff)

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<!--
2//Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ).
3//This software may be distributed under the terms of the
4//Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
5-->
6
7<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
8<html><head>
9<!--
10/*
11* Project quickWMS: Generic JavaScript WMS Client
12* quickWMS - multiple layer request according to OpenGIS Web Mapping Specification      using Demis Layers
13* Author : Pedro Pereira Gonï¿œalves (pedro@inovagis.org)
14* File : map.htm
15* Version : 0.01
16* Last Change : 2003-10-24
17* Dependencies : WMSbrowsers.js, WMSlayer.js, WMSmap.js
18* Future Developments :
19* Tested on : Netscape 7.0, Netscape 4.7, IE 5.5, IE 6.0
20* History :
21        2003-10-24 : File Created
22*/
23-->
24<link rel="stylesheet" href="help.css">
25
26<link rel="stylesheet" href="inc/quickWMS.css">
27<script language="Javascript" src="inc/WMSbrowsers.js"></script>
28<script language="Javascript" src="inc/WMSlayer.js"></script>
29<script language="Javascript" src="inc/WMSmap.js"></script>
30<script language="Javascript" src="inc/WMStools.js"></script>
31<script language="Javascript" src="inc/WMSquick.js"></script>
32<script language="Javascript" src="inc/WMSnavigation.js"></script>
33<script language="Javascript">
34function setForm(x1,x2,y1,y2) {
35        opener.document.mainForm.westbc.value = x1;
36        opener.document.mainForm.eastbc.value = x2;
37        opener.document.mainForm.southbc.value = y1;
38        opener.document.mainForm.northbc.value = y2;
39    return false;
40}
41</script>
42
43<title>Select AOI from map</title>
44</head>
45<body>
46<h1>Select AOI from map</h1>
47<p>Use the zoom (<img src="blue_skin/zsel.gif" width="24" height="24" border="0" ALT="zoom button">) and select (<img src="blue_skin/select.gif" width="24" height="24" border="0" alt="select button">) tools to define an area of interest (AOI) from the map. As you select, the values in the main form will be automatically updated. When you have finished, <a href="#" onclick="window.close()">click here to return to the main search form.</a></p>
48<script language='Javascript'>
49// WMS servers - list here other OGC compliant map servers
50var demisWMS = "http://www.demis.nl/wms/wms.asp?wms=WorldMap";
51
52        function map_onSelecting  (wmsLayer, x1, y1, x2, y2){
53                 //you can use the variables sent
54                window.status= x1 + "," +y1 + ":" +x2 + "," +y2;
55                var crap = setForm( x1,x2,y1,y2 );
56                return true;
57
58        }
59
60        function map_onSelection (wmsLayer, x1, y1, x2, y2){
61                // or the class properties             
62                alert( "final =" + wmsLayer.slBox[0]+ "," +wmsLayer.slBox[1] + ":" +wmsLayer.slBox[2] + "," +wmsLayer.slBox[3]);
63                return true;
64
65        }
66
67
68        function writeMaps(){
69                var map = new quickWMS(-180, -90, 180, 90);
70
71                map.addLayer(demisWMS, "Bathymetry,Countries", "1.0.0");
72                map.addLayer(demisWMS, "Topography,Hillshading", "1.0.0");
73                map.addLayer(demisWMS, "Builtup+areas,Coastlines,Waterbodies,Rivers,Streams,Railroads,Highways,Roads,Trails,Borders,Cities,Settlements,Airports,Ocean+features", "1.0.0", "Coastlines, Rivers and built features");
74                map.writeDOM("myMap", 75, 215, 400, 200, "background-color:white;border-style:solid;border-width:1;border-color:black;");
75                map.toolbar = new toolBar(map);
76                map.toolbar.writeDOM(75,175,true);             
77                //map.initialize();
78                map.refresh();
79                // add the events
80                map.onSelecting = map_onSelecting;
81                map.onSelection = map_onSelection;
82                }
83writeMaps()     
84</script>
85<!-- <p>Uses <a href="http://giserver.esrin.esa.int/quickwms/" target="_blank">quickWMS</a> as client to <a href="http://www.demis.nl">DEMIS</A> web map server</p> -->
86</body></html>
Note: See TracBrowser for help on using the repository browser.