[OpenLayers-Dev] prevent layers from getting added

Tim Schaub tschaub at opengeo.org
Mon Jun 8 11:03:12 EDT 2009


bartvde at osgis.nl wrote:
> Hi list,
> currently there seems no option to prevent layers from getting added to
> the map object. I thought I could use the preaddlayer event for this, but
> that does not seem possible currently.

I think any "before{subject}{predicate}" listener should be able to 
return false to stop the pertinent action.  I'd consider any patch 
adding this behavior a step in the right direction (even if the event 
name doesn't conform with that template).


> Is there interest in creating a patch for such a feature? Do people think
> this would be useful general functionality?
> Best regards,
> Bart
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.

More information about the Dev mailing list