Allow strings to be used wherever projections are needed

This commit is contained in:
Tom Payne
2013-03-06 18:48:53 +01:00
parent afcbec469a
commit eaa17758bd
8 changed files with 45 additions and 30 deletions

View File

@@ -41,9 +41,9 @@ ol.control.MousePosition = function(opt_options) {
/**
* @private
* @type {ol.Projection|undefined}
* @type {ol.Projection}
*/
this.projection_ = options.projection;
this.projection_ = ol.projection.get(options.projection);
/**
* @private
@@ -168,7 +168,7 @@ ol.control.MousePosition.prototype.updateHTML_ = function(pixel) {
var html = this.undefinedHTML_;
if (!goog.isNull(pixel)) {
if (this.renderedProjection_ != this.mapProjection_) {
if (goog.isDef(this.projection_)) {
if (!goog.isNull(this.projection_)) {
this.transform_ = ol.projection.getTransform(
this.mapProjection_, this.projection_);
} else {