PHPackages                             osenco/laravel-admin-latlong - 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. osenco/laravel-admin-latlong

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

osenco/laravel-admin-latlong
============================

Latitude &amp; Longitude selector

0.0.4(1y ago)07MITPHPPHP ^8.2

Since Oct 13Pushed 1y agoCompare

[ Source](https://github.com/osenco/laravel-admin-latlong)[ Packagist](https://packagist.org/packages/osenco/laravel-admin-latlong)[ Docs](https://github.com/laravel-admin-ext/latlong)[ RSS](/packages/osenco-laravel-admin-latlong/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

经纬度选择器/Latitude and longitude selector
======================================

[](#经纬度选择器latitude-and-longitude-selector)

这个扩展用来帮助你在form表单中选择经纬度，用来替代`Laravel-admin`中内置的`Form\Field\Map`组件, 组件支持的地图包括`Google map`、`百度地图`、`高德地图`、`腾讯地图`、`Yandex map`.

This extension is used to help you select the latitude and longitude in the form, which is used to replace the `Laravel-admin` built in `Form\Field\Map` component. The supported maps include `Google map`, `Baidu map`, `AMap`, `Tencent Map`, `Yandex map`.

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

[](#installation)

```
// For laravel-admin 1.x
composer require laravel-admin-ext/latlong:1.x -vvv

// For laravel-admin 2.x
composer require laravel-admin-ext/latlong:2.x -vvv
```

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

[](#configuration)

Open `config/admin.php` and add the following configuration to the extensions section:

```
    'extensions' => [

        'latlong' => [

            // Whether to enable this extension, defaults to true
            'enable' => true,

            // Specify the default provider
            'default' => 'google',

            // According to the selected provider above, fill in the corresponding api_key
            'providers' => [

                'google' => [
                    'api_key' => '',
                ],

                'yandex' => [
                    'api_key' => '',
                ],

                'baidu' => [
                    'api_key' => 'xck5u2lga9n1bZkiaXIHtMufWXQnVhdx',
                ],

                'tencent' => [
                    'api_key' => 'VVYBZ-HRJCX-NOJ4Z-ZO3PU-ZZA2J-QPBBT',
                ],

                'amap' => [
                    'api_key' => '3693fe745aea0df8852739dac08a22fb',
                ],
            ]
        ]
    ]
```

Usage
-----

[](#usage)

Suppose you have two fields `latitude` and `longitude` in your table that represent latitude and longitude, then use the following in the form:

```
$form->latlong('latitude', 'longitude', 'Position');

// Set the map height
$form->latlong('latitude', 'longitude', 'Position')->height(500);

// Set the map zoom
$form->latlong('latitude', 'longitude', 'Position')->zoom(16);

// Set default position
$form->latlong('latitude', 'longitude', 'Position')->default(['lat' => 90, 'lng' => 90]);
```

Use in show page

```
$show->field('Position')->latlong('lat_column', 'long_column', $height = 400, $zoom = 16);
```

Donate
------

[](#donate)

如果觉得这个项目帮你节约了时间，不妨支持一下;)

[![-1](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)

License
-------

[](#license)

Licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

4

Last Release

577d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e4a04231f4571a99a35c6e8acb096b5cfd7a28eb73b71e026f2024f353fdaca?d=identicon)[maukoese](/maintainers/maukoese)

---

Top Contributors

[![z-song](https://avatars.githubusercontent.com/u/1479100?v=4)](https://github.com/z-song "z-song (16 commits)")[![sicaboy](https://avatars.githubusercontent.com/u/2426114?v=4)](https://github.com/sicaboy "sicaboy (4 commits)")[![maukoese](https://avatars.githubusercontent.com/u/14233942?v=4)](https://github.com/maukoese "maukoese (4 commits)")[![vonsogt](https://avatars.githubusercontent.com/u/35516476?v=4)](https://github.com/vonsogt "vonsogt (3 commits)")[![zishang520](https://avatars.githubusercontent.com/u/10894778?v=4)](https://github.com/zishang520 "zishang520 (2 commits)")[![4cc355-d3n13d](https://avatars.githubusercontent.com/u/630927?v=4)](https://github.com/4cc355-d3n13d "4cc355-d3n13d (1 commits)")[![jxlwqq](https://avatars.githubusercontent.com/u/2421068?v=4)](https://github.com/jxlwqq "jxlwqq (1 commits)")[![Hans941](https://avatars.githubusercontent.com/u/27858182?v=4)](https://github.com/Hans941 "Hans941 (1 commits)")[![tingfeng-key](https://avatars.githubusercontent.com/u/13976521?v=4)](https://github.com/tingfeng-key "tingfeng-key (1 commits)")[![dhb52](https://avatars.githubusercontent.com/u/12530913?v=4)](https://github.com/dhb52 "dhb52 (1 commits)")

---

Tags

extensionlaravel-admin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/osenco-laravel-admin-latlong/health.svg)

```
[![Health](https://phpackages.com/badges/osenco-laravel-admin-latlong/health.svg)](https://phpackages.com/packages/osenco-laravel-admin-latlong)
```

###  Alternatives

[laravel-admin-ext/china-distpicker

Distpicker extension for laravel-admin

13443.9k](/packages/laravel-admin-ext-china-distpicker)[codingyu/ueditor

UEditor extension for laravel-admin

6471.6k](/packages/codingyu-ueditor)[laravel-admin-ext/grid-sortable

Sort the grid data by drag and drop rows

42119.3k](/packages/laravel-admin-ext-grid-sortable)[jxlwqq/quill

quill editor for laravel-admin

2427.1k](/packages/jxlwqq-quill)[cyd622/laravel-admin-ext-echarts

Use Echarts in laravel-admin

349.5k](/packages/cyd622-laravel-admin-ext-echarts)[jxlwqq/simditor

Simditor for Laravel-admin

1629.0k1](/packages/jxlwqq-simditor)

PHPackages © 2026

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