From 08776e5a1b6b747eacb067720ad146715866f30d Mon Sep 17 00:00:00 2001 From: Pringgosutono Date: Wed, 17 Sep 2025 09:41:20 +0700 Subject: [PATCH] update --- .../menu_v1/reports/_trip_detail.blade.php | 18 +++++++++--------- .../menu_v1/reports/vehicle_trips.blade.php | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/resources/views/menu_v1/reports/_trip_detail.blade.php b/resources/views/menu_v1/reports/_trip_detail.blade.php index f775773..31e89af 100644 --- a/resources/views/menu_v1/reports/_trip_detail.blade.php +++ b/resources/views/menu_v1/reports/_trip_detail.blade.php @@ -113,10 +113,10 @@ }); let coords - setTimeout(() => { + setTimeout(async() => { map.invalidateSize(); // force Leaflet to recalc - map.fitBounds(polyline.getBounds()); - // map.fitBounds(coords.map(c => L.latLng(c[0], c[1]))); + // map.fitBounds(polyline.getBounds()); + map.fitBounds(await coords.map(c => L.latLng(c[0], c[1]))); }, 200); const linesData = (@json($list)); @@ -136,12 +136,12 @@ .map((point) => [point.latitude, point.longitude]) // 4) Add polyline - const polyline = L.polyline(points,{ - color: 'red', - weight: 3, - opacity: 0.7, - smoothFactor: 1 - }).addTo(map); + // const polyline = L.polyline(points,{ + // color: 'red', + // weight: 3, + // opacity: 0.7, + // smoothFactor: 1 + // }).addTo(map); // const lines = L.Routing.control({ // waypoints: points, diff --git a/resources/views/menu_v1/reports/vehicle_trips.blade.php b/resources/views/menu_v1/reports/vehicle_trips.blade.php index e2ad6e7..df677f9 100644 --- a/resources/views/menu_v1/reports/vehicle_trips.blade.php +++ b/resources/views/menu_v1/reports/vehicle_trips.blade.php @@ -49,13 +49,14 @@
- +
+