diff --git a/map4.js b/map4.js index a0e763c..7fe35aa 100644 --- a/map4.js +++ b/map4.js @@ -167,30 +167,11 @@ }); } -// =================================== -// 自分のピン表示 -// =================================== -function renderSelfMarker() { - if (!map || lastLat === null || lastLng === null) return; - - if (selfMarker) map.removeLayer(selfMarker); - - selfMarker = createLabeledMarker( - lastLat, - lastLng, - currentUser, - true, - myStatus - ); - selfMarker.addTo(map); -} - function createLabeledMarker(lat, lng, name, isSelf, status) { const pinUrl = isSelf ? "https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-green.png" : "https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-gold.png"; - // ステータス色(丸バッジに使う) const statusColor = { "移動中": "#4caf50", "遅れます": "#ff9800", @@ -198,38 +179,50 @@ "到着": "#9c27b0", }[status || "移動中"]; - const html = ` -