Help about position attributes

Atulalmaa month ago

I have added the timestamp in the position attribute, when I am restarting the server so my timestamp is clearing.

How can solve this

Anton Tananaeva month ago

How did you add it?

Atulalmaa month ago

I am adding in the code when position not null so I am adding position.set("myattrubute","myvalue")

I also add this attributes in config file

Anton Tananaeva month ago
  1. Where in the code?
  2. How is it stored in the database?
Atulalmaa month ago

1- I have added this on distance handler under the if condition

        if (last != null) {
          position.set("myattrubute","myvalue");
         //Other original codes
}

2- I don't now how traccar is storing data but with each position it's going in the database and showing in the position api.

But after restarting it's not showing

Anton Tananaeva month ago

If you're doing it in the distance handler, it should still be there. Have you checked the database?