Geocoder icon indicating copy to clipboard operation
Geocoder copied to clipboard

Always get the address id

Open jbelien opened this issue 2 years ago • 3 comments

[...] is it possible to get the address id also when the provider list the results ..

For example arcgis have an id to identify that address, its possible to get that info also on the result array?

Originally posted by @mrelliot69 in https://github.com/geocoder-php/Geocoder/issues/1163#issuecomment-1263963499

jbelien avatar Oct 01 '22 08:10 jbelien

Some providers return an identifier for the address some don't. It really depends on the provider (either because the external API do not return an identifier, or because it has not been implemented in the Geocoder PHP provider). Nothing we can do about the first case, but if it's missing in our provider, we can easily add it (via a PR).

jbelien avatar Oct 01 '22 08:10 jbelien

In this case for example the arcgis and the mapbox one return allways the id, but when getting that info using the library , only returns the info like address, latitude, longitude,... but never the id

If we can add that, that would be great

mrelliot69 avatar Oct 01 '22 09:10 mrelliot69

If it's provided by the external API, it's definitely not an issue to add it to our providers.

PR are more than welcome.

jbelien avatar Oct 01 '22 12:10 jbelien