Avoid undefined rotation
This commit is contained in:
+2
-2
@@ -496,10 +496,10 @@ ol.Map.prototype.getRotatedExtent = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number|undefined} Rotation.
|
* @return {number} Rotation.
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.getRotation = function() {
|
ol.Map.prototype.getRotation = function() {
|
||||||
return /** @type {number|undefined} */ this.get(ol.MapProperty.ROTATION);
|
return /** @type {number} */ this.get(ol.MapProperty.ROTATION) || 0;
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.Map.prototype,
|
ol.Map.prototype,
|
||||||
|
|||||||
Reference in New Issue
Block a user