aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-02 09:34:47 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-02 09:34:47 -0700
commitdd0e4ccb41690e2311bf62aa2f792e941f3685dc (patch)
treec2182dc918ad3fdde9c9a630b66b53f5e35e3251
parent1a372fb0f8a7be5766267c80adf73abf589afa4e (diff)
downloadtrackermap-web-dd0e4ccb41690e2311bf62aa2f792e941f3685dc.tar.gz
trackermap-web-dd0e4ccb41690e2311bf62aa2f792e941f3685dc.tar.bz2
trackermap-web-dd0e4ccb41690e2311bf62aa2f792e941f3685dc.zip
Fix single item report
-rw-r--r--modern/src/map/MapCamera.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modern/src/map/MapCamera.js b/modern/src/map/MapCamera.js
index 63f070f8..46936513 100644
--- a/modern/src/map/MapCamera.js
+++ b/modern/src/map/MapCamera.js
@@ -9,7 +9,7 @@ const MapCamera = ({
if (positions) {
const coordinates = positions.map((item) => [item.longitude, item.latitude]);
if (coordinates.length) {
- const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new maplibregl.LngLatBounds(coordinates[0], coordinates[1]));
+ const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new maplibregl.LngLatBounds(coordinates[0], coordinates[0]));
const canvas = map.getCanvas();
map.fitBounds(bounds, {
padding: Math.min(canvas.width, canvas.height) * 0.1,