承接 adamcmoore/nova-gmap 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adamcmoore/nova-gmap

最新稳定版本:v3.0

Composer 安装命令:

composer require adamcmoore/nova-gmap

包简介

A Laravel Nova field using Google Maps to provide latitude/longitude data.

README 文档

README

A Nova field control for using Google Maps to update a latitude/longitude positon.

Installation

Install the package via composer with:

composer require adamcmoore/nova-gmap 

Next publish the config file with:

php artisan vendor:publish --provider="Acm\NovaGmap\FieldServiceProvider.php" --tag="config" 

This will create a config file at config/nova-gmaps.php where you will need to enter your Google Maps API key, default position and zoom level.

Versions

  • v1.0 Laravel 6 & 7
  • v2.0 Laravel 8

Usage

To add this field to a Nova resource:

NovaGmap::make('Location')

The field expects data to be provided as an object with keys for latitude and longitude, and will return data from the request in the same format. Use Accessors and Mutators to handle this.

An example model:

class Shop extends Model { $fillable = [ 'title', 'description', 'address', 'location_lat', 'location_lng', ]; /*  Provide the Location value to the Nova field  */ public function getLocationAttribute() { return (object) [ 'latitude' => $this->location_lat, 'longitude' => $this->location_lng, ]; } /*  Transform the returned value from the Nova field  */ public function setLocationAttribute($value) { $location_lat = round(object_get($value, 'latitude'), 7); $location_lng = round(object_get($value, 'longitude'), 7); $this->attributes['location_lat'] = $location_lat; $this->attributes['location_lng'] = $location_lng; } }

统计信息

  • 总下载量: 169.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 9
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固