Webserver simple view zoomed in by default

asko 5 years ago

Hi there,

i was wondering if there is a way to get a predefined area view of simple version.
Atm when i use website.com/simple/ its fully zoomed out on the world.

Best regards,
Kay

Anton Tananaev 5 years ago

Only by changing the code.

asko 5 years ago

Hi thanks for the quick answer.

Is there some kind of tutorial for this?

Anton Tananaev 5 years ago

There's plenty of documentation online. Just search for the libraries that we are using there.

asko 5 years ago

Ok amazing i got it. For anyone who wants to know how it works:

Change your lat and long / zoom in this file
/opt/traccar/web/simple/app.js

    target: 'map',
    view: new ol.View({
        center: ol.proj.fromLonLat([0, 0]),
        zoom: 2
    })
fox2plus 5 years ago

how to make it follow the track of the device and the track live (default in web simple)

Chri.s S 4 years ago

also want to know that, thanks