Remove ol.sphere.WGS84

This commit is contained in:
Tim Schaub
2017-07-11 08:00:41 -06:00
parent aced192bcd
commit 2e903c0293
4 changed files with 32 additions and 31 deletions

View File

@@ -3,15 +3,16 @@
goog.provide('ol.Geolocation');
goog.require('ol');
goog.require('ol.Object');
goog.require('ol.GeolocationProperty');
goog.require('ol.Object');
goog.require('ol.Sphere');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.geom.Polygon');
goog.require('ol.has');
goog.require('ol.math');
goog.require('ol.proj');
goog.require('ol.sphere.WGS84');
goog.require('ol.proj.EPSG4326');
/**
@@ -59,6 +60,12 @@ ol.Geolocation = function(opt_options) {
*/
this.transform_ = ol.proj.identityTransform;
/**
* @private
* @type {ol.Sphere}
*/
this.sphere_ = new ol.Sphere(ol.proj.EPSG4326.RADIUS);
/**
* @private
* @type {number|undefined}
@@ -154,7 +161,7 @@ ol.Geolocation.prototype.positionChange_ = function(position) {
this.set(ol.GeolocationProperty.SPEED,
coords.speed === null ? undefined : coords.speed);
var geometry = ol.geom.Polygon.circular(
ol.sphere.WGS84, this.position_, coords.accuracy);
this.sphere_, this.position_, coords.accuracy);
geometry.applyTransform(this.transform_);
this.set(ol.GeolocationProperty.ACCURACY_GEOMETRY, geometry);
this.changed();