Skip to main content
MapPickerField ← Back to Table of Contents

Summary

Mapbox-powered address picker with geocoding search, draggable pin, and configurable stored fields. Supports both structured array output (coordinates, street, city, etc.) and formatted string output. Ideal for location selection in delivery, real estate, or event management apps. Requires a Mapbox access token in config('filament-flex-fields.mapbox.access_token') or per-field via mapboxToken().

Basic usage

Structured Location (Coordinates + Address)

Formatted String Output


State & validation

Canonical internal keys

lat, lng, street, city, region, postcode, country, country_name, place_name

Stored value

Validation rules (built-in)


Configuration API

All methods accept Closure unless noted.
POI note: searchTypes([MapboxSearchType::Poi]) returns general Mapbox points of interest — not restaurant/cafe category filters (Geocoding v5 limitation).

FlexField / Flex Forms schema config

Shared with AddressAutocompleteField via AppliesGeocodingStudioConfig / GeocodingSearchScope:

Real-world examples

Pickup Point (POI only)

City Selector


Playground

/admin/flex-fields-playground/map-picker See Playground for setup.

CSS classes (reference)