PHP code example of aabosham / filament-google-maps-marker

1. Go to this page and download the library: Download aabosham/filament-google-maps-marker 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/ */

    

aabosham / filament-google-maps-marker example snippets


return [
    'google_maps_key' => env('GOOGLE_MAPS_API_KEY')
];

use AAbosham\FilamentGoogleMapsMarker\Forms\Components\GoogleMapsMarker;

        GoogleMapsMarker::make('location')

        GoogleMapsMarker::make('location')
            ->default(['lat' => 40.7587,'lng' => -73.9786])
            ->zoom(15)
            ->zoomControl()
            ->minHeight('60vh')
            ->mapTypeId('satellite')
            ->mapTypeControl()
            ->scaleControl()
            ->streetViewControl()
            ->fullScreenControl()
            ->rotateControl()
            ->searchBoxControl()
            ->searchBoxPlaceholderText('Type an address')
            ->geolocationControl()
            ->locationButtonText('Go to my location')
            ->defaultToMyLocation()
            ->coordsBoxControl()
            ->fixMarkerOnCenter()
bash
php artisan vendor:publish --tag="filament-google-maps-marker-config"
bash
php artisan vendor:publish --tag="filament-google-maps-marker-views"