<!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>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=031563116-01082008>declare&nbsp;map,<FONT face="Times New Roman" 
color=#000000 size=3>&nbsp;recorridos&nbsp;<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>&nbsp;</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() {&nbsp;<BR><FONT face=Arial color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp; </FONT>recorridos<FONT face=Arial color=#0000ff 
size=2>.mergeNewParams({ counter : counter++ 
});</FONT><BR>}&nbsp;</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>&nbsp;</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>&nbsp;</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,&nbsp; every 10 seconds for example,&nbsp; 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>&lt;html&gt;<BR>&nbsp; &lt;head&gt;<BR>&nbsp;&nbsp;&nbsp; 
&lt;style type="text/css"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #map 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width: 
900px;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
height: 600px;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/style&gt;<BR>&nbsp;&nbsp;&nbsp; 
&lt;title&gt;Sistema de Trasporte Urbano&nbsp; - Cuenca Ecuador 
&lt;/title&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;script 
src="OpenLayers.js"&gt;&lt;/script&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;script 
type="text/javascript"&gt;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
function init()<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var mapOptions = {<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxExtent: new 
OpenLayers.Bounds(713620.5057, 9673754.1986, 732936.3635, 
9687405.8116),<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
maxResolution: 'auto',<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; projection:"EPSG:32717",<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; units: "m"};<BR><BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var map = new OpenLayers.Map('map', 
mapOptions);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.addControl(new 
OpenLayers.Control.LayerSwitcher());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
var panel = new 
OpenLayers.Control.NavToolbar();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.addControl(panel);<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new 
OpenLayers.Control.MousePosition({'div':OpenLayers.Util.getElement('coords')}));<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
var manzanas = new OpenLayers.Layer.MapServer.Untiled( "manzanas", 
"../../cgi-bin/mapserv",<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; {map:'C:/data/publicacion.map',<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: 'manzanas',map_imagetype: 'png'}, 
{'displayInLayerSwitcher':false});<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
var ruta22 = new OpenLayers.Layer.MapServer.Untiled( "Ruta 22", 
"../../cgi-bin/mapserv",<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; {map:'C:/data/publicacion.map', transparent: "true", 
<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: 
'ruta22_ida',map_imagetype: 'png'},{'isBaseLayer': false}, 
{'displayInLayerSwitcher':false});<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
var recorridos = new OpenLayers.Layer.MapServer.Untiled( "Unidad()", 
"../../cgi-bin/mapserv",<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; {map:'C:/data/publicacion.map', <BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: 'recorrido',transparent: "true", 
map_imagetype: 
'png'});<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; 
ruta22.setVisibility(false);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.addLayers([ruta22, manzanas, 
recorridos]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (!map.getCenter()) map.zoomToMaxExtent();<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setTimeout("Layer_redraw()",10*1000);<BR>}<BR><BR>function Layer_redraw() { 
<BR><BR>&nbsp;&nbsp;&nbsp; var name = 'Test Layer'; <BR>&nbsp;&nbsp;&nbsp; var 
url = "../../cgi-bin/mapserv"; <BR>&nbsp;&nbsp;&nbsp; var params = { map: 
'C:/data/publicacion.map',&nbsp; <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; layers: 'recorrido',<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; transparent: "true", 
<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 
map_imagetype: 'png'}; <BR><BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; var layer = 
new OpenLayers.Layer.WMS(name, url, params); <BR>&nbsp;&nbsp;&nbsp; var map = 
new OpenLayers.Map('map'); <BR>&nbsp;&nbsp;&nbsp; map.addLayer(layer); 
<BR>&nbsp;&nbsp;&nbsp; layer.redraw(true); <BR>} <BR>&nbsp; 
&lt;/script&gt;<BR>&nbsp; &lt;/head&gt;<BR>&nbsp; &lt;body 
onLoad="init()"&gt;<BR>&nbsp;&nbsp;&nbsp; 
&lt;table&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td 
align="left"&gt;&lt;div 
id="map"&gt;&lt;/div&gt;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;/tr&gt;<BR>&nbsp; &lt;/table&gt;<BR>&nbsp; 
&lt;/body&gt;<BR>&lt;/html&gt;<BR><BR>Thanks for 
all...<BR></DIV></DIV></BODY></HTML>