Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
erkurn committed Sep 27, 2022
2 parents 0e9f0e1 + 18b13af commit 737e48a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `filament-address-picker` will be documented in this file.

## v1.1.0 - 2022-09-27

**Full Changelog**: https://github.com/erkurn/filament-address-picker/compare/v1.0.0...v1.1.0

## Initial Release - 2022-07-20

feat : add new field address picker
Expand Down
2 changes: 1 addition & 1 deletion config/filament-address-picker.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

return [
'google_map_key' => "",
'google_map_key' => '',
];
10 changes: 4 additions & 6 deletions src/Forms/Components/AddressPicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

use Filament\Forms\Components\Concerns\HasPlaceholder;
use Filament\Forms\Components\Field;
use Geocoder\Model\AddressCollection;
use Geocoder\Provider\Cache\ProviderCache;
use Geocoder\Provider\GoogleMaps\GoogleMaps;
use Geocoder\Provider\GoogleMaps\Model\GoogleAddress;
use Geocoder\Query\ReverseQuery;
use GuzzleHttp\Client;

Expand All @@ -29,7 +27,7 @@ class AddressPicker extends Field
'streetViewControl' => true,
'rotateControl' => true,
'fullscreenControl' => true,
'searchBoxControl' => false
'searchBoxControl' => false,
];

public array $defaultLocation = [
Expand Down Expand Up @@ -83,7 +81,7 @@ public function getApiKey()
return config('filament-address-picker.google_map_key');
}

public function getAddresses() : \Geocoder\Collection
public function getAddresses(): \Geocoder\Collection
{
$httpClient = new Client();
$provider = new GoogleMaps($httpClient, null, $this->getApiKey());
Expand All @@ -95,7 +93,7 @@ public function getAddresses() : \Geocoder\Collection
));
}

public function getAddress() : \Geocoder\Location
public function getAddress(): \Geocoder\Location
{
return $this->getAddresses()->first();
}
Expand All @@ -112,7 +110,7 @@ public function getState()
} catch (\Exception $e) {
return [
'lat' => 0,
'lng' => 0
'lng' => 0,
];
}
}
Expand Down

0 comments on commit 737e48a

Please sign in to comment.