<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 &quot;redraw&quot; 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=&quot;text/css&quot;&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=&quot;OpenLayers.js&quot;&gt;&lt;/script&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot;&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: &#39;auto&#39;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection:&quot;EPSG:32717&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; units: &quot;m&quot;};<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var map = new OpenLayers.Map(&#39;map&#39;, 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({&#39;div&#39;:OpenLayers.Util.getElement(&#39;coords&#39;)}));<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var manzanas = new OpenLayers.Layer.MapServer.Untiled( &quot;manzanas&quot;, &quot;../../cgi-bin/mapserv&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {map:&#39;C:/data/publicacion.map&#39;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: &#39;manzanas&#39;,map_imagetype: &#39;png&#39;}, {&#39;displayInLayerSwitcher&#39;:false});<br>
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var ruta22 = new OpenLayers.Layer.MapServer.Untiled( &quot;Ruta 22&quot;, &quot;../../cgi-bin/mapserv&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {map:&#39;C:/data/publicacion.map&#39;, transparent: &quot;true&quot;, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: &#39;ruta22_ida&#39;,map_imagetype: &#39;png&#39;},{&#39;isBaseLayer&#39;: false}, {&#39;displayInLayerSwitcher&#39;:false});<br>
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var recorridos = new OpenLayers.Layer.MapServer.Untiled( &quot;Unidad()&quot;, &quot;../../cgi-bin/mapserv&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {map:&#39;C:/data/publicacion.map&#39;, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: &#39;recorrido&#39;,transparent: &quot;true&quot;, map_imagetype: &#39;png&#39;});<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(&quot;Layer_redraw()&quot;,10*1000);<br>
}<br><br>function Layer_redraw() { <br><br>&nbsp;&nbsp;&nbsp; var name = &#39;Test Layer&#39;; <br>&nbsp;&nbsp;&nbsp; var url = &quot;../../cgi-bin/mapserv&quot;; <br>&nbsp;&nbsp;&nbsp; var params = { map: &#39;C:/data/publicacion.map&#39;,&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; layers: &#39;recorrido&#39;,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; transparent: &quot;true&quot;, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; map_imagetype: &#39;png&#39;}; <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(&#39;map&#39;); <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=&quot;init()&quot;&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=&quot;left&quot;&gt;&lt;div id=&quot;map&quot;&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>