diff --git a/src/Forms/Components/AddressPicker.php b/src/Forms/Components/AddressPicker.php index 3abe31b..9d45fdd 100644 --- a/src/Forms/Components/AddressPicker.php +++ b/src/Forms/Components/AddressPicker.php @@ -4,7 +4,6 @@ use Filament\Forms\Components\Concerns\HasPlaceholder; use Filament\Forms\Components\Field; -use Geocoder\Provider\Cache\ProviderCache; use Geocoder\Provider\GoogleMaps\GoogleMaps; use Geocoder\Query\ReverseQuery; use GuzzleHttp\Client; @@ -87,6 +86,7 @@ public function getAddresses(): \Geocoder\Collection $provider = new GoogleMaps($httpClient, null, $this->getApiKey()); $geocoder = new \Geocoder\StatefulGeocoder($provider, 'en'); + return $geocoder->reverseQuery(ReverseQuery::fromCoordinates( data_get($this->getState(), 'lat'), data_get($this->getState(), 'lng')