Rename ol.projection to ol.proj

This commit is contained in:
Tom Payne
2013-05-30 18:55:58 +02:00
parent 795ea69982
commit 46553c719c
50 changed files with 345 additions and 370 deletions
+5 -5
View File
@@ -14,7 +14,7 @@ goog.require('ol.Pixel');
goog.require('ol.Projection');
goog.require('ol.TransformFunction');
goog.require('ol.control.Control');
goog.require('ol.projection');
goog.require('ol.proj');
@@ -44,7 +44,7 @@ ol.control.MousePosition = function(opt_options) {
* @private
* @type {ol.Projection}
*/
this.projection_ = ol.projection.get(options.projection);
this.projection_ = ol.proj.get(options.projection);
/**
* @private
@@ -75,7 +75,7 @@ ol.control.MousePosition = function(opt_options) {
* @private
* @type {ol.TransformFunction}
*/
this.transform_ = ol.projection.identityTransform;
this.transform_ = ol.proj.identityTransform;
/**
* @private
@@ -157,10 +157,10 @@ ol.control.MousePosition.prototype.updateHTML_ = function(pixel) {
if (!goog.isNull(pixel)) {
if (this.renderedProjection_ != this.mapProjection_) {
if (!goog.isNull(this.projection_)) {
this.transform_ = ol.projection.getTransformFromProjections(
this.transform_ = ol.proj.getTransformFromProjections(
this.mapProjection_, this.projection_);
} else {
this.transform_ = ol.projection.identityTransform;
this.transform_ = ol.proj.identityTransform;
}
this.renderedProjection_ = this.mapProjection_;
}
+3 -3
View File
@@ -12,7 +12,7 @@ goog.require('ol.ProjectionUnits');
goog.require('ol.TransformFunction');
goog.require('ol.control.Control');
goog.require('ol.css');
goog.require('ol.projection');
goog.require('ol.proj');
goog.require('ol.sphere.NORMAL');
@@ -157,8 +157,8 @@ ol.control.ScaleLine.prototype.updateElement_ = function(frameState) {
// Convert pointResolution from meters or feet to degrees
if (goog.isNull(this.toEPSG4326_)) {
this.toEPSG4326_ = ol.projection.getTransformFromProjections(
projection, ol.projection.get('EPSG:4326'));
this.toEPSG4326_ = ol.proj.getTransformFromProjections(
projection, ol.proj.get('EPSG:4326'));
}
cosLatitude = Math.cos(goog.math.toRadians(this.toEPSG4326_(center)[1]));
var radius = ol.sphere.NORMAL.radius;