ghanem/google-map 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ghanem/google-map

最新稳定版本:v2.1

Composer 安装命令:

composer require ghanem/google-map

包简介

Nova Google Map With Autocomplete Field Package.

README 文档

README

Latest Stable Version License Total Downloads

Nova Google Map With Autocomplete Field Package

This field allows you to work with Google Places API to autocomplete and Google Map on user input (latitude and longitude).

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require ghanem/google-map

Now publish config and localization files:

php artisan vendor:publish --provider="Ghanem\GoogleMap\FieldServiceProvider"

Create an app and enable Places API and create credentials to get your API key https://console.developers.google.com

Add the below to your .env file

GMAPS_API_KEY=############################

Usage

Add the use declaration to your resource and use the fields:

use Ghanem\GoogleMap\GHMap;

GHMap::make('Map'), // Google Map with address picker

Image of character counter

Customize Fields

Add custom latitude, longitude and zoom values for starting point

GHMap::make('Map')
    ->latitude('latitude_field_name')
    ->longitude('longitude_field_name')
    ->zoom('zoom'),

Hide latitude and longitude field

GHMap::make('Map')
    ->hideLatitude()
    ->hideLongitude(),

You can add any nova basic methods to fileds (Showing / Hiding, Validation ... ).

Sponsor

💚️ Become a Sponsor

统计信息

  • 总下载量: 39.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-06