PHPackages                             lbcdev/filament-maps-widgets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. lbcdev/filament-maps-widgets

ActiveLibrary[Admin Panels](/categories/admin)

lbcdev/filament-maps-widgets
============================

Interactive map widgets for Filament panels

v2.0.0(3mo ago)00MITPHPPHP ^8.2|^8.3

Since Feb 16Pushed 3mo agoCompare

[ Source](https://github.com/Luinux81/filament-maps-widgets)[ Packagist](https://packagist.org/packages/lbcdev/filament-maps-widgets)[ Docs](https://github.com/Luinux81/filament-maps-widgets)[ RSS](/packages/lbcdev-filament-maps-widgets/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

Filament Maps Widgets
=====================

[](#filament-maps-widgets)

[![Latest Version on Packagist](https://camo.githubusercontent.com/68d234d14cd982c596017d181bd07ae5b7db5ca68da52ac190fa8cfc8903dc0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c62636465762f66696c616d656e742d6d6170732d776964676574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lbcdev/filament-maps-widgets)[![Total Downloads](https://camo.githubusercontent.com/fe0ed2b194f35b76822087e9b0ff739b76d09b778190edabc87e4be0d4f3d744/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c62636465762f66696c616d656e742d6d6170732d776964676574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lbcdev/filament-maps-widgets)

Interactive map widgets for Filament panels, built on top of [livewire-maps-core](https://github.com/Luinux81/livewire-maps-core) and [map-geometries](https://github.com/Luinux81/map-geometries).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require lbcdev/filament-maps-widgets
```

Optionally, you can publish the config file with:

```
php artisan vendor:publish --tag="filament-maps-widgets-config"
```

Quick Start
-----------

[](#quick-start)

Create a map widget by extending `MapWidget`:

```
namespace App\Filament\Widgets;

use LBCDev\FilamentMapsWidgets\Widgets\MapWidget;
use LBCDev\MapGeometries\Marker;
use LBCDev\MapGeometries\MarkerCollection;

class LocationsMap extends MapWidget
{
    protected function getMarkers(): MarkerCollection
    {
        $markers = new MarkerCollection();

        $markers->add(
            Marker::make('home')
                ->lat(40.7128)
                ->lng(-74.0060)
                ->popup('New York City')
        );

        return $markers;
    }

    protected function getMapCenter(): array
    {
        return ['lat' => 40.7128, 'lng' => -74.0060];
    }
}
```

Features
--------

[](#features)

- 🗺️ **Easy Integration**: Built specifically for Filament panels
- 🎨 **Customizable**: Configure map center, zoom, options, and more
- 🎯 **Actions System**: Add custom actions/controls to your maps
- 🧩 **Modular**: Built on top of separate core and geometries packages
- ✅ **Well Tested**: Comprehensive test coverage
- 📚 **Documented**: Full API documentation

Basic Usage
-----------

[](#basic-usage)

### Simple Map Widget

[](#simple-map-widget)

```
use LBCDev\FilamentMapsWidgets\Widgets\MapWidget;
use LBCDev\MapGeometries\Marker;

class MyMap extends MapWidget
{
    protected function getMarkers(): array
    {
        return [
            Marker::make('marker-1')
                ->lat(51.505)
                ->lng(-0.09)
                ->popup('London'),
        ];
    }
}
```

### Custom Map Configuration

[](#custom-map-configuration)

```
class MyMap extends MapWidget
{
    protected function getMapCenter(): array
    {
        return ['lat' => 51.505, 'lng' => -0.09];
    }

    protected function getMapZoom(): int
    {
        return 13;
    }

    protected function getMapOptions(): array
    {
        return [
            'scrollWheelZoom' => true,
            'dragging' => true,
            'minZoom' => 10,
            'maxZoom' => 18,
        ];
    }
}
```

### Dynamic Markers from Database

[](#dynamic-markers-from-database)

```
use App\Models\Location;

class LocationsMap extends MapWidget
{
    protected function getMarkers(): MarkerCollection
    {
        $markers = new MarkerCollection();

        Location::all()->each(function ($location) use ($markers) {
            $markers->add(
                Marker::make($location->id)
                    ->lat($location->latitude)
                    ->lng($location->longitude)
                    ->color($location->is_active ? 'green' : 'red')
                    ->popup("{$location->name}{$location->address}")
            );
        });

        return $markers;
    }
}
```

### Adding Actions

[](#adding-actions)

```
use LBCDev\FilamentMapsWidgets\Actions\ZoomAction;

class MyMap extends MapWidget
{
    protected function getActions(): array
    {
        return [
            ZoomAction::make()
                ->position('topright'),
        ];
    }
}
```

Configuration
-------------

[](#configuration)

The package comes with sensible defaults, but you can customize everything via the config file:

```
return [
    'default_center' => [
        'lat' => 0,
        'lng' => 0,
    ],
    'default_zoom' => 10,
    'default_height' => '500px',
    'map_options' => [
        'scrollWheelZoom' => true,
        'dragging' => true,
        // ... more options
    ],
];
```

Advanced Usage
--------------

[](#advanced-usage)

### Reactive Widgets with Filters

[](#reactive-widgets-with-filters)

```
class FilteredMap extends MapWidget
{
    public array $filters = [];

    protected $listeners = [
        'filtersUpdated' => 'handleFiltersUpdated',
    ];

    public function mount(array $filters = []): void
    {
        $this->filters = $filters;
        parent::mount();
    }

    protected function getMarkers(): MarkerCollection
    {
        // Apply filters to your query
        $query = Location::query();

        if ($this->filters['category'] ?? null) {
            $query->where('category_id', $this->filters['category']);
        }

        // Build markers from filtered results
        // ...
    }

    public function handleFiltersUpdated(array $filters): void
    {
        $this->filters = $filters;
        $this->refresh();
    }
}
```

### Custom Height and Styling

[](#custom-height-and-styling)

```
class MyMap extends MapWidget
{
    public string $height = '700px';

    protected bool $hasBorder = true;
}
```

Testing
-------

[](#testing)

```
composer test
```

Or with coverage:

```
composer test-coverage
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Luinux81](https://github.com/Luinux81)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Related Packages
----------------

[](#related-packages)

This package is part of the LBCDev Maps Suite:

- [livewire-maps-core](https://github.com/Luinux81/livewire-maps-core) - Core Livewire map component
- [map-geometries](https://github.com/Luinux81/map-geometries) - Map geometry classes (Marker, Polyline, etc.)
- [filament-maps-fields](https://github.com/Luinux81/filament-maps-fields) - Map form fields for Filament
- [lbcdev-filament-maps-suite](https://github.com/Luinux81/lbcdev-filament-maps-suite) - Meta-package for all components

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance82

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

90d ago

Major Versions

v1.x-dev → v2.0.02026-02-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/123c45b9a8f1e49e5a68964dee6ba594b89a0529ed3645136381aa2f6d65c5eb?d=identicon)[luinux81](/maintainers/luinux81)

---

Top Contributors

[![Luinux81](https://avatars.githubusercontent.com/u/8471444?v=4)](https://github.com/Luinux81 "Luinux81 (8 commits)")

---

Tags

laravellivewiremapswidgetsleafletfilament

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lbcdev-filament-maps-widgets/health.svg)

```
[![Health](https://phpackages.com/badges/lbcdev-filament-maps-widgets/health.svg)](https://phpackages.com/packages/lbcdev-filament-maps-widgets)
```

###  Alternatives

[awcodes/filament-quick-create

Plugin for Filament Admin that adds a dropdown menu to the header to quickly create new items.

246177.6k7](/packages/awcodes-filament-quick-create)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[caresome/filament-neobrutalism-theme

A neobrutalism theme for FilamentPHP admin panels

303.2k](/packages/caresome-filament-neobrutalism-theme)[andreia/filament-ui-switcher

Add a modal with options to switch between different UI layouts and styles (colors, fonts, font sizes).

233.8k](/packages/andreia-filament-ui-switcher)[riodwanto/filament-ace-editor

An ACE editor field for Filament forms with syntax highlighting, themes, and autocompletion.

2065.8k4](/packages/riodwanto-filament-ace-editor)[geo-sot/filament-env-editor

Access .env file though Filament admin panel

2432.3k1](/packages/geo-sot-filament-env-editor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
