Remove unused code and add types and a docstring.
This commit is contained in:
parent
980737753f
commit
212a4f4ec3
16
web_view.py
16
web_view.py
|
@ -380,20 +380,8 @@ def search_map_page():
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/old_search")
|
def read_bounds_param() -> list[float]:
|
||||||
def old_search_page():
|
"""Read bounds parameter."""
|
||||||
q = flask.request.args.get("q")
|
|
||||||
if not q:
|
|
||||||
return flask.render_template("search.html", hits=None, bbox_list=None)
|
|
||||||
hits = nominatim.lookup(q)
|
|
||||||
for hit in hits:
|
|
||||||
if "geotext" in hit:
|
|
||||||
del hit["geotext"]
|
|
||||||
bbox = [hit["boundingbox"] for hit in hits]
|
|
||||||
return flask.render_template("search.html", hits=hits, bbox_list=bbox)
|
|
||||||
|
|
||||||
|
|
||||||
def read_bounds_param():
|
|
||||||
return [float(i) for i in flask.request.args["bounds"].split(",")]
|
return [float(i) for i in flask.request.args["bounds"].split(",")]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue