Separate ol.projection module from ol.Projection class

This commit is contained in:
Tom Payne
2013-03-03 13:09:13 +01:00
parent 3e420313a2
commit fcc620af7d
28 changed files with 165 additions and 149 deletions

View File

@@ -9,6 +9,7 @@ goog.require('goog.math');
goog.require('ol.Coordinate');
goog.require('ol.Object');
goog.require('ol.Projection');
goog.require('ol.projection');
/**
@@ -75,8 +76,8 @@ ol.Geolocation.prototype.disposeInternal = function() {
ol.Geolocation.prototype.handleProjectionChanged_ = function() {
var projection = this.getProjection();
if (goog.isDefAndNotNull(projection)) {
this.transformCoords_ = ol.Projection.getTransform(
ol.Projection.getFromCode('EPSG:4326'), projection);
this.transformCoords_ = ol.projection.getTransform(
ol.projection.getFromCode('EPSG:4326'), projection);
if (!goog.isNull(this.position_)) {
this.set(ol.GeolocationProperty.POSITION,
this.transformCoords_(this.position_));