source: MILK/trunk/milk_server/milk_server/public/test_openlayers.html @ 2865

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/public/test_openlayers.html@5023
Revision 2865, 1.4 KB checked in by spascoe, 13 years ago (diff)

First glimpse of visualise working.

It's not connected to the selection control yet. You need to explicitly
give it a granuleURI, featureId and time point. The form is populated with
an example.

Update is controlled from the ndgPage.kid:updateVis() function
which calls VisMapBox?.js:VisApp.updateVisLayer().

Note it won't work unless the data is visible at the location in the CSML (/badc/ipcc-ddc/... in the example).

I can see the WMS isn't drawing tiles correctly at high longitudes. (New Zealand gets a raw deal again :-) ).

Line 
1<html xmlns="http://www.w3.org/1999/xhtml">
2  <head>
3    <style type="text/css">
4        #map {
5            width: 512px;
6            height: 512px;
7            border: 1px solid black;
8        }
9    </style>
10    <script src="http://openlayers.org/api/OpenLayers.js"></script>
11    <script type="text/javascript">
12        <!--
13        function init(){
14            var map = new OpenLayers.Map('map');
15
16           
17            //var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
18            //    "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
19
20
21            // http://saturn.badc.rl.ac.uk:8080/wms/badc.nerc.ac.uk__NDG-A0__AWQX8gTc?request=GetMap&version=1.3.0&layers=EhWv0qW5&bbox=-180,-90,180,90&width=600&height=300&Styles=&CRS=CRS:84&format=image/png&time=2024-01-15T00:00:00.0
22            var csml_wms = new OpenLayers.Layer.WMS( "Test CSML layer",
23                "http://saturn.badc.rl.ac.uk:8080/wms/badc.nerc.ac.uk__NDG-A0__AWQX8gTc",
24                {layers: 'EhWv0qW5',
25                 CRS: 'CRS:84', format: 'image/png', version: '1.3.0',
26                 styles: '', time: '2024-01-15T00:00:00.0'
27                 });
28            map.addLayers([//ol_wms,
29                           csml_wms]);
30            // map.setCenter(new OpenLayers.LonLat(0, 0), 0);
31            map.zoomToMaxExtent();
32        }
33        // -->
34    </script>
35  </head>
36  <body onload="init()">
37    <h1>OpenLayers Example</h1>
38    <div id="map"></div>
39  </body>
40</html>
Note: See TracBrowser for help on using the repository browser.