Query address by user request

smsoousa6 years ago

Hello Anton, how can I enable the option:

"There are some exciting changes to reverse geocoding module. It's now possible to query address information per user request instead of automatically requesting it for all messages from device. It should help to greatly reduce reverse geocoding costs. (If this option is enabled) user can request address directly from web app and it will also work for reports like trips".

I did not find any options in the system or the configuration file to do so. Thanks!

Anton Tananaev6 years ago

I have updated documentation:

https://www.traccar.org/configuration-file/

renaud6 years ago

So if I understand well, you need to enable both geocoder.onRequest and geocoder.ignorePositions if you want only reverse geocoding on request?

Anton Tananaev6 years ago

Yes, correct.

renaud6 years ago

How do you "request" the reverse geocoding?
I have set the following in my config, and I cannot see the address in the web interface anymore when I select a tracker.

<entry key='geocoder.onRequest'>true</entry>
<entry key='geocoder.ignorePositions'>true</entry>
<entry key='geocoder.reuseDistance'>10</entry>
<entry key='geocoder.cacheSize'>20000</entry>
Anton Tananaev6 years ago

You should see a link "show address" in the web app, assuming that you are using latest official release.

renaud6 years ago

I am using the official 3.15. Where is that link supposed to be?

Anton Tananaev6 years ago

Same place where the address should be:

https://github.com/tananaev/traccar/pull/3632

renaud6 years ago

OK, after fully clearing the cache, I can now see the link. It doesn't look a very good user experience tough. Maybe it should query the address directly when you click on the device, this way you still save most of the queries and you still have the addresses in follow mode.

Anton Tananaev6 years ago

You can put feature suggestion on GitHub for discussion. A few people requested it in the way that it's implemented at the moment. It's not really possible to satisfy everyones wishes.

Steffen6 years ago

Hi!
Is it actually still possible to configure an automatic Geocoding?
I tried a few thing with following properties and wasn't able to make it work.

<entry key='geocoder.onRequest'>false</entry>
<entry key='geocoder.ignorePositions'>true</entry>

Thanks!

Anton Tananaev6 years ago

It's automatic by default.

Steffen6 years ago

mhh. it doesn't seem to work. with following settings I get only the Link within the address field instead of having the address itself.
Do you have any ideas what is wrong?
I'm running Traccar 4.0 on Dockerimage (traccar/traccar)
traccar.xml:

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>http://nominatim.openstreetmap.org/reverse</entry>
Anton Tananaev6 years ago

You need to use some other service. Free Nominatim just doesn't work anymore.

renaud6 years ago

Do not put any service and it will use google. Otherwise, opencagedata.com is free for 2500 requests/day.