Show default history on map
This commit is contained in:
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user