Chain Question
Closed this issue · 3 comments
When using the chain method, is there anyway to determine which provider returned the result.
Ex:
$geocoder = new \Geocoder\Geocoder();
$adapter = new \Geocoder\HttpAdapter\CurlHttpAdapter();
$chain = new \Geocoder\Provider\ChainProvider(array(
new \Geocoder\Provider\FreeGeoIpProvider($adapter),
new \Geocoder\Provider\HostIpProvider($adapter),
new \Geocoder\Provider\GoogleMapsProvider($adapter),
new \Geocoder\Provider\BingMapsProvider($adapter, '<API_KEY>'),
new \Geocoder\Provider\OpenStreetMapProvider($adapter),
));
$geocoder->registerProvider($chain);
I want to know if google or bing returned the result set.
Hi @mlrlite,
There is no way to know which provider return the Geocoded
object. Do you have any use case ?
Only use case is that we store the provider in which we find the geo-encoded data, for instance Google (lat,lon) or Bing (lat,lon)
I see. I think it's a good idea to open an issue to the Geocoder
library to discuss with about it :) I don't think it's related to Laravel (so I close this one).