[OpenLayers-Users] Fwd: Refresh html without losing,
what I've done
Alan Boudreault
aboudreault at mapgears.com
Thu Jul 31 22:04:02 EDT 2008
You recreate a layer. You should not do that, you must redraw the same
layer that is already added/draw on your map. (use javascript global
variable)
Please, post your email on the mailing-list only.
Thanks,
Alan
David Calle wrote:
> Yeah, I try it.... check this please
> What's wrong...?
>
> ......
> map.addLayers([ruta22, ruta8, manzanas, paradas8,
> paradas22, recorridos]);
> if (!map.getCenter()) map.zoomToMaxExtent();
>
> redrawLayers(true);
> setTimeout("redrawLayers(true)",10*1000);
> }
>
> function redrawLayers()
> {
> var recorridos = new OpenLayers.Layer.MapServer.Untiled(
> "Unidad()", "../../cgi-bin/mapserv",
> {map:'C:/data/publicacion.map',
> layers: 'recorrido',transparent: "true", map_imagetype:
> 'png'});
>
> recorridos.redraw(true);
> }
>
>
> </script>
> </head>
> <body onLoad="init()">
> <table>
> <tr>
> <td align="left"><div id="map"></div></td>
> </tr>
> </table>
> </body>
> </html>
>
>
> ......
>
>
--
Alan Boudreault
Mapgears
http://www.mapgears.com/
More information about the Users
mailing list