Use no browser globals at all
This commit is contained in:
@@ -95,12 +95,12 @@ ol.Geolocation.prototype.handleTrackingChanged_ = function() {
|
||||
if (ol.Geolocation.SUPPORTED) {
|
||||
var tracking = this.getTracking();
|
||||
if (tracking && !goog.isDef(this.watchId_)) {
|
||||
this.watchId_ = navigator.geolocation.watchPosition(
|
||||
this.watchId_ = goog.global.navigator.geolocation.watchPosition(
|
||||
goog.bind(this.positionChange_, this),
|
||||
goog.bind(this.positionError_, this),
|
||||
this.getTrackingOptions());
|
||||
} else if (!tracking && goog.isDef(this.watchId_)) {
|
||||
navigator.geolocation.clearWatch(this.watchId_);
|
||||
goog.global.navigator.geolocation.clearWatch(this.watchId_);
|
||||
this.watchId_ = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user