PHPackages                             chuchu-z/laravel-admin-ext-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. chuchu-z/laravel-admin-ext-latlong

ActiveLibrary

chuchu-z/laravel-admin-ext-latlong
==================================

Latitude &amp; Longitude selector

v1.2.0(1mo ago)0116↓46.9%MITPHPPHP &gt;=7.0.0

Since Jul 5Pushed 1mo ago1 watchersCompare

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

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

原经纬度选择器作者很久没更新了, 我使用腾讯地图选点的时候觉得很难用, 因为搜索结果的点总是遮挡住我要选的点, 只能自己稍微做修改自用

##### 安装

[](#安装)

```
composer require chuchu-z/laravel-admin-ext-latlong -vvv

```

##### 配置腾讯地图服务

[](#配置腾讯地图服务)

修改后的版本使用到了腾讯地图的 [**WebService API**](https://lbs.qq.com/service/webService/webServiceGuide/search/webServiceSuggestion), 所以需要去注册[**腾讯位置服务**](https://lbs.qq.com/dev/console/quota/account)注册账户创建一个 **Key** 和 **Secret key**

[![image-20240705190210508](./1720402392007.jpg)](./1720402392007.jpg)

选择签名校验, 获取到**Secret key**

[![image-20240705190337521](./fa285171463db6b9e03bfd055affc7e5.png)](./fa285171463db6b9e03bfd055affc7e5.png)

然后需要在**配额管理** - **账户额度** 里, 修改 **关键词输入提示** 这项, 点击**配额分配**, 填写到最大值, 提交即可, 一天10000次调用, 正常情况都是够用的, 如果额度不够用就只能去升级企业开发者了

[![image-20240705190735384](./f24bc6d3d05d541933e6132d3b88bc91.png)](./f24bc6d3d05d541933e6132d3b88bc91.png)

最后把生成的 **Key** 和签名校验的 **Secret key** 加到.env配置文件即可正常使用

```
TENCENT_MAP_KEY=
TENCENT_MAP_SECRET=

```

以下是原作者的介绍中关于使用说明部分

经纬度选择器/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);
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

3

Last Release

49d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3fe1c828bb449587b1a3e3cd6cfead61d69b1a9a98a0873baa717409425d832?d=identicon)[chuchu-z](/maintainers/chuchu-z)

---

Top Contributors

[![chuchu-z](https://avatars.githubusercontent.com/u/33407400?v=4)](https://github.com/chuchu-z "chuchu-z (5 commits)")

---

Tags

extensionlaravel-admin

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel-admin-ext/china-distpicker

Distpicker extension for laravel-admin

13443.9k](/packages/laravel-admin-ext-china-distpicker)[laravel-admin-ext/grid-lightbox

Turn your grid into a lightbox &amp; gallery

58180.9k2](/packages/laravel-admin-ext-grid-lightbox)[james.xue/login-captcha

laravel-admin 登录验证码

3725.4k](/packages/jamesxue-login-captcha)[jxlwqq/quill

quill editor for laravel-admin

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

Integrates jQuery sparkline into laravel-admin

161.1k](/packages/laravel-admin-ext-sparkline)

PHPackages © 2026

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