diff --git a/map4.js b/map4.js index 8da6a35..e22322f 100644 --- a/map4.js +++ b/map4.js @@ -137,6 +137,19 @@ lng, }); } + +// =================================== +// 自分のピン表示 +// =================================== +function renderSelfMarker() { + if (!map || lastLat === null || lastLng === null) return; + + if (selfMarker) map.removeLayer(selfMarker); + + selfMarker = createLabeledMarker(lastLat, lastLng, currentUser, true); + selfMarker.addTo(map); +} + // =================================== // ピン生成(自分:緑 / 他人:金) // ===================================