From 02c2e1b7d061a3eea3da598dcc8faf20357db02f Mon Sep 17 00:00:00 2001 From: log101 Date: Tue, 30 Jan 2024 20:40:05 +0300 Subject: [PATCH] feat: first ask for permission on maps --- src/scripts/initMap.js | 4 ++-- src/scripts/initSelectionMap.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/initMap.js b/src/scripts/initMap.js index ce83d39..6759903 100644 --- a/src/scripts/initMap.js +++ b/src/scripts/initMap.js @@ -62,7 +62,7 @@ L.Control.GoToCurrentLocation = L.Control.extend({ onAdd: function (map) { const locationButton = document.createElement('button'); - locationButton.textContent = 'Konumuma Git'; + locationButton.textContent = 'Konum İzni Ver'; locationButton.classList.add('custom-map-control-button'); @@ -71,7 +71,7 @@ L.Control.GoToCurrentLocation = L.Control.extend({ locationButton.addEventListener('click', () => { if (watchId === -1) { startWatchingLocation() - map.setView(currentLocationMarker.getLatLng(), 12); + locationButton.textContent = 'Konumuma Git'; } else { map.setView(currentLocationMarker.getLatLng(), 12); } diff --git a/src/scripts/initSelectionMap.js b/src/scripts/initSelectionMap.js index 865624c..0afa126 100644 --- a/src/scripts/initSelectionMap.js +++ b/src/scripts/initSelectionMap.js @@ -53,7 +53,7 @@ L.Control.GoToCurrentLocation = L.Control.extend({ onAdd: function (map) { const locationButton = document.createElement('button'); - locationButton.textContent = 'Konumuma Git'; + locationButton.textContent = 'Konum İzni Ver'; locationButton.classList.add('custom-map-control-button'); @@ -62,7 +62,7 @@ L.Control.GoToCurrentLocation = L.Control.extend({ locationButton.addEventListener('click', (ev) => { if (watchId === -1) { startWatchingLocation() - map.setView(currentLocationMarker.getLatLng(), 12); + locationButton.textContent = 'Konumuma Git'; } else { map.setView(currentLocationMarker.getLatLng(), 12); }