forked from MapComplete/MapComplete
		
	Change geolocation behaviour: will not zoom out anymore
This commit is contained in:
		
							parent
							
								
									6e0f57f368
								
							
						
					
					
						commit
						4e3f408d53
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -273,7 +273,9 @@ export default class GeoLocationHandler extends VariableUiElement { | |||
|                 location | ||||
|             ); | ||||
|         } else { | ||||
|             this._leafletMap.data.setView([location.latitude, location.longitude], targetZoom); | ||||
|             const currentZoom = this._leafletMap.data.getZoom() | ||||
|              | ||||
|             this._leafletMap.data.setView([location.latitude, location.longitude], Math.max(targetZoom ?? 0, currentZoom)); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue