재생 중 현재 위치 마커 숨김
This commit is contained in:
+6
-5
@@ -1948,7 +1948,7 @@ function fitHistoryOrCurrentBounds() {
|
||||
}
|
||||
}
|
||||
|
||||
function stopHistoryPlayback() {
|
||||
function stopHistoryPlayback(restoreCurrent = true) {
|
||||
if (mapState.playbackTimer) {
|
||||
clearInterval(mapState.playbackTimer);
|
||||
mapState.playbackTimer = null;
|
||||
@@ -1956,7 +1956,7 @@ function stopHistoryPlayback() {
|
||||
if (mapState.playbackMarker) {
|
||||
mapState.playbackMarker.setMap(null);
|
||||
}
|
||||
if (!_overrideRange) {
|
||||
if (restoreCurrent && !_overrideRange) {
|
||||
setCurrentLocationVisible(true);
|
||||
}
|
||||
updateMapToolLabels();
|
||||
@@ -1972,7 +1972,7 @@ function startHistoryPlayback(speed) {
|
||||
const points = mapState.historyPoints;
|
||||
if (!mapState.map || !points?.length) return;
|
||||
|
||||
stopHistoryPlayback();
|
||||
stopHistoryPlayback(false);
|
||||
setCurrentLocationVisible(false);
|
||||
if (mapState.openInfoWindow) {
|
||||
mapState.openInfoWindow.close();
|
||||
@@ -2422,7 +2422,8 @@ function updateDOMWithData(data) {
|
||||
}
|
||||
|
||||
// 메인 마커 / 정확도 원 업데이트
|
||||
setCurrentLocationVisible(true);
|
||||
const isPlaybackActive = !!mapState.playbackTimer;
|
||||
setCurrentLocationVisible(!isPlaybackActive);
|
||||
mapState.marker.setPosition(latlng);
|
||||
mapState.circle.setCenter(latlng);
|
||||
animateCircleRadius(Math.max(data.accuracy || 50, 10));
|
||||
@@ -2430,7 +2431,7 @@ function updateDOMWithData(data) {
|
||||
|
||||
// autoPosition
|
||||
const isChecked = document.getElementById('autoPositionSwitch').checked;
|
||||
if (isChecked && (lastLat !== data.latitude || lastLng !== data.longitude)) {
|
||||
if (!isPlaybackActive && isChecked && (lastLat !== data.latitude || lastLng !== data.longitude)) {
|
||||
mapState.map.panTo(latlng);
|
||||
}
|
||||
lastLat = data.latitude;
|
||||
|
||||
Reference in New Issue
Block a user