Activating strategies after adding the layer to the map. r=elemoine (closes #1920)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9266 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-04-10 21:59:57 +00:00
parent ddbf4b5222
commit e0faaf59d9
4 changed files with 33 additions and 0 deletions

View File

@@ -350,6 +350,15 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
this.renderer.map = this.map;
this.renderer.setSize(this.map.getSize());
}
},
/**
* Method: afterAdd
* Called at the end of the map.addLayer sequence. At this point, the map
* will have a base layer. Any autoActivate strategies will be
* activated here.
*/
afterAdd: function() {
if(this.strategies) {
var strategy, i, len;
for(i=0, len=this.strategies.length; i<len; i++) {