We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The web-app keeps reloading the location on Android and ignores maximumAge. Therefore the overlay is shown more or less all the time.
Proposed solution
function changelocation(location) { var now = new Date(); if(lastUpdateTime && now.getTime() - lastUpdateTime.getTime() < 15000){ console.log("Ignoring position update"); return; } lastUpdateTime = now; if (location.coords.latitude!=$("body").data("mapcenterlat") || location.coords.longitude!=$("body").data("mapcenterlong")) { $("body").data("mapcenterlat", location.coords.latitude); $("body").data("mapcenterlong", location.coords.longitude); map.removeLayer(circle); circle = L.circle([$("body").data("mapcenterlat"), $("body").data("mapcenterlong")],40*5, { color: 'green', fillColor: '#0f0', fillOpacity: 0.1 }).addTo(map); map.setView(new L.LatLng($("body").data("mapcenterlat"), $("body").data("mapcenterlong")), $("body").data("mapzoom")); if (window.ga) ga('send', 'event', 'geolocation', 'latlong', $("body").data("mapcenterlat")+","+$("body").data("mapcenterlong")); savegeolocation(); } }
See also: https://stackoverflow.com/questions/35294154/cordova-geolocation-watchposition-frequency-is-higher-than-the-options-allow-it/35310256
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The web-app keeps reloading the location on Android and ignores maximumAge. Therefore the overlay is shown more or less all the time.
Proposed solution
See also: https://stackoverflow.com/questions/35294154/cordova-geolocation-watchposition-frequency-is-higher-than-the-options-allow-it/35310256
The text was updated successfully, but these errors were encountered: