Simple Map
CommunityThis package provides a simple and user-friendly map display action component for your Filament application.
Author:
CodeWithDennis
Package health
BetaAutomated checks of this plugin's Composer package
13 checks
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
^8.1supports current PHP8.5. - Skipped: Current Symfony version supported
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 107 days ago; last release 107 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
- Failed: GitHub Actions pinned to SHA — View details on Plumb
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Failed: Dependabot or Renovate configured — No dependency updater configuration found. View details on Plumb
- Skipped: Dependency update cooldown configured
- Failed: Provides a security policy — View details on Plumb
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
This package provides a simple and user-friendly map display action component for your Filament application. It utilizes an iframe to render the map, ensuring seamless integration. Ensure you have a Google Maps API key to use this package.
![]()
#Installation
You can install the package via composer:
composer require codewithdennis/filament-simple-map
You can publish the config file with:
php artisan vendor:publish --tag="filament-simple-map-config"
This is the contents of the published config file:
return [
'google_maps_embed_api_key' => env('GOOGLE_MAPS_EMBED_API_KEY'),
];
#Usage
This package supports the following Google Maps modes place, view, streetview, search and directions. The default mode is place. You can use it for Table Actions, Infolists, Forms, and regular actions. Just make sure you import the right component.
#Place
Methods that are available with the default place mode.
Defines map marker location.
->address('City Hall, New York, NY')
Defines center of the map view.
->center('37.4218,-122.0840')
Sets initial zoom level of the map.
->zoom(10) // 0 to 21
Sets the map to satellite view. (default: roadmap)
->satellite()
Defines the language to use for UI elements and for the display of labels on map tiles.
->language('en')
Defines the appropriate borders and labels to display, based on geopolitical sensitivities.
->region('en')
Here is an example of how to use the place mode.
Forms\Components\TextInput::make('address')
->required()
->maxLength(255)
->suffixAction(
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'),
),
#View
To use the view mode, you need to call the viewing method.
Sets the map to viewing mode.
->viewing()
Defines center of the map view.
->center('-33.8569,151.2152')
Sets initial zoom level of the map.
->zoom(10) // 0 to 21
Sets the map to satellite view. (default: roadmap)
->satellite()
Here is an example of how to use the view mode.
Forms\Components\TextInput::make('address')
->required()
->maxLength(255)
->suffixAction(
SimpleMap::make('showMap')
->viewing()
->center('-33.8569,151.2152')
->zoom(10)
->satellite()
),
#Directions
To use the directions mode, you need to call the directions method.
Defines the starting point for calculating directions.
->origin('Amsterdam, Netherlands')
Defines the destination point for calculating directions.
->destination('Rotterdam, Netherlands')
Specifies one or more intermediary places to route directions between the origin and destination.
->waypoints([
'Utrecht, Netherlands',
'Den Haag, Netherlands'
])
Specifies features to avoid in directions. Note that this doesn't preclude routes that include the restricted feature(s); it biases the result to more favorable routes.
->avoid([
'tolls',
'highways',
'ferries'
])
Sets the mode of transport to flying.
->flying()
Sets the mode of transport to walking.
->walking()
Sets the mode of transport to bicycling.
->bicycling()
Sets the mode of transport to transit.
->transit()
Sets the mode of transport to driving.
->driving()
Sets the unit system to imperial. (default: metric)
->imperial()
Defines center of the map view.
->center('52.3676,4.9041')
Sets the map to satellite view. (default: roadmap)
->satellite()
Defines the language to use for UI elements and for the display of labels on map tiles.
->language('nl')
Defines the appropriate borders and labels to display, based on geopolitical sensitivities.
->region('nl')
Here is an example of how to use the directions mode.
Forms\Components\TextInput::make('address')
->required()
->maxLength(255)
->suffixAction(
SimpleMap::make('showMap')
->directions()
->origin('Amsterdam, Netherlands')
->destination('Rotterdam, Netherlands')
->walking()
->imperial()
->satellite()
->language('nl')
),
#Streetview
To use the streetview mode, you need to call the streetview method.
Defines the location to display street view.
->location('52.3676,4.9041')
Indicates the compass heading of the camera in degrees clockwise from North.
->heading(0) // -180 to 360
Specifies the angle, up or down, of the camera.
->pitch(0) // -90 to 90
Determines the horizontal field of view of the image.
->fov(100) // 10 to 100
Defines center of the map view.
->center('52.3676,4.9041')
Sets initial zoom level of the map.
->zoom(10) // 0 to 21
Defines the language to use for UI elements and for the display of labels on map tiles.
->language('nl')
Defines the appropriate borders and labels to display, based on geopolitical sensitivities.
->region('nl')
#Search
To use the search mode, you need to call the search method.
Defines the search term.
->query('restaurants near Amsterdam, Netherlands')
Defines center of the map view.
->center('52.3676,4.9041')
Sets initial zoom level of the map.
->zoom(10) // 0 to 21
Sets the map to satellite view. (default: roadmap)
->satellite()
Defines the language to use for UI elements and for the display of labels on map tiles.
->language('nl')
Defines the appropriate borders and labels to display, based on geopolitical sensitivities.
->region('nl')
Here is an example of how to use the search mode.
Forms\Components\TextInput::make('address')
->required()
->maxLength(255)
->suffixAction(
SimpleMap::make()
->search()
->query('restaurants near Amsterdam, Netherlands')
->center('52.3676,4.9041')
->zoom(10)
),
#Contributing
Please see CONTRIBUTING for details.
#Credits
#License
The MIT License (MIT). Please see License File for more information.
The author
I build Laravel & FilamentPHP plugins, tinker with code, and game way too much when I’m off the clock.
From the same author
Advanced Choice
A beautifully styled, fully customizable set of radio group components for FilamentPHP.
Author:
CodeWithDennis
Advanced Components
This plugin extends existing FilamentPHP components with advanced features and enhanced functionality.
Author:
CodeWithDennis
Larament
Kickstart your project and save time with Larament! This time-saving starter kit includes a Laravel project with FilamentPHP already installed and set up, along with extra features.
Author:
CodeWithDennis
Theme Inspector
Easily see the fi- class of any element on the page by hovering over it. A tooltip displays the class name, and you can copy it with a click!
Author:
CodeWithDennis
Featured Plugins
A selection of plugins curated by the Filament team
Blueprint
Filament Blueprint is a premium Laravel Boost extension that helps AI agents produce accurate, detailed implementation plans and security reports for Filament apps.
Filament
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese