PHP code example of sadiq / filament-gmap-location-picker
1. Go to this page and download the library: Download sadiq/filament-gmap-location-picker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sadiq / filament-gmap-location-picker example snippets
namespace App\Filament\Resources;
use Filament\Resources\Resource;
use Sadiq\GMapLocationPicker\Resources\Fields\LocationPicker;
use Filament\Resources\Forms\Form;
...
class FilamentResource extends Resource
{
...
public static function form(Form $form)
{
return $form->schema([
LocationPicker::make('point')
->defaultZoom(3)
->mapControls([
'mapTypeControl' => false,
'scaleControl' => true,
'streetViewControl' => false,
'rotateControl' => false,
'fullscreenControl' => true,
'searchBoxControl' => false
])
]);
}
...
}