Nominatim Geocoder appears to ignore the countrycodes
See original GitHub issueHello! It appears the Nominatum geocoder appears to be ignoring requested countries:
L.control.locate().addTo(map);
var geocoder = new L.Control.geocoder({
geocoder: L.Control.Geocoder.Nominatim({
geocodingQueryParams: { countrycodes: 'gb'}
})
}).addTo(map);
But results appear to be global in nature:
Are there any known work arounds? Happy to dig around the code etc.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Search - Nominatim 4.2.0
Each place in Nominatim is assigned to one country code based on OSM country ... If you do not want certain OSM objects...
Read more >unable to Geocode with Openstreet Map provider since 3.2
I made some tests and the country can appear only one time , the country code can't appear. With google maps it works...
Read more >GeoPy Documentation - Read the Docs
from geopy.geocoders import Nominatim ... Even if the proxy scheme is https, it will be ignored, and the connec-.
Read more >Nominatim - OpenStreetMap
Either uses standard RFC 2616 accept-language string or a simple comma separated list of language codes. q=<query>, Query string to search for. countrycodes=< ......
Read more >Set Up OSM Nominatim Geocoding Server on Ubuntu 20.04
Step 1: Install and Configure PostgreSQL. Note: If OSM tile server and Nominatim are installed on the same server, then you can skip...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I downloaded the 1.5.4 version from https://github.com/perliedman/leaflet-control-geocoder/releases it works as expected.
https://nominatim.openstreetmap.org/search?q=richmond&limit=5&format=json&addressdetails=1&countrycodes=au&json_callback=_l_geocoder_2
Thanks for the fast response, and keep up the awesome work!
Hi @slead, good to hear you’re finding the plugin useful! Which version of Leaflet Control Geocoder are you running? What does your code look like?
I’ve tested this with the following code:
With this setup, running latest version of the plugin, searching for “Perth” I get this URL in Chrome devtools’ network tab:
https://nominatim.openstreetmap.org/search?q=perth&limit=5&format=json&addressdetails=1&countrycodes=au&json_callback=_l_geocoder_0
So it appears to work. Anything different in your setup that could explain this?