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