Make ol.Map#setView do not accept undefined

With this change map.setView(null) is permitted, but map.setView(undefined) is not. map.getView now always returns a defined value, which may be null is setView was called with null.
This commit is contained in:
Éric Lemoine
2014-09-17 11:25:14 +02:00
parent 163cc5b873
commit cb8b896230
8 changed files with 11 additions and 11 deletions
@@ -70,7 +70,7 @@ ol.interaction.KeyboardZoom.prototype.handleMapBrowserEvent =
var delta = (charCode == '+'.charCodeAt(0)) ? this.delta_ : -this.delta_;
map.render();
var view = map.getView();
goog.asserts.assert(goog.isDef(view));
goog.asserts.assert(!goog.isNull(view));
ol.interaction.Interaction.zoomByDelta(
map, view, delta, undefined, this.duration_);
mapBrowserEvent.preventDefault();