arbermustafa/filament-locationpickr-field
A Filament form field for picking a location on an interactive map. Users drop or drag a marker to capture latitude and longitude, with search and geocoding built in. Drop-in ready for Filament admin panels and forms, with configurable map options.
Architecture fit
Integration feasibility
Technical risk
maps.googleapis.com will silently break the widget.Key questions (to the maintainer, or to answer ourselves in the spike)
{lat, lng}, or two bound scalar fields? This determines our persistence and validation design.Stack fit
Migration path
latitude, longitude, and optional formatted_address as plain columns on the domain model. The field is a widget that reads and writes those columns.Compatibility
composer.json; do not float. Record the Filament/Livewire versions it was validated against in the repo README or ADR.GOOGLE_MAPS_KEY in .env, never committed), with referrer restrictions and a spend cap in the Google Cloud console.https://maps.googleapis.com and https://maps.gstatic.com in script-src, img-src, and connect-src, or the widget will fail invisibly.Sequencing
App\Filament\Fields\LocationPicker class. Our forms reference our class, never the vendor namespace. This single decision converts an abandoned-package risk into a one-file fix.Maintenance
Support
Scaling
Failure modes
| Failure | Symptom | Mitigation |
|---|---|---|
| Missing/invalid/restricted key | Blank or grey map, silent console error | Fail loud in non-prod; always render manual lat/lng inputs as fallback |
| Quota exhausted or billing lapse | Map fails for all users at once | Budget alerts, spend cap, fallback inputs |
| CSP blocks Google domains | Widget never initializes | CSP allowlist, covered in the pilot checklist |
| Livewire morph / modal / repeater | Map renders once then goes dead | Test in each context before rollout; re-init on livewire:navigated if needed |
| Key leaked in repo | Unauthorized billed usage | Referrer restriction is the real control; secret scanning in CI |
| User denies browser geolocation | No "use my location" convenience | Non-blocking by design; click-to-place still works |
| Package abandoned at next Filament major | Field breaks on upgrade | Adapter class; fork or reimplement |
| Bad data entered | Out-of-range or half-filled coordinates | Server-side validation rules, both-or-neither nullable pairing |
Ramp-up
How can I help you explore Laravel packages today?