Skip to content

Commit

Permalink
fix regression with lat/lon in json output
Browse files Browse the repository at this point in the history
lat, lon is returned as strings in the PHP output. Reproduce that in the
Python frontend.

See #3115.
  • Loading branch information
lonvia committed Aug 1, 2023
1 parent d15f605 commit 8adeaa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nominatim/api/v1/format_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def format_base_json(results: Union[napi.ReverseResults, napi.SearchResults],

_write_osm_id(out, result.osm_object)

out.keyval('lat', result.centroid.lat)\
.keyval('lon', result.centroid.lon)\
out.keyval('lat', f"{result.centroid.lat}")\
.keyval('lon', f"{result.centroid.lon}")\
.keyval(class_label, result.category[0])\
.keyval('type', result.category[1])\
.keyval('place_rank', result.rank_search)\
Expand Down

0 comments on commit 8adeaa2

Please sign in to comment.