PHP Classes

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

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 34 All time: 11,024 This week: 455Up
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: 18576 in Saudi Arabia Saudi Arabia
Week rank: 49 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 (15)  
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 (15)  /  config  
File Role Description
  Accessible without login Plain text file map-address.php Aux. Auxiliary script

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

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

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

  Files folder image Files (15)  /  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 (15)  /  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 (15)  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file field.scss Data Auxiliary data

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:34
This week:0
All time:11,024
This week:455Up