From 785adf30c6e83826fffa32f97421d2291c0e556b Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sat, 15 Sep 2007 17:10:50 +0000 Subject: [PATCH] Seperate out date fields and add more descriptive text. git-svn-id: http://svn.openlayers.org/trunk/openlayers@4319 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/wmst.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/examples/wmst.html b/examples/wmst.html index e2c5e6a212..400ac72654 100644 --- a/examples/wmst.html +++ b/examples/wmst.html @@ -20,20 +20,30 @@ "http://wms.jpl.nasa.gov/wms.cgi", {layers: "modis,global_mosaic"}); - ia_wms = new OpenLayers.Layer.WMS("Nexrad","http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?",{layers:"nexrad-n0r-wmst",transparent:true,format:'image/png',time:OpenLayers.Util.getElement('time').value}); + ia_wms = new OpenLayers.Layer.WMS("Nexrad","http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?",{layers:"nexrad-n0r-wmst",transparent:true,format:'image/png',time:"2005-08-29T13:00:00Z"}); jpl_wms.setVisibility(false); map.addLayers([ol_wms, jpl_wms, ia_wms]); map.addControl(new OpenLayers.Control.LayerSwitcher()); - map.zoomToMaxExtent(); + map.zoomToExtent(new OpenLayers.Bounds(-100.898437,22.148438,-78.398437,39.726563)); } + function update_date() { + var string = OpenLayers.Util.getElement('year').value + "-" + + OpenLayers.Util.getElement('month').value + "-" + + OpenLayers.Util.getElement('day').value + "T" + + OpenLayers.Util.getElement('hour').value + ":" + + OpenLayers.Util.getElement('minute').value + ":00"; + ia_wms.mergeNewParams({'time':string}); + + }

OpenLayers Example

-

WMS-T example: update the times, and the radar image will change. Uses Layer.changeParams. Thanks to David Bitner for the inspiration, the original code, and the kick in the butt!

- +

WMS-T example: update the times, and the radar image will change. Uses Layer.mergeNewParams to update the date element with the strings from the input fields every time one of them is changed.

+

The inputs below describe a timestamp: The minute increments can only be updated in units of 5.

+ --T::00