PHP code example of codewithdennis / filament-simple-map
1. Go to this page and download the library: Download codewithdennis/filament-simple-map 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/ */
codewithdennis / filament-simple-map example snippets
return [
'google_maps_embed_api_key' => env('GOOGLE_MAPS_EMBED_API_KEY'),
];
->address('City Hall, New York, NY')
->center('37.4218,-122.0840')
->zoom(10) // 0 to 21
->satellite()
->language('en')
->region('en')
Forms\Components\TextInput::make('address')
->SimpleMap::make('showMap')
->icon('heroicon-o-map')
->address('City Hall, New York, NY')
->center('37.4218,-122.0840')
->zoom(10)
->satellite()
->language('en')
->region('US'),
),
->viewing()
->center('-33.8569,151.2152')
->zoom(10) // 0 to 21
->satellite()
Forms\Components\TextInput::make('address')
->SimpleMap::make('showMap')
->viewing()
->center('-33.8569,151.2152')
->zoom(10)
->satellite()
),
->origin('Amsterdam, Netherlands')
->destination('Rotterdam, Netherlands')
->waypoints([
'Utrecht, Netherlands',
'Den Haag, Netherlands'
])
->avoid([
'tolls',
'highways',
'ferries'
])
->flying()
->walking()
->bicycling()
->transit()
->driving()
->imperial()
->center('52.3676,4.9041')
->satellite()
->language('nl')
->region('nl')
Forms\Components\TextInput::make('address')
->SimpleMap::make('showMap')
->directions()
->origin('Amsterdam, Netherlands')
->destination('Rotterdam, Netherlands')
->walking()
->imperial()
->satellite()
->language('nl')
),
->location('52.3676,4.9041')
->heading(0) // -180 to 360
->pitch(0) // -90 to 90
->fov(100) // 10 to 100
->center('52.3676,4.9041')
->zoom(10) // 0 to 21
->language('nl')
->region('nl')
->query('restaurants near Amsterdam, Netherlands')
->center('52.3676,4.9041')
->zoom(10) // 0 to 21
->satellite()
->language('nl')
->region('nl')
Forms\Components\TextInput::make('address')
->impleMap::make()
->search()
->query('restaurants near Amsterdam, Netherlands')
->center('52.3676,4.9041')
->zoom(10)
),