php: >=8.0
laravel/nova: ^4.1
- Shows a dead simple geo marker based on latitude & longitude
Install the package in a Laravel Nova project via Composer:
composer require elbgoods/nova-mapbox-marker-field
Expects a mapbox access-token specified in config/services.php
:
<?php
return [
'mapbox' => [
'key' => env('MAPBOX_KEY', 'your-default-key'),
],
use Elbgoods\NovaMapboxMarkerField\MapboxMarkerField;
public function fields(Request $request)
{
return [
MapboxMarkerField::make('Marker')
->longitude($this->longitude)
->latitude($this->latitude)
->zoom(8),
];
}
This project is open-sourced software licensed under the MIT license.