Zoom setting for device selection

Matt Bunce 8 years ago

I have a server-wide zoom setting for the inital map location and it works great.

When I click any active device the map re-centers and the zoom level changes. This makes a lot of sense and it is a good feature, but I would like the zoom level to be even more. How can I change the zoom level that is used when I select an active device?

Anton Tananaev 8 years ago

I believe you would have to modify some JavaScript code for that.

Matt Bunce 8 years ago

Do you know where I might find it? I have tried debugging in Firefox and Chrome, but it's not my strong suit and the amount of JS was making my computer run VERY slow!

Anton Tananaev 8 years ago

You should probably look at the web interface source code on GitHub.

su 5 years ago

Matt Bruce how can i get that? mine does not zoom when clicking a device..

Isisaro 4 years ago

I have a server-wide zoom setting for the inital map location and it works great i too but when I click any active device the map no re-centers and no zoom level on the device. How can I change the zoom level that is used when I select an active device? thanks

stuthemoo 3 years ago

Have a look at line 88 in /traccar-web/modern/src/map/MapPositions.js

You can increase the max zoom value so that the map zooms closer when you click a device or cluster.

stuthemoo 3 years ago

Sorry my last response only affects zoom when clicking a cluster. For devices zoom level see line ~13 of /traccar-web/modern/src/map/main/MapSelectedDevice.js

const selectZoom = useAttributePreference('web.selectZoom', 10);