New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

speniti/filament-mapbox

A set of tools for integrating Mapbox within the Filament ecosystem.
2,215 2

Larablocks Analysis

speniti/filament-mapbox works with Laravel 11, 12 and 13 (latest release v3.0.0, May 11, 2026).

Promising: maintained and up to date, meets 2 of 4 checks; not yet widely used.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (May 11, 2026)
  • 614 downloads a month (needs 10,000)
  • 2 GitHub stars (needs 100)

State

Maintained
  • Last stable release: May 11, 2026.
  • 1 release in the last 12 months.
  • First released: Mar 29, 2025.
  • Monthly downloads: 614, up 753% from six months ago.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.

Install
composer require speniti/filament-mapbox
Latest Version:v3.0.0
PHP:^8.4
Laravel:11 · 12 · 13
License:MIT
Last Updated:May 12, 2026
Links: GitHub  ·  Packagist
Maintainer: speniti

Filament Mapbox

This package provides a set of tools for integrating Mapbox within the Filament ecosystem.

GitHub License GitHub Release GitHub Actions Workflow Status Codecov

Getting started

Prerequisites

This package has been built for Filament 5 and has been tested only with PHP 8.4 and Laravel 12.

Installation

The package can be installed using Composer with the following command:

composer require speniti/filament-mapbox

Usage

Geocoder Form Component

A geocoder component using the Mapbox Geocoding API. It Can be used in a form to search for an addresses.

Geocoder Form Component

Basic Usage

To search for an address, you can use it without any option:

public function form(Schema $schema): Schema
{
    return $schema->components([
        Geocoder::make('address'),
    ]);
}
Options

The component can be customized with the following options:

Geocoder::make('address')
    // If true, the geocoder control will clear its contents and blur when the user presses the escape key (default true).
    ->clearAndBlurOnEsc(bool|Closure $clearAndBlurOnEsc = true)
    // Limit the result to the specified countries.
    ->countries(string|array|Closure $countries)
    // Like the one before but only one country.
    ->country(string|Closure $country)
    // Specify the language to use for the results (default 'en').
    ->language(string|Closure $language)
    // Specify whether the Geocoding API should attempt approximate, as well as exact, matching when performing searches (default true).
    ->fuzzyMatch(bool|Closure $fuzzyMatch = true)
    // Limit the maximum number of results to show (default 5).
    ->limit(int|Closure $limit)
    // Set the minimum number of characters to enter before results are shown (default 2).
    ->minLength(int|Closure $minLength)
    // Set a list of types that filter results to match those specified.
    ->types(FeatureType|array|Closure $types)

See FeatureType.php for available types.

Aside from the custom options, the component supports placeholder, affixes and suffixes and can be disabled. The only validation rule supported is required.

Localization

The component supports localization. The applied language will depend on the browser's language settings.

Output formats

Depending on how you typehint the form property associated with the component, you can get the output in different formats.

For instance if you typehint string you will get the address as a string:

public string $address = '';

public function form(Schema $schema): Schema
{
    return $schema->components([
        Geocoder::make('address'),
    ]);
}

public function save(): void
{
    $data = $this->form->getState();

    // $address is a string containing the full address.
    // $data['address'] is also a string containing the full address.
    // e.g. "Times Square, New York, New York 10018, Stati Uniti d'America"
}

In a similar way, if you typehint array you will get an associative array with the address parts:

 /** @var array<mixed> */
public array $address = [];

public function form(Schema $schema): Schema
{
    return $schema->components([
        Geocoder::make('address'),
    ]);
}

public function save(): void
{
    $data = $this->form->getState();

    // $address is an associative array containing the address parts.
    // $data['address'] is also an associative array containing the address parts.
    // e.g. [
    //  address" => "Times Square"
    //    "street" => "Times Square"
    //    "postcode" => "10018"
    //    "place" => "New York"
    //    "region" => "New York"
    //    "country" => "Stati Uniti d'America"
    //    "placeName" => "Times Square, New York, New York 10018, Stati Uniti d'America"
    //    "coords" => array:2 [
    //      0 => -73.98769
    //      1 => 40.75534
    //    ]
    //]
}

Lastly, if you prefer a DTO-like approach, you can typehint AddressInfo and you will get an instance of the AddressInfo class:

public AddressInfo $address;

public function mount(): void
{
    $this->address = new AddressInfo();
}

public function form(Schema $schema): Schema
{
    return $schema->components([
        Geocoder::make('address'),
    ]);
}

public function save(): void
{
    $data = $this->form->getState();

    // $address is an instance of AddressInfo containing the address parts.
    // $data['address'] is also an instance of AddressInfo containing the address parts.
    // e.g. Peniti\FilamentMapbox\Geocoder\AddressInfo {
    //    placeName: "Times Square, New York, New York 10018, Stati Uniti d'America"
    //    address: "Times Square"
    //    houseNumber: null
    //    street: "Times Square"
    //    postcode: "10018"
    //    place: "New York"
    //    region: "New York"
    //    country: "Stati Uniti d'America"
    //    coords: array:2 [
    //      0 => -73.98769
    //      1 => 40.75534
    //    ]
    //  }
}

Contributing

Thank you for considering contributing to Filament Mapbox! You can read the contribution guide here.

Code of Conduct

To ensure that the community is welcoming to all, please review and abide by the Code of Conduct.

License

Filament Mapbox is open-sourced software licensed under the MIT license.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP License
v3.0.0 ^8.4 MIT
v2.1.1 ^8.4 MIT
v2.1.0 ^8.4 MIT
v2.0.0 ^8.4 MIT
v1.0.4 ^8.4 MIT