elbgoods/nova-mapbox-marker-field

Show geo marker on a mapbox map

v1.1 2022-08-08 20:37 UTC

This package is auto-updated.

Last update: 2024-11-09 01:34:19 UTC


README

Requirements

  • php: >=8.0
  • laravel/nova: ^4.1

Features

  • Shows a dead simple geo marker based on latitude & longitude

Installation

Install the package in a Laravel Nova project via Composer:

composer require elbgoods/nova-mapbox-marker-field

Usage

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),
    ];
}

Screenshot

Detail View

License

This project is open-sourced software licensed under the MIT license.