Geocoding

Jérôme2 years ago

Hello, with version 4.15 I had a geocoding update each time the location of the vehicle changed.

I notice with version 5 that on a 5KM journey I only have 3/4 address going up and the rest is always at 0.

Here is my XML:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key='config.default'>./conf/default.xml</entry>

    <!--

    This is the main configuration file. All your configuration parameters should be placed in this file.

    Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
    with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
    remove "config.default" parameter from this file unless you know what you are doing.

    For list of available parameters see following page: https://www.traccar.org/configuration-file/

    -->

    <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://XXX3306/traccar?serverTimezone=UTC&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>traccar</entry>
    <entry key='database.password'>XXX</entry>

    <entry key='notificator.types'>web,mail,traccar</entry>
    <entry key='notificator.traccar.key'>XXX</entry>

    <entry key='mail.smtp.port'>25</entry>
    <entry key='mail.smtp.starttls.enable'>false</entry>
    <entry key='mail.smtp.host'>192.168.1.100</entry>
    <entry key='mail.smtp.from'>traccar@XXX</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>XXX</entry>
    <entry key='mail.smtp.password'>XXX</entry>

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>ban</entry>
    <entry key='geocoder.reuseDistance'>20</entry>
    <entry key='geocoder.format'>%r, %p %t, %s, %c</entry>

    <entry key='web.url'>http://XXX</entry>

    <entry key='web.console'>false</entry>

    <entry key='web.sanitize'>false</entry>

</properties>

Is there something I'm missing?

Thx

Anton Tananaev2 years ago

We changed the defaults:

https://github.com/traccar/traccar/blob/master/setup/default.xml#L18-L23

You can override those if you want in your main config file.

Jérôme2 years ago

Can you help me give me the new configuration compared to the old one please?

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>ban</entry>

?

Anton Tananaev2 years ago

Those haven't changed.

Jérôme2 years ago

Should I put as is?

    <entry key='geocoder.url'>https://us1.locationiq.com/v1/reverse.php</entry>
    <entry key='geocoder.key'>pk.689d849289c8c63708068b2ff1f63b2d</entry>
    <entry key='geocoder.onRequest'>true</entry>
    <entry key='geocoder.ignorePositions'>true</entry>

It no longer exists?

    <entry key='geocoder.reuseDistance'>20</entry>
    <entry key='geocoder.format'>%r, %p %t, %s, %c</entry>
Anton Tananaev2 years ago

Before you ask any more questions, we have not changed any configuration parameters. We only changed the default configuration.

Jérôme2 years ago

Ok so my configuration must still be functional, right?

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>ban</entry>
    <entry key='geocoder.reuseDistance'>20</entry>
    <entry key='geocoder.format'>%r, %p %t, %s, %c</entry>
Anton Tananaev2 years ago

Yes, but if you want to get address automatically you need to enable that option.

Jérôme2 years ago

I still don't understand, it was OK with the old version.

Which option should I activate?

Anton Tananaev2 years ago

I would recommend you to read the documentation.

Jérôme2 years ago

Can you just tell me where to activate this option please?

Jérôme2 years ago
<entry key='geocoder.ignorePositions'>false</entry>

?

Jérôme2 years ago

I have tried everything :(

Here is my config:

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>ban</entry>
<entry key='geocoder.onRequest'>true</entry> 
<entry key='geocoder.ignorePositions'>true</entry>
<entry key='geocoder.reuseDistance'>10</entry>
<entry key='geocoder.format'>%r, %p %t, %s, %c</entry>

Always have to click on show address to get the address :(

Someone can help me ?

anpalama2 years ago

I think you have to change this lines

<entry key='geocoder.onRequest'>false</entry> 
<entry key='geocoder.ignorePositions'>false</entry>
Jérôme2 years ago

Thank you all.

everything is ok now