Geocoder.reuseDistance

gpadider6 years ago

Hi Anton

I would like to know how reuseDistance is working for Geocoder.
Because when I set it to 1000 (1km), it shows always the same city even if I do a trip of 100km.

I think that reuse distance reuse the location data that has been reused. For example : request to get the city, travel 100 meters, reuse distance (from the request), travel 100 meters, reuse previous distance (from the previous reuse distance), travel 100 meters, reuse previous distance (from the previous reuse distance), etc.

Is it possible to reuseDistance of request and not of computed distances ?

Difficult to explain sorry

Anton Tananaev6 years ago

It re-uses geocoder result if location from last location is less than specified value.

gpadider6 years ago

Ok, don't you think it can re-uses a data that has been re-used ? In that case if you travel 100km with a position every 10 meters and reuseDistance set to 5 meters for example you'll have the same city at the beggining and the end of the trip

Anton Tananaev6 years ago

Correct. That's why the idea is to keep the value really small. It's intended to no consume geocoder quota when device is not moving.

gpadider6 years ago

Okay I understand now !
Thanks Anton have a good day