From 0335d4aa6a790c168ab3a02f20d8e26329c3c4eb Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 10 Mar 2014 17:19:29 +0100 Subject: [PATCH] Use oli.View2DState instead of ol.View2DState --- src/ol/control/scalelinecontrol.js | 3 +-- src/ol/iview2d.js | 12 +----------- src/ol/view2d.js | 4 ++-- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/ol/control/scalelinecontrol.js b/src/ol/control/scalelinecontrol.js index 2aafe41044..91f5dfadc5 100644 --- a/src/ol/control/scalelinecontrol.js +++ b/src/ol/control/scalelinecontrol.js @@ -11,7 +11,6 @@ goog.require('goog.math'); goog.require('goog.style'); goog.require('ol.Object'); goog.require('ol.TransformFunction'); -goog.require('ol.View2DState'); goog.require('ol.control.Control'); goog.require('ol.css'); goog.require('ol.proj'); @@ -79,7 +78,7 @@ ol.control.ScaleLine = function(opt_options) { /** * @private - * @type {?ol.View2DState} + * @type {?oli.View2DState} */ this.view2DState_ = null; diff --git a/src/ol/iview2d.js b/src/ol/iview2d.js index 0969e6d696..dcdf0c9f22 100644 --- a/src/ol/iview2d.js +++ b/src/ol/iview2d.js @@ -1,18 +1,8 @@ goog.provide('ol.IView2D'); -goog.provide('ol.View2DState'); goog.require('ol.Coordinate'); -/** - * @typedef {{center: ol.Coordinate, - * projection: ol.proj.Projection, - * resolution: number, - * rotation: number}} - */ -ol.View2DState; - - /** * 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() { }; diff --git a/src/ol/view2d.js b/src/ol/view2d.js index 0276506464..9cf2cea83a 100644 --- a/src/ol/view2d.js +++ b/src/ol/view2d.js @@ -368,12 +368,12 @@ ol.View2D.prototype.getView2DState = function() { var projection = this.getProjection(); var resolution = /** @type {number} */ (this.getResolution()); var rotation = this.getRotation(); - return { + return /** @type {oli.View2DState} */ ({ center: center.slice(), projection: goog.isDef(projection) ? projection : null, resolution: resolution, rotation: goog.isDef(rotation) ? rotation : 0 - }; + }); };