PHPackages                             lara-zeus/filament-locationpickr-field - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lara-zeus/filament-locationpickr-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lara-zeus/filament-locationpickr-field
======================================

Location picker field for Filament Php using Google Maps

v5.0.0(2mo ago)1330↓100%[4 issues](https://github.com/lara-zeus/filament-locationpickr-field/issues)MITJavaScriptPHP ^8.1

Since Oct 7Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/lara-zeus/filament-locationpickr-field)[ Packagist](https://packagist.org/packages/lara-zeus/filament-locationpickr-field)[ Docs](https://github.com/lara-zeus/filament-locationpickr-field)[ RSS](/packages/lara-zeus-filament-locationpickr-field/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

Filament LocationPickr Field
============================

[](#filament-locationpickr-field)

[![](https://camo.githubusercontent.com/95713ed608224ad68f6080c1a96f55cb54bff1e09fd68b52d385e161d5f4b79f/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e742532304c6f636174696f6e5069636b722532304669656c642e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6c6172612d7a65757325324666696c616d656e742d6c6f636174696f6e7069636b722d6669656c64267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4a7573742b612b73696d706c652b6c6f636174696f6e2b7069636b65722b6669656c642b666f722b46696c616d656e742b5068702b7573696e672b476f6f676c652b4d617073266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d6c6f636174696f6e2d6d61726b6572)](https://camo.githubusercontent.com/95713ed608224ad68f6080c1a96f55cb54bff1e09fd68b52d385e161d5f4b79f/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e742532304c6f636174696f6e5069636b722532304669656c642e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6c6172612d7a65757325324666696c616d656e742d6c6f636174696f6e7069636b722d6669656c64267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4a7573742b612b73696d706c652b6c6f636174696f6e2b7069636b65722b6669656c642b666f722b46696c616d656e742b5068702b7573696e672b476f6f676c652b4d617073266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d6c6f636174696f6e2d6d61726b6572)

This package provides just a simplified location picker field within [Filament](https://filamentphp.com) using Google Maps based on the excellent work of [Hugh Messenger](https://filamentphp.com/plugins/cheesegrits-google-maps).

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

[](#installation)

You can install the package into a Laravel app that uses [Filament](https://filamentphp.com) via composer::

```
composer require lara-zeus/filament-locationpickr-field
```

**Filament V3 &amp; V2** - you can use  repository.

You can publish the config file with:

```
php artisan vendor:publish --tag=filament-locationpickr-field-config
```

The `config` file contains default global customization options for map rendering, like: api key, default location, etc.

Optionally, you can publish the view using:

```
php artisan vendor:publish --tag=filament-locationpickr-field-views
```

Setting your Google Maps API Key
--------------------------------

[](#setting-your-google-maps-api-key)

All use of the Google Maps API requires an API key. If you don't have one, refer to [Google's documentation](https://developers.google.com/maps/documentation/javascript/get-api-key).

Once you have a key, either add it to your .env file as:

```
GMAP_API=your_map_api_key_here

```

... or publish and edit the `filament-locationpickr-field.php` config file.

Preparing the models
--------------------

[](#preparing-the-models)

Add a `location` column to any model migration schema used for map data

```
...

Schema::table('table_name', function (Blueprint $table) {
    $table->json('location')->nullable();
});

...
```

and add the column to the model fillable array

```
...

protected $fillable = [
    ...
    'location',
];
```

If you have separate columns for `lat` and `lng` you can use a computed property on any model being used for map data and use a mutator which converts between separate lat and lng fields on your table, and a Google Point style array of 'lat' and 'lng' keys.

```
...

protected $appends = [
    ...
    'location',
];

...

public function location(): Attribute
{
    return Attribute::make(
        get: fn ($value, $attributes) => json_encode([
            'lat' => (float) $attributes['lat'],
            'lng' => (float) $attributes['lng'],
        ]),
        set: fn ($value) => [
            'lat' => $value['lat'],
            'lng' => $value['lng'],
        ],
    );
}

...
```

Usage
-----

[](#usage)

### Form field

[](#form-field)

The form field can be used with no options, by simply adding this to your Filament Form schema:

```
use LaraZeus\FilamentLocationPickrField\Forms\Components\LocationPickr;
...

    ->schema([
        ...
        LocationPickr::make('location'),
        ....
    ]);
...
```

The name used in the `make()` function must be the one you set up as your model's column/computed location property.

### Full options

[](#full-options)

The full set of options is as follows. All option methods support closures, as well as direct values.

```
use LaraZeus\FilamentLocationPickrField\Forms\Components\LocationPickr;
...

    ->schema([
        ...
        LocationPickr::make('location')
            ->mapControls([
                'mapTypeControl'    => true,
                'scaleControl'      => true,
                'streetViewControl' => true,
                'rotateControl'     => true,
                'fullscreenControl' => true,
                'zoomControl'       => false,
            ])
            ->defaultZoom(5)
            ->draggable()
            ->clickable()
            ->height('40vh')
            ->defaultLocation([41.32836109345274, 19.818383186960773])
            ->myLocationButtonLabel('My location'),
        ....
    ]);
...
```

### Infolist entry

[](#infolist-entry)

The infolist entry can be used with no options, by simply adding this to your Filament Infolist schema:

```
use LaraZeus\FilamentLocationPickrField\Infolists\Components\LocationPickr;
...

    ->schema([
        ...
        LocationPickr::make('location'),
        ....
    ]);
...
```

The name used in the `make()` function must be the one you set up as your model's column/computed location property. The components accepts options like `defaultZoom`, `defaultLocation` and `height`.

#### Example usage in simple resource

[](#example-usage-in-simple-resource)

[![Locationpickr field in modal](./docs/images/locationpickr.png)](./docs/images/locationpickr.png)

Changelog
---------

[](#changelog)

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

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

[](#contributing)

If you want to contribute to this package, you may want to test it in a real Filament project:

- Fork this repository to your Github account.
- Create a Filament app locally.
- Clone your fork in your Filament app root directoy.
- In the `/filament-locationpickr-field` directory, create a branch for your fix/improvement, e.g. `fix/pickr-field`.

Install the package in your app's `composer.json`:

```
"require": {
    "lara-zeus/filament-locationpickr-field": "dev-fix/pickr-field as dev-main",
},
"repositories": [
    {
        "type": "path",
        "url": "./filament-locationpickr-field"
    }
]
```

Now run `composer update`.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Lara Zeus](https://github.com/lara-zeus)
- [Arber Mustafa](https://github.com/arbermustafa)
- [Hugh Messenger](https://github.com/cheesegrits)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance67

Regular maintenance activity

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~39 days

Total

5

Last Release

63d ago

Major Versions

v3.0.0 → 4.x-dev2025-10-07

v4.0.0 → 5.x-dev2026-03-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1952412?v=4)[Lara Zeus](/maintainers/atmonshi)[@atmonshi](https://github.com/atmonshi)

---

Top Contributors

[![Abdulmajeed-Jamaan](https://avatars.githubusercontent.com/u/41128358?v=4)](https://github.com/Abdulmajeed-Jamaan "Abdulmajeed-Jamaan (8 commits)")[![arbermustafa](https://avatars.githubusercontent.com/u/1318974?v=4)](https://github.com/arbermustafa "arbermustafa (8 commits)")

---

Tags

phplaravelmapsformfieldgoogle mapsfilament-pluginlara-zeusfilament-locationpickr-field

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/lara-zeus-filament-locationpickr-field/health.svg)

```
[![Health](https://phpackages.com/badges/lara-zeus-filament-locationpickr-field/health.svg)](https://phpackages.com/packages/lara-zeus-filament-locationpickr-field)
```

###  Alternatives

[arbermustafa/filament-locationpickr-field

Location picker field for Filament Php using Google Maps

1539.0k](/packages/arbermustafa-filament-locationpickr-field)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

33184.7k6](/packages/schmeits-filament-character-counter)[lara-zeus/popover

Zeus Popover is filamentphp component to show a Popover with custom content in tables and infolist

2968.2k3](/packages/lara-zeus-popover)[lara-zeus/quantity

filamentphp Input Number component, with user-friendly increment and decrement controls

2065.8k3](/packages/lara-zeus-quantity)[lara-zeus/accordion

Zeus Accordion is filamentphp layout component to group components

11122.8k2](/packages/lara-zeus-accordion)

PHPackages © 2026

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