Route Report with Address instead of Coordinates

Adriano Miranda 3 years ago

Hi guys.

Can I show the address instead of coordinates on my route report? I did configure the geocoder parameters on default.xml it is working from web interface.

My geocoder config

My route report

I did change some parameters to use the Google Maps API on route.xlsx, like below:

${util.hyperlink("".format("https://www.google.com/maps/place/%1$f,%2$f", position.latitude, position.longitude), position.getAddress() == null ? "".format("%1$f°, %2$f°", position.latitude, position.longitude) : position.address)}

Thank you.

Anton Tananaev 3 years ago

I think it should work with your config, assuming:

  1. You restarted after changing config
  2. The API key is valid and have permissions
  3. You're looking at the new data
Adriano Miranda 3 years ago

Hi Anton, thanks for your answer.

  1. Yes, I did restart the traccar. I did it now to test again:
    https://drive.google.com/file/d/1WoJXGPth18W1qcbwkxGY5ZG3NOrwCu_Q/view?usp=sharing

  2. I assume it is a valid key, because I did follow all the steps to create one correctly and it's working from web when I click at "Show Address":
    https://drive.google.com/file/d/1-f61rMcbRu-GBc8ooTU8Yi30Zd15n5qU/view?usp=sharing

  3. Yes, I did filter only data that appear after restarting the traccar:
    https://drive.google.com/file/d/1U20drbWbfsGh4jT7GwQzjcVmY7WmJRRw/view?usp=sharing

Anton Tananaev 3 years ago

I see that the positions are marked as invalid. If you want to do geocoding for those, you need to enable geocoder.processInvalidPositions.

Adriano Miranda 3 years ago

That's it!

It's working now. Thank you Anton!

Tracker 3 years ago

Hello, I have the same problem, but the difference is that positions are marked as valid, not invalid.

Anton Tananaev 3 years ago

Then it's not the same problem.