diff --git a/map4.js b/map4.js index 2d8d097..64a7825 100644 --- a/map4.js +++ b/map4.js @@ -211,6 +211,27 @@ } // =================================== +// 自分のピンを描画 +// =================================== +function renderSelfMarker() { + if (!map || lastLat === null || lastLng === null) return; + + if (selfMarker) { + map.removeLayer(selfMarker); + } + + selfMarker = createLabeledMarker( + lastLat, + lastLng, + currentUser, + true, + myStatus + ); + + selfMarker.addTo(map); +} + +// =================================== // 自分の位置保存 // =================================== async function saveMyLocation(lat, lng) {