make setting the map a function call. this way we can intercept and tag on event handlers.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@528 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -43,6 +43,13 @@ OpenLayers.Layer.prototype = {
|
|||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {OpenLayers.Map} map
|
||||||
|
*/
|
||||||
|
setMap: function(map) {
|
||||||
|
this.map = map;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {bool}
|
* @return {bool}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ OpenLayers.Map.prototype = {
|
|||||||
* @param {OpenLayers.Layer} layer
|
* @param {OpenLayers.Layer} layer
|
||||||
*/
|
*/
|
||||||
addLayer: function (layer, zIndex) {
|
addLayer: function (layer, zIndex) {
|
||||||
layer.map = this;
|
layer.setMap(this);
|
||||||
layer.div.style.overflow = "";
|
layer.div.style.overflow = "";
|
||||||
if (zIndex) {
|
if (zIndex) {
|
||||||
layer.div.style.zIndex = zIndex;
|
layer.div.style.zIndex = zIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user