aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/SelectedDeviceMap.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-03 17:44:52 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-03 17:44:52 -0700
commitf2f787e56b03c5806f0b7ce872f5450b6f733ae1 (patch)
tree3dd13fede659c41c707c0d57c6bab4366244b778 /modern/src/map/SelectedDeviceMap.js
parent9ac0392dd839f6cb7669ca4a611cdf7be5bcbdd3 (diff)
downloadtrackermap-web-f2f787e56b03c5806f0b7ce872f5450b6f733ae1.tar.gz
trackermap-web-f2f787e56b03c5806f0b7ce872f5450b6f733ae1.tar.bz2
trackermap-web-f2f787e56b03c5806f0b7ce872f5450b6f733ae1.zip
Init default map camera
Diffstat (limited to 'modern/src/map/SelectedDeviceMap.js')
-rw-r--r--modern/src/map/SelectedDeviceMap.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/modern/src/map/SelectedDeviceMap.js b/modern/src/map/SelectedDeviceMap.js
index 1294085c..bf7e3bcd 100644
--- a/modern/src/map/SelectedDeviceMap.js
+++ b/modern/src/map/SelectedDeviceMap.js
@@ -18,6 +18,7 @@ const SelectedDeviceMap = () => {
if ((selectedDeviceId !== previousDeviceId || mapFollow) && position) {
map.easeTo({
center: [position.longitude, position.latitude],
+ zoom: Math.max(map.getZoom(), 10),
offset: [0, -dimensions.popupMapOffset / 2],
});
}