Mapquest provider not returning street numbers.
humblecoder opened this issue · 1 comments
General Information
GeocoderLaravel Version: 4.0
Laravel Version: 5.7
PHP Version: 7.2
Operating System and Version: Ubuntu 16.04 (Vagrant) (MacOS host)
Issue Description
Mapquest provider doesn't return street numbers. I've ensured that my API key is correct. It does return a "general area" which includes street name/city/state -- simply no street number.
Also, I've sent the exact same lat/long directly via the Mapquest API (http://www.mapquestapi.com/geocoding/v1/reverse?key=MY_KEY) and it does return all relevant data.
Steps to Replicate
Step 1)
composer require geocoder-php/mapquest-provider
Step 2)
Add use Geocoder\Provider\MapQuest\MapQuest; to config/geocoder.php
Step 3)
Insert MapQuest::class => [env('MAPQUEST_API_KEY')] into 'providers' in config/geocoder.php
Step 4)
Hit an endpoint that attempts to retrieve the data:
$reverse = app('geocoder')->limit(10)->reverse($request->latitude, $request->longitude)->get();
$relevant = $reverse[0]->toArray();
return $relevant;
Stack Trace
N/A
Apparently, despite responding to the fact that your API_KEY was accurate/inaccurate , it also required a second constructor param of true. I'm sure this is documented somewhere, but I never came across it.