diff --git a/html/map.ejs b/html/map.ejs
index 08b4075e..edadeba8 100644
--- a/html/map.ejs
+++ b/html/map.ejs
@@ -79,13 +79,22 @@
}
function locateAndUpdate() {
+ const locateBtn = document.getElementById('locate-btn');
+ locateBtn.textContent = '⏳ Locating...';
if (!navigator.geolocation) {
alert('Geolocation is not supported by your browser.');
+ locateBtn.textContent = '📍 Locate';
return;
}
navigator.geolocation.getCurrentPosition(
- pos => updateMap(pos.coords.latitude, pos.coords.longitude),
- err => alert('Unable to retrieve location: ' + err.message),
+ pos => {
+ updateMap(pos.coords.latitude, pos.coords.longitude);
+ locateBtn.textContent = '📍 Locate';
+ },
+ err => {
+ alert('Unable to retrieve location: ' + err.message);
+ locateBtn.textContent = '📍 Locate';
+ },
{ enableHighAccuracy: true, timeout: 10000, maximumAge: 0 }
);
}
@@ -145,18 +154,19 @@
}
const form = document.createElement('form');
- form.style = 'position:absolute;top:10px;right:10px;z-index:9999;background:#fff;padding:10px 12px;border-radius:12px;box-shadow:0 4px 10px rgba(0,0,0,0.15);font-family:sans-serif;min-width:260px;';
+ form.style = 'position:absolute;top:10px;right:10px;z-index:9999;background:rgba(0,0,0,0.5);backdrop-filter:blur(12px);padding:10px 12px;border-radius:12px;box-shadow:0 4px 10px rgba(0,0,0,0.4);font-family:sans-serif;min-width:220px;';
form.innerHTML = `
-
-
+
+
-
-
-
+
+
+
`;
document.body.appendChild(form);
+ document.getElementById('locate-btn').addEventListener('click', locateAndUpdate);
const input = form.querySelector('#searchBox');
const suggestions = form.querySelector('#suggestions');
@@ -171,7 +181,7 @@
data.forEach(place => {
const li = document.createElement('li');
li.textContent = place.display_name;
- li.style = 'padding:6px 10px;cursor:pointer;border-bottom:1px solid #eee;font-size:13px';
+ li.style = 'padding:6px 10px;cursor:pointer;border-bottom:1px solid #222;font-size:13px;background:#111';
li.addEventListener('click', () => {
input.value = place.display_name;
suggestions.style.display = 'none';
@@ -196,6 +206,18 @@
});
});
+ const fab = document.createElement('button');
+ fab.textContent = '+';
+ fab.style = 'position:fixed;bottom:20px;right:20px;width:48px;height:48px;font-size:24px;background:#111;color:#fff;border:none;border-radius:50%;box-shadow:0 2px 10px rgba(0,0,0,0.4);cursor:pointer;z-index:9999';
+ fab.title = 'More Tools';
+ fab.onclick = () => alert('More features coming soon!');
+ document.body.appendChild(fab);
+
+ const branding = document.createElement('div');
+ branding.textContent = 'PokeMaps';
+ branding.style = 'position:fixed;bottom:10px;left:10px;padding:6px 10px;font-size:16px;font-weight:500;background:rgba(0,0,0,0.6);color:white;border-radius:6px;font-family:sans-serif;backdrop-filter:blur(6px);z-index:9999;';
+ document.body.appendChild(branding);
+
_0x4f2a();
})();