From a4f07c3a3fa91e3004ffca9314dc670173380b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 13 Oct 2016 14:57:33 +0200 Subject: [PATCH] misc: allow for less accurate geolocation (#13588) --- wcs/qommon/static/js/qommon.geolocation.js | 4 +++- wcs/qommon/static/js/qommon.map.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wcs/qommon/static/js/qommon.geolocation.js b/wcs/qommon/static/js/qommon.geolocation.js index 0ad2c67..b8d7a3a 100644 --- a/wcs/qommon/static/js/qommon.geolocation.js +++ b/wcs/qommon/static/js/qommon.geolocation.js @@ -188,7 +188,9 @@ function geoloc_prefill(element_type, element_value) $('div[data-geolocation] label').removeClass('activity'); $($('div[data-geolocation] label')[0]).after( '' + error_msg.message + ''); - }); + }, + {timeout: 10000, maximumAge: 300000, enableHighAccuracy: false} + ); } } }); diff --git a/wcs/qommon/static/js/qommon.map.js b/wcs/qommon/static/js/qommon.map.js index cee5d22..93d943b 100644 --- a/wcs/qommon/static/js/qommon.map.js +++ b/wcs/qommon/static/js/qommon.map.js @@ -70,7 +70,7 @@ $(window).on('load', function() { $map_widget.parent().parent().find('label').after('' + message + ''); }); $map_widget.parent().parent().find('label').addClass('activity') - map.locate({timeout: 10000, maximumAge: 60000}); + map.locate({timeout: 10000, maximumAge: 300000, enableHighAccuracy: false}); } if ($(this).data('geojson-url')) { $.getJSON($(this).data('geojson-url'), function(data) { -- 2.9.3