PHP Classes

Laravel Nova Map Field: Display a map field in a Laravel Nova panel

Recommend this page to a friend!
  Info   View files Documentation   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 34 This week: 1All time: 10,948 This week: 560Up
Version License PHP version Categories
nova-map-address 1.0Custom (specified...5PHP 5, Content management, Web services, G...
Description 

Author

This package can display a map field in a Laravel Nova panel.

It can generate HTML and JavaScript that can display a map field using Google Maps to embed the map on a Web page.

The package can display a place a marker on the map to get coordinates then it reverse geocoding the coordinates to get a street address.

Picture of Naif Alshaye
  Performance   Level  
Name: Naif Alshaye <contact>
Classes: 24 packages by
Country: Saudi Arabia Saudi Arabia
Age: ???
All time rank: 18706 in Saudi Arabia Saudi Arabia
Week rank: 22 Up2 in Saudi Arabia Saudi Arabia Up
Innovation award
Innovation award
Nominee: 9x

Documentation

Nova Map Address Field

A Nova field to place a marker on map to get coordinates then it reverse geocoding the coordinates to get a street address

Installation

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

composer require naif/map_address

Configuration

Publish the package config file:

php artisan vendor:publish --provider="Naif\MapAddress\FieldServiceProvider"

This is the contents of the file which will be published at config/map-address.php.

Add the following keys to your .env and .env.example:

MAP_ADDRESS_API_KEY=

Optional: Set map and address language
MAP_ADDRESS_LANGUAGE=ar

_If you need a Google Maps API key, you can create an app and enable Places API and create credentials to get your API key https://console.developers.google.com._

Usage:

Add the below to Nova/User.php resource:


MapAddress::make('address'),

//You can set the initial map location. By default (United States)
 MapAddress::make('address')
    ->initLocation(40.730610,-98.935242),

//You can also set the map zoom level. By default (4)
 MapAddress::make('address')
    ->initLocation(40.730610,-98.935242)
    ->zoom(12),

Package screenshot

Package screenshot

Support:

naif@naif.io

https://www.linkedin.com/in/naif

License

The MIT License (MIT). Please see License File for more information.


  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagedist (1 directory)
Files folder imageresources (2 directories)
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file mix-manifest.json Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file map-address.php Aux. Auxiliary script

  Files folder image Files  /  dist  
File Role Description
Files folder imagejs (1 file)

  Files folder image Files  /  dist  /  js  
File Role Description
  Accessible without login Plain text file field.js Data Auxiliary data

  Files folder image Files  /  resources  
File Role Description
Files folder imagejs (1 file, 1 directory)
Files folder imagesass (1 file)

  Files folder image Files  /  resources  /  js  
File Role Description
Files folder imagecomponents (3 files)
  Accessible without login Plain text file field.js Data Auxiliary data

  Files folder image Files  /  resources  /  js  /  components  
File Role Description
  Accessible without login Plain text file DetailField.vue Data Auxiliary data
  Accessible without login Plain text file FormField.vue Data Auxiliary data
  Accessible without login Plain text file IndexField.vue Data Auxiliary data

  Files folder image Files  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file field.scss Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
  Plain text file FieldServiceProvider.php Class Class source
  Plain text file MapAddress.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:34
This week:1
All time:10,948
This week:560Up