binbin8730/amap-latlong
最新稳定版本:0.0.1
Composer 安装命令:
composer require binbin8730/amap-latlong
包简介
laravel-admin 高德经纬度选择器/Latitude and longitude selector
README 文档
README
这个扩展是通过 laravel-admin-ext/latlong:1.x 进行二次开发!
只针对高德地图使用,只针对高德地图使用,只针对高德地图使用 修复了一些BUG
1、增加admin.php api_secret 参数 2、修改加载地图逻辑,升级到最新版本 1.4.15 3、修复默认没有添加坐标值,显示地图空白问题
Install
composer require binbin8730/amap-latlong:*
Configuration
打开 config/admin.php 增加 extensions 配置 :
'extensions' => [ 'amap-latlong' => [ // Whether to enable this extension, defaults to true 'enable' => true, // Specify the default provider 'default' => 'amap', // According to the selected provider above, fill in the corresponding api_key 'providers' => [ 'amap' => [ 'api_key' => '', 'api_secret' => '' ], ], ] ]
Usage
字段 latitude and longitude 分别表示纬度和经度,然后使用以下格式:
$form->amap_latlong('latitude', 'longitude', 'Position'); // Set the map height $form->amap_latlong('latitude', 'longitude', 'Position')->height(500); // Set the map zoom $form->amap_latlong('latitude', 'longitude', 'Position')->zoom(16); // Set default position $form->amap_latlong('latitude', 'longitude', 'Position')->default(['lat' => 90, 'lng' => 90]);
Use in show page
$show->field('Position')->amap_latlong('lat_column', 'long_column', $height = 400, $zoom = 16);
Donate
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-01