diff --git a/map4.js b/map4.js index 7fe35aa..aeec47b 100644 --- a/map4.js +++ b/map4.js @@ -181,51 +181,51 @@ const shortName = name.length > 4 ? name.slice(0, 4) : name; + // ★ Leaflet が絶対描画できる安定した構造 const html = `
- -
- + +
${shortName} - ${status} -
`; return L.marker([lat, lng], { icon: L.divIcon({ - className: "smart-pin", + className: "", html: html, - iconSize: [80, 40], - iconAnchor: [15, 40], + iconSize: [80, 40], // ← 大きめに指定(安心) + iconAnchor: [20, 32], // ← ピンの先端が地図に刺さる位置 }), }); } + // =================================== // 距離計算(修正版) // ===================================