Skip to content

Commit

Permalink
Update WMTS and location filter limits (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
gacarrillor authored Oct 12, 2024
1 parent 6f154af commit 9aa409e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def prefix(self):
return "chs"

def perform_fetch_results(self, search: str, feedback: QgsFeedback):
limit = self.settings.filter_location_limit.value()
limit = self.settings.filters[self.type.value]["limit"].value()
url, params = map_geo_admin_url(
search, self.type.value, self.crs, self.lang, limit
)
Expand Down
3 changes: 2 additions & 1 deletion swiss_locator/core/filters/swiss_locator_filter_wmts.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def perform_fetch_results(self, search: str, feedback: QgsFeedback):
# sort the results with score
results = sorted([result for (result, score) in results.items()])

for result in results[0 : self.settings.filter_wmts_limit.value()]:
limit = self.settings.filters[self.type.value]["limit"].value()
for result in results[0:limit]:
self.resultFetched.emit(result)
self.result_found = True

0 comments on commit 9aa409e

Please sign in to comment.