Improve search API output
This commit is contained in:
parent
4ebe992919
commit
c4f284031c
|
@ -364,6 +364,8 @@ def api_search():
|
||||||
if "geotext" in hit:
|
if "geotext" in hit:
|
||||||
del hit["geotext"]
|
del hit["geotext"]
|
||||||
hit["name"] = nominatim.get_hit_name(hit)
|
hit["name"] = nominatim.get_hit_name(hit)
|
||||||
|
hit["label"] = nominatim.get_hit_label(hit)
|
||||||
|
hit["address"] = list(hit["address"].items())
|
||||||
hit["identifier"] = f"{hit['osm_type']}/{hit['osm_id']}"
|
hit["identifier"] = f"{hit['osm_type']}/{hit['osm_id']}"
|
||||||
|
|
||||||
return cors_jsonify(success=True, hits=hits)
|
return cors_jsonify(success=True, hits=hits)
|
||||||
|
|
Loading…
Reference in a new issue