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 --> <!-- importa control.locate senza cdn -->
<link rel="stylesheet" href="./js/dist/L.Control.Locate.css" /> <link rel="stylesheet" href="./js/dist/L.Control.Locate.css" />
<script src="./js/dist/L.Control.Locate.min.js"></script>
<title>RuscoMap</title> <title>RuscoMap</title>
</head> </head>
<body> <body>
<button id="addMarkerBtn">BottoneInserimento</button> <button id="addMarkerBtn"><img src="../img/marker-icon18.png" alt="Button Image" /></button>
<div id="markerFormContainer"> <div id="markerFormContainer">
<form id="markerForm" enctype="multipart/form-data"> <form id="markerForm" enctype="multipart/form-data">
<div id="noticeCoordsPicker" style="display: none"> <div id="noticeCoordsPicker" style="display: none">
@ -62,30 +60,11 @@
</div> </div>
</form> </form>
</div> </div>
<div id="map"> <div id="map"> </div>
<script>
document.getElementById("addMarkerBtn").innerHTML =
'<img src="../img/marker-icon18.png" alt="Button Image" />';
</script>
</div>
<!-- bottone gps --> <!-- bottone gps -->
<!-- <button id="gps-button" type="button"> <!-- <button id="gps-button" type="button">
<img src="../img/target30.png" alt="GPS" style="display: flex"> </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"> <div class="popup" id="popup">
<!-- <img src="qualcosa.jpg" alt="Popup Image"> --> <!-- <img src="qualcosa.jpg" alt="Popup Image"> -->
<p id="istruzioni"> <p id="istruzioni">
@ -118,8 +97,21 @@
// Popup si chiude automaticamente dopo 13 secondi // Popup si chiude automaticamente dopo 13 secondi
setTimeout(closePopup, 13000); setTimeout(closePopup, 13000);
</script> </script>
</body> <script>
<footer> 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> <script type="module" type="text/javascript" src="/js/map.js"></script>
</footer> </body>
<footer></footer>
</html> </html>