재생 배속과 기본 지도 표시값 정리
This commit is contained in:
+12
-6
@@ -218,7 +218,7 @@ const deviceLang = (navigator.language || navigator.userLanguage || "en").starts
|
||||
departure: "출발",
|
||||
returnHome: "복귀",
|
||||
awaySessionTitle: "외출 기록",
|
||||
openNaverMap: "Naver 지도",
|
||||
openNaverMap: "지도",
|
||||
selectedPoint: "선택 지점",
|
||||
},
|
||||
en: {
|
||||
@@ -471,7 +471,7 @@ const deviceLang = (navigator.language || navigator.userLanguage || "en").starts
|
||||
historyStats: null,
|
||||
stayPoints: [],
|
||||
homeStats: null,
|
||||
filterOutliers: false,
|
||||
filterOutliers: true,
|
||||
openInfoWindow: null,
|
||||
mapClickHandlerAdded: false,
|
||||
initialInfoOpened: false,
|
||||
@@ -494,7 +494,7 @@ let langCode = localStorage.getItem("currentLang") || deviceLang,
|
||||
wakeLock = null;
|
||||
const reverseGeocodeCache = new Map();
|
||||
|
||||
const PLAYBACK_SPEEDS = [2, 5, 10, 20, 50, 100, 500];
|
||||
const PLAYBACK_SPEEDS = [2, 5, 10];
|
||||
const PLAYBACK_MIN_VISIBLE_STEPS = 80;
|
||||
const PLAYBACK_TICK_MS = 160;
|
||||
const STAY_MIN_SECONDS = 10 * 60;
|
||||
@@ -1228,6 +1228,12 @@ function isUsefulAddress(value) {
|
||||
return !!text && text !== '-' && text.toLowerCase() !== 'not_home' && text.toUpperCase() !== 'N/A';
|
||||
}
|
||||
|
||||
function displayAddress(value) {
|
||||
const text = String(value || '').trim();
|
||||
if (text.toLowerCase() === 'home') return langCode === 'ko' ? '집' : 'Home';
|
||||
return text;
|
||||
}
|
||||
|
||||
function formatLatLngAddress(lat, lng) {
|
||||
return `${Number(lat).toFixed(5)}, ${Number(lng).toFixed(5)}`;
|
||||
}
|
||||
@@ -1241,11 +1247,11 @@ function setCurrentPositionText(value) {
|
||||
|
||||
function updateCurrentAddress(data) {
|
||||
if (!hasValidCoords(data.latitude, data.longitude)) {
|
||||
setCurrentPositionText(isUsefulAddress(data.address) ? data.address : '-');
|
||||
setCurrentPositionText(isUsefulAddress(data.address) ? displayAddress(data.address) : '-');
|
||||
return;
|
||||
}
|
||||
if (isUsefulAddress(data.address)) {
|
||||
setCurrentPositionText(data.address);
|
||||
setCurrentPositionText(displayAddress(data.address));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1286,7 +1292,7 @@ function updateDOM(data) {
|
||||
|
||||
const textMap = {
|
||||
currentPosition: isUsefulAddress(data.address)
|
||||
? data.address
|
||||
? displayAddress(data.address)
|
||||
: (hasValidCoords(data.latitude, data.longitude) ? formatLatLngAddress(data.latitude, data.longitude) : '-'),
|
||||
lastUpdateTime: data.updated ? getRelativeTime(data.updated) : "-",
|
||||
nowActivity: data.activity,
|
||||
|
||||
Reference in New Issue
Block a user