Avoid undefined rotation

This commit is contained in:
Tim Schaub
2012-09-29 17:47:44 -06:00
parent 69859b415b
commit 0e27f31785

View File

@@ -496,10 +496,10 @@ ol.Map.prototype.getRotatedExtent = function() {
/**
* @return {number|undefined} Rotation.
* @return {number} Rotation.
*/
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(
ol.Map.prototype,