pass params properly, pass srid
This commit is contained in:
parent
8671238bab
commit
04bed12052
|
@ -15,8 +15,9 @@ def search_json(request):
|
||||||
return render_to_json_response({'error': 'no bbox parameter'})
|
return render_to_json_response({'error': 'no bbox parameter'})
|
||||||
|
|
||||||
bs = bbox.split(",")
|
bs = bbox.split(",")
|
||||||
bs_param = (float(bs[0]), float(bs[1]), float(bs[2]), float(bs[3]))
|
bs_param = (float(bs[0]), float(bs[1]), float(bs[2]), float(bs[3]),)
|
||||||
features = Feature.search.overlaps(bs_param, search_term)
|
|
||||||
|
features = Feature.search.overlaps(bs_param, text=search_term, srid=3785)
|
||||||
d = {'c': features.count()}
|
d = {'c': features.count()}
|
||||||
return render_to_json_response(d)
|
return render_to_json_response(d)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user