Skip to content
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

Location mismatch with Geocoder #167

Open
extraric opened this issue Feb 3, 2020 · 3 comments
Open

Location mismatch with Geocoder #167

extraric opened this issue Feb 3, 2020 · 3 comments
Assignees

Comments

@extraric
Copy link

extraric commented Feb 3, 2020

General Information

GeocoderLaravel Version: 4.2.4
Laravel Version: 5.7
PHP Version: 7.2.7
Operating System and Version: SLES 12

Issue Description

I don't know if it's just my fault, but i get different result for GeocodeLaravel:

$address="1182 Budapest, Királyhágó utca 112/ B, Hungary";
$result1 = Geocoder::geocode($address)->get();
//result1 formattedAddress: "Budapest, Királyhágó u. 112b, 1201 Hungary"

and Geocode:

$httpClient = new \Http\Client\Curl\Client();
$provider = new \Geocoder\Provider\GoogleMaps\GoogleMaps($httpClient, null, 'apikey');
$geocoder = new \Geocoder\StatefulGeocoder($provider, 'hu');
$result2 = $geocoder->geocodeQuery(\Geocoder\Query\GeocodeQuery::create($addresses));
//result2 formattedAddress: "Budapest, Királyhágó u. 112, 1182 Hungary"

Looks like first one ignore postalcode. What am I miss?

@extraric
Copy link
Author

extraric commented Feb 4, 2020

If I think right it has something to do with locale setting, what I can not set directly on the first case? #159

@mikebronner
Copy link
Member

Thanks for the update on this. Any PRs are welcomed, as I am fairly swamped at the moment.

@mikebronner
Copy link
Member

@extraric If its the locale setting, you must set that in the config file.

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