witness-data/filament-witness-maps

A toolkit for working with maps.witnessdata.org inside Filament

Maintainers

Package info

github.com/witness-data/filament-witness-maps

pkg:composer/witness-data/filament-witness-maps

Transparency log

Statistics

Installs: 47

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-08-26 18:22 UTC

This package is auto-updated.

Last update: 2026-08-26 18:22:21 UTC


README

Filament WITNESS Maps provides a toolkit for working with spatial data and maps.witnessdata.org.

Screenshot

Important note:

This package is primarily for WITNESS Data software. You are welcome to use this software, but please note that we do not monitor the issue queue or support pull requests.

Installation

First require the library.

composer require witness-data/filament-witness-maps

Then update your dependencies.

composer update

Usage

Infolist schema:

You may use the WitnessMapEntry in your schema the same as any other Filament field.

use WitnessData\FilamentWitnessMaps\WitnessMapEntry;

$schema->components([
    WitnessMapEntry::make('birth_country')
        ->lat(31.432160)
        ->long(34.413750),
])

You may add additional modifiers to your map.

use WitnessData\FilamentWitnessMaps\WitnessMapEntry;

$schema->components([
    WitnessMapEntry::make('birth_country')
        ->lat(31.432160)
        ->long(34.413750)
        // Everything below is optional.
        ->title('Brij Mosaic') // Displays on the popover in the map.
        ->showCoordinates(false) // Displays only the title and hides the coordinates & copy button.
        ->radius(500), // Size of the circle around your point.
])

The WitnessMapEntry can be modified using any of the functions used to customize a standard Filament TextEntry. You can inject classes as normal.

use WitnessData\FilamentWitnessMaps\WitnessMapEntry;
use Illuminate\Database\Eloquent\Model;

WitnessMapEntry::make('geolocation')
    ->label(fn(?Model $record): string => $record->exact_location ? 'Geolocated' : 'Estimated')
    ->hidden(fn(): bool => auth()->user()->doesNotSeeMaps()),