mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Fix reverse geocoding issue
Previously, reverse geocoding queries in the Photon lookup did not properly limit results within a specified search radius, leading to inaccurate or unexpected locations being returned. This fix ensures that the :radius parameter is passed directly, just like :limit and :distance_sort, instead of being nested under :params. By aligning with the Photon lookup implementation in Geocoder, this change improves accuracy and ensures that results are correctly filtered based on proximity, resolving issues where points were incorrectly matched due to missing radius constraints. Resolves: Reverse geocoding mismatch for close proximity queries
This commit is contained in:
parent
e5ee29617e
commit
908232d397
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ class ReverseGeocoding::Places::FetchData
|
|||
end
|
||||
|
||||
def reverse_geocoded_places
|
||||
data = Geocoder.search([place.latitude, place.longitude], limit: 10, distance_sort: true, params: { radius: 10 })
|
||||
data = Geocoder.search([place.latitude, place.longitude], limit: 10, distance_sort: true, radius: 10)
|
||||
|
||||
data.reject do |place|
|
||||
place.data['properties']['osm_value'].in?(IGNORED_OSM_VALUES) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue