Use oli.View2DState instead of ol.View2DState

This commit is contained in:
Tom Payne
2014-03-10 17:19:29 +01:00
parent 0a3ef09c30
commit 0335d4aa6a
3 changed files with 4 additions and 15 deletions
+1 -2
View File
@@ -11,7 +11,6 @@ goog.require('goog.math');
goog.require('goog.style'); goog.require('goog.style');
goog.require('ol.Object'); goog.require('ol.Object');
goog.require('ol.TransformFunction'); goog.require('ol.TransformFunction');
goog.require('ol.View2DState');
goog.require('ol.control.Control'); goog.require('ol.control.Control');
goog.require('ol.css'); goog.require('ol.css');
goog.require('ol.proj'); goog.require('ol.proj');
@@ -79,7 +78,7 @@ ol.control.ScaleLine = function(opt_options) {
/** /**
* @private * @private
* @type {?ol.View2DState} * @type {?oli.View2DState}
*/ */
this.view2DState_ = null; this.view2DState_ = null;
+1 -11
View File
@@ -1,18 +1,8 @@
goog.provide('ol.IView2D'); goog.provide('ol.IView2D');
goog.provide('ol.View2DState');
goog.require('ol.Coordinate'); goog.require('ol.Coordinate');
/**
* @typedef {{center: ol.Coordinate,
* projection: ol.proj.Projection,
* resolution: number,
* rotation: number}}
*/
ol.View2DState;
/** /**
* Interface for views. * Interface for views.
@@ -55,7 +45,7 @@ ol.IView2D.prototype.getRotation = function() {
/** /**
* @return {ol.View2DState} View2D state. * @return {oli.View2DState} View2D state.
*/ */
ol.IView2D.prototype.getView2DState = function() { ol.IView2D.prototype.getView2DState = function() {
}; };
+2 -2
View File
@@ -368,12 +368,12 @@ ol.View2D.prototype.getView2DState = function() {
var projection = this.getProjection(); var projection = this.getProjection();
var resolution = /** @type {number} */ (this.getResolution()); var resolution = /** @type {number} */ (this.getResolution());
var rotation = this.getRotation(); var rotation = this.getRotation();
return { return /** @type {oli.View2DState} */ ({
center: center.slice(), center: center.slice(),
projection: goog.isDef(projection) ? projection : null, projection: goog.isDef(projection) ? projection : null,
resolution: resolution, resolution: resolution,
rotation: goog.isDef(rotation) ? rotation : 0 rotation: goog.isDef(rotation) ? rotation : 0
}; });
}; };