From 9b18c0ec2c0228e4484e9da09ec461cc2a0cc1c3 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 1 May 2024 04:42:25 +0200 Subject: [PATCH] Implement #21 --- index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.html b/index.html index aa94c8b..8be04c2 100644 --- a/index.html +++ b/index.html @@ -600,6 +600,12 @@ selected_box = [latlngToMercator({lat: +arr[0], lng: +arr[1]}), latlngToMercator({lat: +arr[2], lng: +arr[3]})]; showReport(); } + } else { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(position => { + map.setView([position.coords.latitude, position.coords.longitude]); + }); + } } /// Sequential loading for different levels of details