Fix madness

This commit is contained in:
0d0acre 2024-09-21 00:39:45 +02:00
parent c2ed3a5478
commit 38515febef

View file

@ -19,12 +19,10 @@
<!-- importa control.locate senza cdn -->
<link rel="stylesheet" href="./js/dist/L.Control.Locate.css" />
<script src="./js/dist/L.Control.Locate.min.js"></script>
<title>RuscoMap</title>
</head>
<body>
<button id="addMarkerBtn">BottoneInserimento</button>
<button id="addMarkerBtn"><img src="../img/marker-icon18.png" alt="Button Image" /></button>
<div id="markerFormContainer">
<form id="markerForm" enctype="multipart/form-data">
<div id="noticeCoordsPicker" style="display: none">
@ -62,30 +60,11 @@
</div>
</form>
</div>
<div id="map">
<script>
document.getElementById("addMarkerBtn").innerHTML =
'<img src="../img/marker-icon18.png" alt="Button Image" />';
</script>
</div>
<div id="map"> </div>
<!-- bottone gps -->
<!-- <button id="gps-button" type="button">
<img src="../img/target30.png" alt="GPS" style="display: flex"> </button> -->
<script>
// Add a click event listener to the button
document
.getElementById("gps-button")
.addEventListener("click", function () {
if (lc.isFollowing()) {
lc.stop();
} else {
lc.start();
}
});
</script>
<div class="popup" id="popup">
<!-- <img src="qualcosa.jpg" alt="Popup Image"> -->
<p id="istruzioni">
@ -118,8 +97,21 @@
// Popup si chiude automaticamente dopo 13 secondi
setTimeout(closePopup, 13000);
</script>
</body>
<footer>
<script>
window.addEventListener('load', () => {
// Add a click event listener to the button
const gpsButton = document.getElementById("gps-button");
gpsButton.addEventListener("click", function () {
if (lc.isFollowing()) {
lc.stop();
} else {
lc.start();
}
});
});
</script>
<script src="./js/dist/L.Control.Locate.min.js"></script>
<script type="module" type="text/javascript" src="/js/map.js"></script>
</footer>
</body>
<footer></footer>
</html>