commit da47dd99b35106e59b855e8b275fd8a81fe77d3f parent 3eec115dd3436c7d361088b471836e68a5427560 Author: Sergej Orlov <wladimirych@gmail.com> Date: Tue, 29 May 2018 01:31:27 +0300 [geolocation] more strict check for browser support Diffstat:
M | src/lib/leaflet.control.locate/index.js | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/leaflet.control.locate/index.js b/src/lib/leaflet.control.locate/index.js @@ -172,7 +172,7 @@ const LocateControl = L.Control.extend({ }, _startLocating: function() { - if (!('geolocation' in navigator)) { + if (!('geolocation' in navigator) || !('watchPosition' in navigator.geolocation)) { const error = {code: 0, message: 'Geolocation not supported'}; setTimeout(() => { this._onLocationError(error);