nersus15/filament-map-picker
A Filament form field that lets users pick a location directly on an interactive map, storing coordinates from the selected point. A simple way to add map-based location selection to your admin panels and forms instead of typing latitude and longitude by hand.
Install via Composer: composer require nersus15/filament-map-picker. Publish the config and assets: php artisan vendor:publish --tag="filament-map-picker-config" and php artisan vendor:publish --tag="filament-map-picker-assets". Review config/filament-map-picker.php for map provider, default center, zoom, and API key settings. Add the form field to any Filament resource form: MapPicker::make('location'). The first use case is adding a location picker to a create/edit form so users can drop a pin or use their current location. Look first at the config file and the field’s available methods (e.g. ->liveLocation(), ->defaultCenter()) to tailor behavior.
Use the field in Filament resources where you store coordinates. Common storage patterns: a single JSON column cast to array/collection, or separate latitude/longitude columns with a custom dehydrateStateUsing and afterStateHydrated. Combine with other fields (address, notes) and use the built-in live location button for quick entry. For edit forms, rely on the 1.8.3 behavior: the map loads the record’s saved coordinates instead of automatically requesting the browser’s current location. If you need live location on edit, add an explicit action/button rather than expecting automatic override. Integrate with reverse geocoding by listening to the field’s state updates and calling a geocoder service, or use the package’s hooks if provided. For custom map providers, extend the config and override the field view if necessary.
php artisan config:clear after changes).How can I help you explore Laravel packages today?