Question about Geocoder "Show Address"

phoenixwarrior954 years ago

Hi there,

I was wondering if I can configure Traccar to show my Address upon request, but with a small modification. I have my Update Interval set to 3 seconds on my client, and with this configuration set, it shows the address and goes back to "Show Address" every 3 seconds that my location updates.

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.onRequest'>true</entry>
<entry key='geocoder.ignorePositions'>true</entry>
<entry key='geocoder.reuseDistance'>200</entry>

I first had the configuration without the Geocoder.reuseDistance but then I decided to add it thinking that when I pressed the "Show Address button", it would reuse the same address for 200 meters until it went back to "Show Address" on request. Can I somehow get it to work that way because its annoyed for me to press "Show Address" and it disappearing on me after every location update, like maybe ReuseDistance should be like a delay until I can make a new request, or add in "seconds before I can request another address" configuration?

Anton Tananaev4 years ago

It works as expected. "On request" address is not stored anywhere, so it can't be reused. To implement what you want, you would have to modify source code.

phoenixwarrior954 years ago

Do you know what is the code or how to code it possibly? I really wanted it to stay for a few seconds rather than to keep pressing the button or setting Reuse Distance in meters.

Anton Tananaev4 years ago

Do you have software development experience?

phoenixwarrior954 years ago

Not really. I am in the IT field but I never even took software development courses. I do know limited Java.

Anton Tananaev4 years ago

I'm not sure what kind of answer you are expecting here. Do you want someone to write code for you on the forum?

phoenixwarrior954 years ago

No, but I'd want someone to at least point out what to look for.

Anton Tananaev4 years ago

You can probably start by searching where geocoding is used in the code. That's a good starting point.