I don't think you can.
Thanks. For anyone else with this issue. I did a rewrite on the server. Its working.
rewrite ^(.*)$ $1?layer=address break;
I dont understand the idear. Whats the difference with setting up nominatim through the config files?
Then you already see the address in the popup window.
Can you show an image so that i can actually see the difference?
And how / where exactly do you add that rewrite code on the the server?
We were discussing the connection between a nominatim server and traccar.
Yes, but what is actually the issue then. I use nominatim server in traccar server just by setting the connection in traccar.xml
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
Why should one need your rewrite code ? ( you can clearly see i dont get the clue :)
The idea is to pass another parameter to the Nominatim API that changes the way the lookup is done.
Or meaby you mean there is not always an address presented?
In my case i get on about 98% the correct addres with housenumber.
And sometimes only the street without the house number. And sometimes only the zipcode. But in general thats only because there is no house at that position (thus no house number). Or no street at that position (thus only zipcode). And i also compare that to the accuracy of that position from the gps tracker.
I would guesse that if you would need to force an address then that wont be realistic either. Meaby also the nominatim database might not be very populated for you country / area?
At times, the reason you do not get an address is because there is a POI that is closer. So Nominatim returns the POI instead of the House Number.
Because for our needs (traccar) we need it to return the address instead they added an option to the python (newest) reverse lookup to send the parameter &layer=address to have it return the house number instead of the POI. In traccar there is no setting to add to the URL, so I had to use the rewrite on Nominatims side.
Ok i see, now that it works for you, can you state if there is any difference in the accuracy compared to the real device location. When you compare the forced address location with that of the POI location. I really wonder if the location on the map would be the same, better or worse.
Nominatim added an option that can be used with reverse lookup to force an address. by adding &layer=address a scan be seen here.
https://nominatim.org/release-docs/latest/api/Reverse/
Whats the most simple way to add it to the URL without recompiling. I have an older version of traccar and do not want to start making trouble.