Remove use of toDegrees/toRadians util functions

Instead of goog.math.toRadians and goog.math.toDegrees, we now use
our own implementations of these basic conversion functions.
This commit is contained in:
Marc Jansen
2015-10-12 21:10:37 +02:00
parent 758bab8e30
commit 47a7b03e0e
9 changed files with 81 additions and 33 deletions

View File

@@ -5,12 +5,12 @@ goog.provide('ol.GeolocationProperty');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('goog.math');
goog.require('ol.Coordinate');
goog.require('ol.Object');
goog.require('ol.geom.Geometry');
goog.require('ol.geom.Polygon');
goog.require('ol.has');
goog.require('ol.math');
goog.require('ol.proj');
goog.require('ol.sphere.WGS84');
@@ -160,7 +160,7 @@ ol.Geolocation.prototype.positionChange_ = function(position) {
coords.altitudeAccuracy === null ?
undefined : coords.altitudeAccuracy);
this.set(ol.GeolocationProperty.HEADING, coords.heading === null ?
undefined : goog.math.toRadians(coords.heading));
undefined : ol.math.toRadians(coords.heading));
if (!this.position_) {
this.position_ = [coords.longitude, coords.latitude];
} else {