Spaces:
Running
Running
Update index.html
Browse files- index.html +14 -0
index.html
CHANGED
|
@@ -170,6 +170,20 @@ function loadMapFromStorage() {
|
|
| 170 |
const marker = L.marker([data.lat, data.lng], { icon: icon }).addTo(map);
|
| 171 |
if (data.popupContent) marker.bindPopup(data.popupContent);
|
| 172 |
if (data.tooltipContent) marker.bindTooltip(data.tooltipContent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
});
|
| 174 |
}
|
| 175 |
|
|
|
|
| 170 |
const marker = L.marker([data.lat, data.lng], { icon: icon }).addTo(map);
|
| 171 |
if (data.popupContent) marker.bindPopup(data.popupContent);
|
| 172 |
if (data.tooltipContent) marker.bindTooltip(data.tooltipContent);
|
| 173 |
+
|
| 174 |
+
// ⭐ここから追加⭐
|
| 175 |
+
marker.on("mouseover", function() {
|
| 176 |
+
hoveredMarker = marker;
|
| 177 |
+
console.log("Marker hovered:", marker);
|
| 178 |
+
});
|
| 179 |
+
marker.on("mouseout", function() {
|
| 180 |
+
if (hoveredMarker === marker) {
|
| 181 |
+
hoveredMarker = null;
|
| 182 |
+
console.log("Marker no longer hovered");
|
| 183 |
+
}
|
| 184 |
+
});
|
| 185 |
+
// ⭐ここまで追加⭐
|
| 186 |
+
|
| 187 |
});
|
| 188 |
}
|
| 189 |
|