[OpenLayers-Users] change a layer's url
Richard Greenwood
richard.greenwood at gmail.com
Fri Apr 18 16:24:19 EDT 2008
On Wed, Apr 16, 2008 at 2:38 PM, Gregor Mosheh <gregor at hostgis.com> wrote:
> 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);
Thanks! A minor correction for the archive, the parameter list must be within {}
l.mergeNewParams( {date:'20080414', time:1530} ;
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the Users
mailing list