Remove geolocation detection from ol/has

This commit is contained in:
Frederic Junod
2019-05-18 08:22:48 +02:00
parent 0631a121c3
commit 39bb6a8ffe
3 changed files with 11 additions and 11 deletions

View File

@@ -6,7 +6,6 @@ import {listen} from './events.js';
import Event from './events/Event.js';
import EventType from './events/EventType.js';
import {circular as circularPolygon} from './geom/Polygon.js';
import {GEOLOCATION} from './has.js';
import {toRadians} from './math.js';
import {get as getProjection, getTransformFromProjections, identityTransform} from './proj.js';
@@ -160,7 +159,7 @@ class Geolocation extends BaseObject {
* @private
*/
handleTrackingChanged_() {
if (GEOLOCATION) {
if ('geolocation' in navigator) {
const tracking = this.getTracking();
if (tracking && this.watchId_ === undefined) {
this.watchId_ = navigator.geolocation.watchPosition(