Skip to content

Commit

Permalink
Clicking on map display marker identity
Browse files Browse the repository at this point in the history
  • Loading branch information
steps39 committed Sep 8, 2024
1 parent 34260b8 commit ecede90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SedimentDataExplorer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<body>
<div id="everything" style="display: none;">
<h1>Sediment Template Data Explorer - v0.20240808</h1>
<h1>Sediment Template Data Explorer - v0.20240809</h1>
MMO Templates -
<input type="file" id="fileInput" multiple onchange="importData()"> <!-- Allow multiple file selection -->
<input type="text" id="urlInput" placeholder="Enter comma-separated URLs" onchange="importData()">
Expand Down
4 changes: 2 additions & 2 deletions sdeMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ function sampleMap(meas) {
const popupStatic = '<p style="height:200px; width:200px">static content</p>';
// let popup = marker.getPopup();
let chart_div = document.getElementById("c_radar_" + dateSampled + ": " + sample);
const marker = L.marker([lat, lon], { icon: currentIcon }).addTo(map).bindPopup(chart_div,{autoClose:false,closeOnClick:false});
// just bodge to allow display of position const marker = L.marker([lat, lon], { icon: currentIcon }).addTo(map).bindPopup(chart_div,{autoClose:false,closeOnClick:false});
// popup.setContent(chart_div);
// const marker = L.marker([lat, lon], { icon: currentIcon }).addTo(map).bindPopup(`<b>${dateSampled}: ${sample}</b><br>Latitude: ${lat}<br>Longitude: ${lon}`);
const marker = L.marker([lat, lon], { icon: currentIcon }).addTo(map).bindPopup(`<b>${dateSampled}: ${sample}</b><br>Latitude: ${lat}<br>Longitude: ${lon}`);
// const marker = L.marker([lat, lon], { icon: currentIcon }).addTo(map);
//const marker = L.marker([lat, lon], { icon: currentIcon }).addTo(map).bindPopup(`<b>${dateSampled}: ${sample}</b><br>Latitude: ${lat}<br>Longitude: ${lon}<br>${popupStatic}`);
/* const marker = L.circleMarker([lat, lon],
Expand Down

0 comments on commit ecede90

Please sign in to comment.