PHPackages                             aabosham/filament-google-maps-marker - 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. aabosham/filament-google-maps-marker

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

aabosham/filament-google-maps-marker
====================================

A Filament Field to get coordinates based on Google Maps

v3.0.0(2y ago)1611MITPHPPHP ^8.0|^8.1|^8.2

Since Aug 4Pushed 2y ago2 watchersCompare

[ Source](https://github.com/AAbosham/filament-google-maps-marker)[ Packagist](https://packagist.org/packages/aabosham/filament-google-maps-marker)[ Docs](https://github.com/AAbosham/filament-google-maps-marker)[ RSS](/packages/aabosham-filament-google-maps-marker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (14)Versions (6)Used By (0)

Filament Google Maps Marker
===========================

[](#filament-google-maps-marker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d8d2b96befdfa3bc1868181fd5ede5883287f8bd8ea5bb19a4c12620088006d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6161626f7368616d2f66696c616d656e742d676f6f676c652d6d6170732d6d61726b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aabosham/filament-google-maps-marker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f6e5f08670d058ba490f085b74fd797905374b5f192b1e94f5087d7cce9f0d4b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6161626f7368616d2f66696c616d656e742d676f6f676c652d6d6170732d6d61726b65722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/aabosham/filament-google-maps-marker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f41fb9750ae9c0b59b53a27d6556f20f5f67472ba57270d3a79312db076d4193/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6161626f7368616d2f66696c616d656e742d676f6f676c652d6d6170732d6d61726b65722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/aabosham/filament-google-maps-marker/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/390100684330a4e8bc0c25c632d4e0ef66d6539e1c2f1e0491403dd7d3979948/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6161626f7368616d2f66696c616d656e742d676f6f676c652d6d6170732d6d61726b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aabosham/filament-google-maps-marker)

A Filament Field to get coordinates based on Google Maps.

Fork of [Filament Google Maps Picker](https://github.com/EmilioBravo/filament-google-maps-picker)

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

[](#installation)

You can install the package via composer:

```
composer require aabosham/filament-google-maps-marker
```

You must define an environment variable `GOOGLE_MAPS_API_KEY` in your .env file with your [Google Maps API Key](https://developers.google.com/maps/documentation/embed/get-api-key#:~:text=Go%20to%20the%20Google%20Maps%20Platform%20%3E%20Credentials%20page.&text=On%20the%20Credentials%20page%2C%20click,Click%20Close.)

You can publish the config file with:

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

This is the contents of the published config file:

```
return [
    'google_maps_key' => env('GOOGLE_MAPS_API_KEY')
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-google-maps-marker-views"
```

Usage
-----

[](#usage)

### On your filament resource file

[](#on-your-filament-resource-file)

```
use AAbosham\FilamentGoogleMapsMarker\Forms\Components\GoogleMapsMarker;
```

### On your filament form schema

[](#on-your-filament-form-schema)

```
        GoogleMapsMarker::make('location')
```

This will display a simple Google Maps field with a marker in latitude 0 and longitude 0. When you click on the map, the field value and the marker positions uptades to the new coordinates.

[![Example 1](https://github.com/AAbosham/filament-google-maps-marker/raw/master/resources/readme/example1.jpg?raw=true)](https://github.com/AAbosham/filament-google-maps-marker/blob/master/resources/readme/example1.jpg?raw=true)

Enabling Google Maps controls
-----------------------------

[](#enabling-google-maps-controls)

Use this methods to enable Google Maps controls:

`zoomControl(bool)` (default: false) displays de zoom controls allow the user to change it

`mapTypeControl(bool)` (default: false) displays the map type selection control

`scaleControl(bool)` (default: false) displays the map scale control

`streetViewControl(bool)` (default: false) displays the map StreetView control

`fullScreenControl(bool)` (default: false) displays the full screen control

`rotateControl(bool)` (default: false) displays the rotation control

`searchBoxControl(bool)` (default: false) displays search box control to search for locations. Will update the field value upon selection

`geolocationControl(bool)` (default: false) custom control to get the device geolocation and update the map position with it. It required the user to allow the device permission to access geolocation data

`coordsBoxControl(bool)` (default: false) custom control that shows a text input with current value of the field in the format latitude,longitude

Options
-------

[](#options)

`zoom(int)` (default: 1) takes an integer as value and sets the initial zoom of the map

`minHeight(string)` (default: 50vh) accepts a string to set the map height, must be a valid CSS min-height. Ex: 80vh, 30%, 50px

`mapTypeId(string)` (default: roadmap) accepts a string: roadmap,satellite,hybrid, terrain

`searchBoxPlaceholderText(string)` (default: Search Address) accepts a string to customize de search box placeholder text

`locationButtonText(string)` (default: My location) accepts a string to customize de location button text

`fixMarkerOnCenter(bool)` (default: false) when the user drags the map the marker pans to the center and updates the field value

`default(array)` (default: \['lat' =&gt; 0,'lng' =&gt; 0\]) sets the default value

`defaultToMyLocation(bool)` (default: false) sets the default value to the current location

### On your filament form schema

[](#on-your-filament-form-schema-1)

```
        GoogleMapsMarker::make('location')
            ->default(['lat' => 40.7587,'lng' => -73.9786])
            ->zoom(15)
            ->zoomControl()
            ->minHeight('60vh')
            ->mapTypeId('satellite')
            ->mapTypeControl()
            ->scaleControl()
            ->streetViewControl()
            ->fullScreenControl()
            ->rotateControl()
            ->searchBoxControl()
            ->searchBoxPlaceholderText('Type an address')
            ->geolocationControl()
            ->locationButtonText('Go to my location')
            ->defaultToMyLocation()
            ->coordsBoxControl()
            ->fixMarkerOnCenter()
```

This will display a map with all the available options

[![Example 2](https://github.com/AAbosham/filament-google-maps-marker/raw/master/resources/readme/example2.jpg?raw=true)](https://github.com/AAbosham/filament-google-maps-marker/blob/master/resources/readme/example2.jpg?raw=true)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Credits
-------

[](#credits)

- [Fork of Luis Escobar Bravo](https://github.com/EmilioBravo)
- [AAbosham](https://github.com/AAbosham)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~92 days

Total

5

Last Release

1006d ago

Major Versions

v0.0.2 → 3.x-dev2023-08-09

PHP version history (3 changes)v0.0.1-alphaPHP ^8.1|^8.0

v0.0.2PHP ^8.0|^8.1

3.x-devPHP ^8.0|^8.1|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/67c34ab5836206d1896bdac1432480b1e9ba7225e9e2adfb44b821b472c59e1c?d=identicon)[AAbosham](/maintainers/AAbosham)

---

Top Contributors

[![AAbosham](https://avatars.githubusercontent.com/u/12083600?v=4)](https://github.com/AAbosham "AAbosham (12 commits)")

---

Tags

laravellocationfieldFormspickergoogle mapscoordinatesfilamentaabosham

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/aabosham-filament-google-maps-marker/health.svg)

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

###  Alternatives

[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[defstudio/filament-searchable-input

A searchable autocomplete input for Filament forms

3212.4k](/packages/defstudio-filament-searchable-input)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12247.8k](/packages/jibaymcs-filament-tour)[aymanalhattami/filament-context-menu

context menu (right click menu) for filament

9838.0k](/packages/aymanalhattami-filament-context-menu)[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

3098.1k](/packages/tapp-filament-google-autocomplete-field)

PHPackages © 2026

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