geocoder-php/GeocoderLaravel

Location mismatch with Geocoder

extraric opened this issue · 3 comments

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?

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

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

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