Accept a ol.ProjectionLike in ol.Geolocation#setProjection
This commit is contained in:
@@ -73,7 +73,7 @@ ol.Geolocation = function(opt_options) {
|
|||||||
this.handleTrackingChanged_, this);
|
this.handleTrackingChanged_, this);
|
||||||
|
|
||||||
if (options.projection !== undefined) {
|
if (options.projection !== undefined) {
|
||||||
this.setProjection(ol.proj.get(options.projection));
|
this.setProjection(options.projection);
|
||||||
}
|
}
|
||||||
if (options.trackingOptions !== undefined) {
|
if (options.trackingOptions !== undefined) {
|
||||||
this.setTrackingOptions(options.trackingOptions);
|
this.setTrackingOptions(options.trackingOptions);
|
||||||
@@ -308,13 +308,13 @@ ol.Geolocation.prototype.getTrackingOptions = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the projection to use for transforming the coordinates.
|
* 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.
|
* reported in.
|
||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.Geolocation.prototype.setProjection = function(projection) {
|
ol.Geolocation.prototype.setProjection = function(projection) {
|
||||||
this.set(ol.GeolocationProperty.PROJECTION, projection);
|
this.set(ol.GeolocationProperty.PROJECTION, ol.proj.get(projection));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user