make an accessor for setting isBaseLayer, because we need to trigger the 'changelayer' (assuming our layer has already been added to a map)
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1324 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -226,6 +226,16 @@ OpenLayers.Layer.prototype = {
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************/
|
/********************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Boolean} isBaseLayer
|
||||||
|
*/
|
||||||
|
setIsBaseLayer: function(isBaseLayer) {
|
||||||
|
this.isBaseLayer = isBaseLayer;
|
||||||
|
if (this.map != null) {
|
||||||
|
this.map.events.triggerEvent("changelayer");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user