Laravel Nova icon Nova Packages

Installation Instructions

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 and get the full real address with all the metadata (like 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\TRMap;

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

Image of character counter

Customize Fields

Add custom latitude, longitude and zoom values for starting point

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

Hide latitude and longitude field

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

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

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

Screenshots

Back to Top
Added 2 years ago
Last updated 3 Months Ago
Version v2.1
Nova Version ^4.0|^5.0
Composer
ghanem/google-map
GitHub stars 8
Packagist downloads 27,503

Favorites

1 user favorited

Rating

0.00
(out of 5)
★★★★★
★★★★
★★★
★★
0 ratings

Contributors

Tags

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas