diff --git a/map4.js b/map4.js index aeec47b..42de285 100644 --- a/map4.js +++ b/map4.js @@ -181,25 +181,20 @@ const shortName = name.length > 4 ? name.slice(0, 4) : name; - // ★ Leaflet が絶対描画できる安定した構造 const html = `
-
- +
+ ${shortName} + text-align:center;"> ${status}
@@ -218,10 +212,10 @@ return L.marker([lat, lng], { icon: L.divIcon({ + html, className: "", - html: html, - iconSize: [80, 40], // ← 大きめに指定(安心) - iconAnchor: [20, 32], // ← ピンの先端が地図に刺さる位置 + iconSize: [70, 40], // ← 正しいサイズ(画像20px + 横ラベル) + iconAnchor: [10, 32], // ← ピンの「先端」が地図に刺さる位置 }), }); }