[OpenLayers-Users] Cleaning a map..

Imran Rajjad rajjad at gmail.com
Wed Jun 9 05:46:48 EDT 2010


Hi Ju

if i pass name = 'vec1' that function will get a layer with name
'vec1' and destroy all it features

function resetVecLayer(name)
        {
        	var layer=map.getLayersByName(name);
        	layer[0].destroyFeatures();
        }

regards,
Imran

On Wed, Jun 9, 2010 at 2:42 PM, JuKiM <rifins at gmail.com> wrote:
> Hi,
> I don't know if this is a trivial question.. But I can't get with it..
> How should a map be cleared? I have a map with some layers in it.. And some
> points and lines drawed in the different layers..
> By now, when I want to clean the map I destroy the different layers, and I
> add them again.. But is there any way to just remove the markers/features of
> each layer?
> Thanks!
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>



-- 
I.R



More information about the Users mailing list