geocoder-php / GeocoderLaravel

Geocoder service provider for Laravel
http://geocoder-php.org/GeocoderLaravel/
MIT License
706 stars 102 forks source link

Empty results after update. #114

Closed pxpm closed 6 years ago

pxpm commented 6 years ago

General Information

GeocoderLaravel Version: 4. Laravel Version: 5.4. PHP Version: 7.0 Operating System and Version: linux kernel: 2.6.32-673.26.1.lve1.4.30.el6.x86_64

Issue Description

I was using 1.0 for this package, but i found sometimes, for the same coordinates, i was getting errors that the provider and aggregator could not reverse the coordinates i entered. Then i realized that it was adding strange numbers to the coordinates i entered.

This would NOT occur everytime. Sometimes the same coordinates got resolved.

I tougth it could be missing some update and i decided to update to 4.* on my composer.

Everything worked fine in update. I didn't changed much in my code as it was working with v1.0.

I have in my app config and the app key on my env.

Geocoder\Laravel\Providers\GeocoderService::class,

i'v tried publishing the config (and also tried without it).

 $location = app('geocoder')->geocode('Los Angeles, CA')->get();
dd($location);

OR

$location = app('geocoder')->reverse(request('latitude'), request('longitude'))->get()->first();
dd($location);

(i checked and re-check the lat and lng are ok, and reverse to correct location with version 1.0)

I also tried

app('geocoder')->getProviders()

it's returns the chain with google maps provider first as expected with my key set on.

No errors on laravel.log.

I saw there are some people with issues similar to mine but i'm not sure they were working like me on v1.0. I'm not using vagrants or wtv, just plain old apache,php,mysql setup.

thanks in advance for this amazing package and i hope we can figure this issue out.

BTW: i deleted all cache folder. I even used: Artisan::call('cache:clear'); AND Artisan::call('optimize'); before using app('geocoder') and the requests are made as i can see in google console. but dunno about the response.

pxpm commented 6 years ago

I'm going to close this issue as it is resolved now. nothing changed, nothing configured .. i was about to go back to v1.0. and BAM. simply works.

5 hours of debugging and re-setting api keys, even subscribed to google to raise my api limits ... damn i'm feeling frustrated but well... at least it works.

mikebronner commented 6 years ago

Glad you are back on happy street! :)