From d8ed2eb1be38ab15fc41a254c6a75830faa6a3c6 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 8 Jun 2017 16:10:46 +0200 Subject: [PATCH] Accept a ol.ProjectionLike in ol.Geolocation#setProjection --- src/ol/geolocation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/geolocation.js b/src/ol/geolocation.js index 1dcd677b68..c9d3635267 100644 --- a/src/ol/geolocation.js +++ b/src/ol/geolocation.js @@ -73,7 +73,7 @@ ol.Geolocation = function(opt_options) { this.handleTrackingChanged_, this); if (options.projection !== undefined) { - this.setProjection(ol.proj.get(options.projection)); + this.setProjection(options.projection); } if (options.trackingOptions !== undefined) { this.setTrackingOptions(options.trackingOptions); @@ -308,13 +308,13 @@ ol.Geolocation.prototype.getTrackingOptions = function() { /** * Set the projection to use for transforming the coordinates. - * @param {ol.proj.Projection} projection The projection the position is + * @param {ol.ProjectionLike} projection The projection the position is * reported in. * @observable * @api */ ol.Geolocation.prototype.setProjection = function(projection) { - this.set(ol.GeolocationProperty.PROJECTION, projection); + this.set(ol.GeolocationProperty.PROJECTION, ol.proj.get(projection)); };