Add additional region infomation to output documents
This commit is contained in:
parent
f25c7bb7df
commit
3f251e4c68
1 changed files with 14 additions and 0 deletions
|
@ -83,6 +83,18 @@ def get_site_filters(request):
|
||||||
return filter_rows
|
return filter_rows
|
||||||
|
|
||||||
|
|
||||||
|
def get_additional_region_info(request):
|
||||||
|
""" If the location coordinates fall within the CHCH or Auckland regions then return a description of where to find more information.
|
||||||
|
"""
|
||||||
|
coordinates = request.query_params.get('coordinates')
|
||||||
|
if coordinates is not None:
|
||||||
|
if is_in_christchurch(coordinates):
|
||||||
|
return [["Your location falls within the ecosystem type covered by the Christchurch Council ecosystem maps - further information can be obtained from Ōtautahi/Christchurch ecosystems map link to: https://ccc.govt.nz/environment/land/ecosystem-map", " "], [' ', ' ']]
|
||||||
|
elif is_in_auckland(coordinates):
|
||||||
|
return [["Your location falls within the ecosystem type covered by the Auckland Council Tiaki Tāmaki Makaurau Conservation map - further information can be obtained from tiaki Tāmaki Makaurau conservation Auckland - link to https://www.tiakitamakimakaurau.nz/conservation-map/", " "], [' ', ' ']]
|
||||||
|
|
||||||
|
return []
|
||||||
|
|
||||||
def get_filter_values(request):
|
def get_filter_values(request):
|
||||||
""" Retrives all selected values/filters from the request.
|
""" Retrives all selected values/filters from the request.
|
||||||
"""
|
"""
|
||||||
|
@ -99,6 +111,8 @@ def get_filter_values(request):
|
||||||
# Add the project site filters
|
# Add the project site filters
|
||||||
filter_rows += get_site_filters(request)
|
filter_rows += get_site_filters(request)
|
||||||
filter_rows.append([' ', ' '])
|
filter_rows.append([' ', ' '])
|
||||||
|
|
||||||
|
filter_rows += get_additional_region_info(request)
|
||||||
|
|
||||||
return filter_rows
|
return filter_rows
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue