MapCoordinatesField selects a single geographic point without address search or reverse geocoding. Use it for equipment positions, meeting points and coordinates that do not need a street address.
Basic usage
The component enables manual coordinate inputs and stores lat and lng. Address search and reverse geocoding are disabled by default. MapLibre’s default rendering setup needs no Mapbox token; a custom tile/style provider may have its own requirements.
State and database storage
Use a JSON column with an Eloquent array cast:
defaultCenter() sets the initial camera; it does not select or save a point. Use default(['lat' => 52.2297, 'lng' => 21.0122]) for an initial field value. Existing model values hydrate through the normal Filament form flow.
Use manualCoordinates(false) to hide the numeric inputs, selectOnMapClick(false) to disable point placement by clicking, and draggableMarkers(false) to disable dragging. readOnly() blocks value changes while retaining map viewing controls.
Latitude and longitude are validated on the server, together with configured bounds/radius policies. The coordinate inputs are not the validation boundary. requiredFields(['lat', 'lng']) is configured by the component; required() additionally makes an empty selection invalid.
Optional device location
geolocation() adds a location action. It requests browser permission only after the user activates it, requires a secure browser context and can fail if permission or a device location is unavailable. It does not continuously track the device.
See shared map configuration for providers, GPS timeouts, camera controls, appearance and coordinate order. defaultCenter() takes [latitude, longitude]; GeoJSON and radius centers take [longitude, latitude].
Last modified on October 16, 2026