<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=031563116-01082008>Hello,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=031563116-01082008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=031563116-01082008>declare map,<FONT face="Times New Roman"
color=#000000 size=3> recorridos <FONT face=Arial color=#0000ff
size=2>and Counter (<SPAN class=031563116-01082008><FONT face=Arial
color=#0000ff size=2>var Counter=0;</FONT></SPAN>) </FONT></FONT>as global
variables and change your </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=031563116-01082008></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=031563116-01082008></SPAN></FONT><FONT><SPAN
class=031563116-01082008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=031563116-01082008><FONT face="Times New Roman" color=#000000
size=3>function Layer_redraw() { <BR><FONT face=Arial color=#0000ff
size=2> </FONT>recorridos<FONT face=Arial color=#0000ff
size=2>.mergeNewParams({ counter : counter++
});</FONT><BR>} </FONT><BR></SPAN></FONT><BR><SPAN
class=031563116-01082008><FONT face=Arial color=#0000ff size=2>That should
work.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031563116-01082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=031563116-01082008><FONT face=Arial
color=#0000ff size=2>Arnd Wippermann</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031563116-01082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>David
Calle<BR><B>Gesendet:</B> Freitag, 1. August 2008 17:27<BR><B>An:</B>
users<BR><B>Betreff:</B> [OpenLayers-Users] Refresh an indepent Layer... every n
seconds...<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Hi List,<BR><BR>
<DIV id=result_box dir=ltr>I have a map published with MapServer and OpenLayers,
I need to refresh only of them, every 10 seconds for example, to
simulate a GPS. <BR>Apparently I could usage "redraw" but does not work ... o
<BR>I hope your help .. this is part of my publication... the layer is
recorridos...<BR><BR>Or if there are another way tell me
please...<BR><BR><html><BR> <head><BR>
<style type="text/css"><BR> #map
{<BR> width:
900px;<BR>
height: 600px;<BR>
}<BR> </style><BR>
<title>Sistema de Trasporte Urbano - Cuenca Ecuador
</title><BR> <script
src="OpenLayers.js"></script><BR> <script
type="text/javascript"><BR><BR>
function init()<BR> {<BR>
var mapOptions = {<BR>
maxExtent: new
OpenLayers.Bounds(713620.5057, 9673754.1986, 732936.3635,
9687405.8116),<BR>
maxResolution: 'auto',<BR>
projection:"EPSG:32717",<BR>
units: "m"};<BR><BR>
var map = new OpenLayers.Map('map',
mapOptions);<BR>
map.addControl(new
OpenLayers.Control.LayerSwitcher());<BR>
var panel = new
OpenLayers.Control.NavToolbar();<BR>
map.addControl(panel);<BR>
map.addControl(new
OpenLayers.Control.MousePosition({'div':OpenLayers.Util.getElement('coords')}));<BR><BR>
var manzanas = new OpenLayers.Layer.MapServer.Untiled( "manzanas",
"../../cgi-bin/mapserv",<BR>
{map:'C:/data/publicacion.map',<BR>
layers: 'manzanas',map_imagetype: 'png'},
{'displayInLayerSwitcher':false});<BR><BR>
var ruta22 = new OpenLayers.Layer.MapServer.Untiled( "Ruta 22",
"../../cgi-bin/mapserv",<BR>
{map:'C:/data/publicacion.map', transparent: "true",
<BR> layers:
'ruta22_ida',map_imagetype: 'png'},{'isBaseLayer': false},
{'displayInLayerSwitcher':false});<BR><BR>
var recorridos = new OpenLayers.Layer.MapServer.Untiled( "Unidad()",
"../../cgi-bin/mapserv",<BR>
{map:'C:/data/publicacion.map', <BR>
layers: 'recorrido',transparent: "true",
map_imagetype:
'png'});<BR>
ruta22.setVisibility(false);<BR><BR>
map.addLayers([ruta22, manzanas,
recorridos]);<BR>
if (!map.getCenter()) map.zoomToMaxExtent();<BR>
setTimeout("Layer_redraw()",10*1000);<BR>}<BR><BR>function Layer_redraw() {
<BR><BR> var name = 'Test Layer'; <BR> var
url = "../../cgi-bin/mapserv"; <BR> var params = { map:
'C:/data/publicacion.map', <BR>
layers: 'recorrido',<BR>
transparent: "true",
<BR>
map_imagetype: 'png'}; <BR><BR> <BR> var layer =
new OpenLayers.Layer.WMS(name, url, params); <BR> var map =
new OpenLayers.Map('map'); <BR> map.addLayer(layer);
<BR> layer.redraw(true); <BR>} <BR>
</script><BR> </head><BR> <body
onLoad="init()"><BR>
<table><BR>
<tr><BR> <td
align="left"><div
id="map"></div></td><BR>
</tr><BR> </table><BR>
</body><BR></html><BR><BR>Thanks for
all...<BR></DIV></DIV></BODY></HTML>