Skip to content

Chain Question #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mlrlite opened this issue Jan 30, 2014 · 3 comments
Closed

Chain Question #7

mlrlite opened this issue Jan 30, 2014 · 3 comments

Comments

@mlrlite
Copy link

mlrlite commented Jan 30, 2014

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.

@toin0u
Copy link
Member

toin0u commented Jan 30, 2014

Hi @mlrlite,

There is no way to know which provider return the Geocoded object. Do you have any use case ?

@mlrlite
Copy link
Author

mlrlite commented Feb 3, 2014

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)

@toin0u
Copy link
Member

toin0u commented Feb 3, 2014

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants