Esri / esri-leaflet-geocoder

helpers for using the ArcGIS World Geocoding Service in Leaflet
http://esri.github.io/esri-leaflet/examples/geocoding-control.html
Apache License 2.0
244 stars 101 forks source link

Why used ISO 3166-1 alpha-3 in the result #243

Closed madvik closed 3 years ago

madvik commented 4 years ago

Thanks for this library. Why used juste ISO 3166-1 alpha-3 in the result of reverse geolocation ? Why not show the country and the alpha-2 and alpha-3 iso code? Thanks

jgravois commented 4 years ago

Why use just ISO 3166-1 alpha-3 in the result of reverse geolocation ? Why not show the country and the alpha-2 and alpha-3 iso code?

if you want the service to return different attributes, there's not much esri leaflet can do about that. i can't say i understand why 3 letter country codes aren't sufficient all on their own though.

i'm not super knowledgable about the intricacies of /reverseGeocode , but its possible that you can control the formatting via one of the more obscure request parameters.

var geocodeService = L.esri.Geocoding.geocodeService({
    requestParams: { 'locationType' : 'rooftop' }
  });

map.on('click', function (e) {
  geocodeService.reverse().latlng(e.latlng).run(/* */);
})

cc/ @BruceHarold

BruceHarold commented 4 years ago

I don't think you can control the format of the country output. If you need to lookup a long name its a small enough table of values to use.

jwasilgeo commented 3 years ago

Thanks for the discussion. Closing due to inactivity.