[OpenLayers-Users] remove layers

Bill Woodall bwoodall at wardrobe.dhs.org
Fri Mar 23 02:19:23 EDT 2007


Hi Brad,

if your map is like;

    map = new OpenLayers.Map('WMS map for Brad', options);

then your removelayer should like something like;

    if (miscLayer) { map.removeLayer(miscLayer); }


........Bill,

On Fri, 2007-03-23 at 15:40 +1100, bradleyspencer wrote:
> I have been trying to use removeLayers to kill a layer and then add a
> new  layer in its place.
> 
>  
> 
> I use >> if (miscLayer) {removeLayer(miscLayer);}
> 
>  
> 
> But FireFox tells me that removeLayer is not defined?
> 
>  
> 
> I am just using the following code base.
> 
>  
> 
> src="http://www.openlayers.org/api/OpenLayers.js”
> 
>  
> 
> Cheers,
> 
>  
> 
> Brad Spencer
> 
> General Manager
> 
> CubeWerx Australia Pty Ltd
> 
> ABN: 37 115 163 285
> 
> Mob: +61 (0)404 841 131
> 
> Tel/Fax: +61 (0)2 9481 7024
> 
> mailto:brad at cubewerx.com.au
> 
> http://www.cubewerx.com.au
> 
>  
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list