From 8cb20f771c954661471b01d7d621c41c042e99b3 Mon Sep 17 00:00:00 2001
From: Logan B <3870583+thinkpoop@users.noreply.github.com>
Date: Sun, 22 Dec 2024 15:37:55 -0600
Subject: [PATCH] [mylocation] add title to save button; tweak button ids; add
null check to locate-marker if
---
apps/mylocation/interface.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/apps/mylocation/interface.html b/apps/mylocation/interface.html
index 29989a368..78141c400 100644
--- a/apps/mylocation/interface.html
+++ b/apps/mylocation/interface.html
@@ -35,9 +35,9 @@
Click the map to select a location
-
-
-
+
+
+
@@ -82,7 +82,7 @@
document.getElementById("select-hint").style.display="none";
document.getElementById("select").style.display="";
- document.getElementById("find-marker").style.display="";
+ document.getElementById("locate-marker").style.display="";
}
map.on('click', function(e){
@@ -97,12 +97,12 @@
return {lat: file.lat, lng: file.lon};
}
- document.getElementById("locate").addEventListener("click", function() {
+ document.getElementById("locate-me").addEventListener("click", function() {
map.locate({setView: true, maxZoom: 16, enableHighAccuracy:true});
});
- document.getElementById("find-marker").addEventListener("click", function() {
- if(latlon && latlon.lng && latlon.lat) {
+ document.getElementById("locate-marker").addEventListener("click", function() {
+ if (latlon && latlon.lng != null && latlon.lat != null) {
map.setView(latlon);
}
});