Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Map Picker

Filament Map Picker Laravel Package

dotswan/filament-map-picker

A Filament v3 custom field for picking locations on an OpenStreetMap map and retrieving coordinates in real time. Includes GeoMan integration for drawing, editing, and manipulating markers, polygons, polylines, and circles.

View on GitHub
Deep Wiki
Context7

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

Frequently asked questions about Filament Map Picker
How do I install dotswan/filament-map-picker in a Laravel Filament app?
Run composer require dotswan/filament-map-picker, and for Filament v3 pin the constraint with dotswan/filament-map-picker:"^1.8" as the README shows. Then add Map::make('location') to your Filament form schema. Asset registration goes through Filament's normal asset pipeline, so no separate publish step is described in the README.
Which Filament, Laravel, and PHP versions does filament-map-picker support?
The README explicitly targets Filament v3 with a ^1.8 constraint and references latest PHP and Filament versions. The supplied material shows no confirmed Filament v4-compatible release or branch. Filament major versions have changed form component APIs, asset registration, and Livewire conventions, so verify composer constraints and repository issues before adopting it for a newer stack.
How do I save the selected latitude and longitude from filament-map-picker to my database?
The field emits a state array containing lat, lng, and geojson; it does not own a database model or backend geo service. Persist the values yourself by mapping them in afterStateUpdated to decimal latitude/longitude columns or a JSON/text column for GeoJSON, and restore them with afterStateHydrated. Add validation for coordinate ranges and GeoJSON shape before saving.
Can filament-map-picker draw polygons, polylines, and circles with GeoMan?
Yes. The package includes GeoMan integration for drawing and editing markers, polygons, polylines, and circles, plus cut, rotate, drag, and delete controls. This is useful for delivery zones, service areas, and asset boundaries. If you only need a single pin, use the minimal configuration and avoid the extra JavaScript surface.
How do I display a saved location map in a Filament infolist with filament-map-picker?
The README includes infolist examples alongside form examples, so you can render a stored location on a read-only map. Hydrate the field from your persisted latitude/longitude or GeoJSON state using the documented configuration. Check the README options table for display-related flags before building a custom entry.
Are Leaflet and GeoMan assets bundled with filament-map-picker or loaded from a CDN?
The supplied material does not state whether Leaflet and GeoMan assets are bundled and version-pinned or loaded from a CDN at runtime. Either way, OSM tile URL defaults, attribution obligations under the OSM tile usage policy, and CSP compatibility sit outside the package's control. Verify asset loading in your environment and pin or self-host dependencies if your security baseline requires it.
Is filament-map-picker tested and production-ready?
The supplied material shows no evidence of an automated test suite, CI matrix, or security policy. The package has roughly 136 stars and zero dependents, which should be read as unproven in the wild rather than popular. Pilot it in staging and add your own tests around hydration, dehydration, and validation before production use.
What are the security concerns with markerHtml and GeoJSON in filament-map-picker?
markerHtml and GeoJSON round-tripping can introduce XSS and serialization concerns when any of that content is user-supplied. Sanitize or escape HTML, validate GeoJSON server-side, and enforce size limits. Also review OSM attribution and CSP requirements because those surfaces are outside the package's control.
Does liveLocation send device coordinates to the server, and is that GDPR-safe?
The assessment notes that liveLocation(true, true, ...) transmits device coordinates to the server on an interval. That is a privacy and GDPR decision rather than a purely technical one. Require user consent, document retention, and avoid enabling it by default unless your policy owner approves.
What alternatives or use cases should I consider before using filament-map-picker?
It is a strong fit for a Laravel app with a Filament v3 admin panel that needs human-driven location selection such as store locators, delivery zones, property records, or service areas. It is a weak fit for headless or API-only products, non-Filament UIs, high-volume public map rendering, or workflows needing server-side geocoding, routing, or spatial queries. If you only need one pin, use minimal configuration; otherwise evaluate whether a custom Leaflet field or a more actively validated package better matches your Filament version.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels