Open ajturner opened 9 years ago
@ajturner any idea how to do this? Am I missing the option to restrict results to U.S. here? https://developers.arcgis.com/javascript/jsapi/geocoder-amd.html
@ajturner I just am not seeing this as an option for the GeoSearch control I am using for this app. I see it as an option for the geocoder, but that's not helpful here. I think we may need to close this bug as 'wontfix' if that's okay with you.
Docs: https://github.com/Esri/esri-leaflet-geocoder#lesrigeocodingcontrolsgeosearch
@benheb the specific option of country
likely is not exposed in the library, but is available in the underlying API. That would mean submitting a patch back to the project.
About here you would add something like this plus other stuff through the library :)
if(country){
request.sourceCountry(country);
}
You could use useMapBounds : true
.
if not - just backlog for now.
added Feature Request
@ajturner yea I have useMapBounds set to true, and doesn't seem to do much, except maybe favors US results first, but still shows results outside of view. Backlog seems good on this one.
Agreed - move to backlog.
i assume you guys are using esri leaflet geocoder rc.4
?
if so, feel free to compile master
from source as i patched this in Esri/esri-leaflet-geocoder/pull/58 shortly after we tagged our last release.
If I type in my zipcode
20002
, 4 of the 5 suggestions are outside the US and therefore not usefulThe locator should support bounding-box restricted suggest & responses.