# Get the maximum number of results to return
def result_limit
if params[:limit]
- if params[:limit].to_i.positive? && params[:limit].to_i <= 10000
+ if params[:limit].to_i.positive? && params[:limit].to_i <= Settings.max_note_query_limit
params[:limit].to_i
else
- raise OSM::APIBadUserInput, "Note limit must be between 1 and 10000"
+ raise OSM::APIBadUserInput, "Note limit must be between 1 and #{Settings.max_note_query_limit}"
end
else
- 100
+ Settings.default_note_query_limit
end
end
max_number_of_relation_members: 32000
# The maximum area you're allowed to request notes from, in square degrees
max_note_request_area: 25
+# Default limit on the number of notes returned by the note search api method
+default_note_query_limit: 100
+# Maximum limit on the number of notes returned by the note search api method
+max_note_query_limit: 10000
# Zoom level to use for postcode results from the geocoder
postcode_zoom: 15
# Timeout for API calls in seconds