[OpenLayers-Users] change a layer's url
Gregor Mosheh
gregor at hostgis.com
Wed Apr 16 16:38:10 EDT 2008
Richard Greenwood wrote:
> Is it possible to modify a layer's url after it has been added to a
> map with map.addLayer()? And similarly, is it possible to dynamically
> alter a layer's params?
Yeah; I do it all the time. Use mergeNewParams()
l = layers['storms'];
l.mergeNewParams(date:'20080414', time:1530);
I don't think that a l.reload() would even be necessary. I think that
mergeNewParams() calls reload.
--
Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development & hosting services
http://www.HostGIS.com/
"Remember that no one cares if you can back up,
only if you can restore." - AMANDA
More information about the Users
mailing list