[user-location] update portal distance when GPS fix is available
This commit is contained in:
parent
d55d363112
commit
e03bbf50f1
@ -112,6 +112,11 @@ window.plugin.userLocation.onLocationChange = function(lat, lng) {
|
||||
window.plugin.userLocation.marker.setLatLng(latlng);
|
||||
window.plugin.userLocation.circle.setLatLng(latlng);
|
||||
|
||||
if(window.plugin.distanceToPortal) {
|
||||
window.plugin.distanceToPortal.currentLoc = latlng;
|
||||
window.plugin.distanceToPortal.updateDistance();
|
||||
}
|
||||
|
||||
if(window.plugin.userLocation.follow) {
|
||||
// move map if marker moves more than 35% from the center
|
||||
// 100% - 2*15% = 70% → 35% from center in either direction
|
||||
|
Loading…
x
Reference in New Issue
Block a user