Skip to content

Commit

Permalink
Remove country code filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
agramichael committed Jan 28, 2025
1 parent e6bc7a0 commit 541fe36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 1 addition & 10 deletions lib/geocoder/lookups/uk_ordnance_survey_places.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,8 @@ def query_url_params(query)
query: query.sanitized_text,
key: configuration.api_key,
dataset: 'DPA,LPI',
output_srs: 'EPSG:4326',
fq: filter
output_srs: 'EPSG:4326'
}.merge(super)
end

def country_codes
%w[E W S N L M]
end

def filter
country_codes.map { |t| "COUNTRY_CODE:#{t}" }.join(' ')
end
end
end
1 change: 1 addition & 0 deletions lib/geocoder/results/uk_ordnance_survey_places.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def province
'N' => 'Northern Ireland',
'L' => 'Channel Islands',
'M' => 'Isle of Man',
'J' => ''
}[data['COUNTRY_CODE']]
end

Expand Down

0 comments on commit 541fe36

Please sign in to comment.