Making map_ protected instead of private.
This commit is contained in:
@@ -58,7 +58,7 @@ ol.control.Zoom.prototype.setMap = function(map) {
|
||||
ol.control.Zoom.prototype.activate = function() {
|
||||
var active = goog.base(this, 'activate');
|
||||
if (active) {
|
||||
this.getMap().getEvents().register("click", this.handle, this);
|
||||
this.map_.getEvents().register("click", this.handle, this);
|
||||
}
|
||||
return active;
|
||||
};
|
||||
@@ -67,7 +67,7 @@ ol.control.Zoom.prototype.activate = function() {
|
||||
ol.control.Zoom.prototype.deactivate = function() {
|
||||
var inactive = goog.base(this, 'deactivate');
|
||||
if (inactive) {
|
||||
this.getMap().getEvents().unregister("click", this.handle, this);
|
||||
this.map_.getEvents().unregister("click", this.handle, this);
|
||||
}
|
||||
return inactive;
|
||||
};
|
||||
@@ -79,11 +79,11 @@ ol.control.Zoom.prototype.handle = function(evt) {
|
||||
var target = /** @type {Node} */ (evt.target),
|
||||
handled = false;
|
||||
if (goog.dom.getAncestorByClass(target, ol.control.Zoom.RES.IN_CLS)) {
|
||||
this.getMap().zoomIn();
|
||||
this.map_.zoomIn();
|
||||
handled = true;
|
||||
} else
|
||||
if (goog.dom.getAncestorByClass(target, ol.control.Zoom.RES.OUT_CLS)) {
|
||||
this.getMap().zoomOut();
|
||||
this.map_.zoomOut();
|
||||
handled = true;
|
||||
}
|
||||
if (handled) {
|
||||
|
||||
Reference in New Issue
Block a user