Show default history on map

This commit is contained in:
seo
2026-06-15 10:33:19 +09:00
parent 71e0a903dc
commit 6c30305845
3 changed files with 16 additions and 13 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ if ($startParam && $endParam) {
// API URL 생성
$historyEndpoint = "/history/period/{$startTime}?filter_entity_id=" . rawurlencode($entities['device']) . "&end_time={$endTime}";
$includeHistory = isset($_GET['history']) && $_GET['history'] === '1' && !isset($_GET['hashonly']);
$historyMaxPoints = max(20, min(1000, (int)($_GET['maxPoints'] ?? 300)));
$historyMaxPoints = max(20, min(1200, (int)($_GET['maxPoints'] ?? 800)));
// 공통 요청 함수
function getData($entityId) {
@@ -239,7 +239,7 @@ function simplify_path(array $path, int $maxPoints): array
$filtered = [];
$last = null;
foreach ($path as $point) {
if ($last === null || path_distance_m($last, $point) >= 15) {
if ($last === null || path_distance_m($last, $point) >= 5) {
$filtered[] = $point;
$last = $point;
}