traineratwot/filament-openstreetmap
Add a free OpenStreetMap field to Filament forms with Leaflet-powered maps. Pick points visually and save as WKT or arrays, with easy Composer install and publishable assets.
MapInput), one Eloquent cast (PointCast), one publishable asset bundle.Point value object plus PointFormat enum (11 formats: lat/lng, lat-lng, WKT, GeoJSON, DMS, Google/OSM/Yandex URLs, {latitude,longitude}, [lng,lat]) and an optional matanayadev/laravel-eloquent-spatial bridge mean choosing a simple string column today does not block PostGIS or spatial queries later. You can migrate at the input layer without re-architecting.markersOnly() (map clicks disabled, search filters a marker list) is a genuinely different product behaviour: "pick one of our branches" rather than "place an arbitrary point." That is a UX and data-quality decision, not a code detail — it is the difference between clean normalized data and operators dropping pins 400m off.en and ru only. If the launch market is neither, translation work belongs in the ticket, not in a surprise.Consider it when all of these hold:
laravel-test/ Laravel 12 + Filament 5 app. Plan to add your own tests around whatever you adopt.Point stores (lat, lng), but GeoJSON and WKT are (lng, lat), and fromValue() auto-detects format from string patterns. That is a live data-integrity trap — validate on write, assert in tests.Look elsewhere (or build) when:
Recommendation: timeboxed 1–2 day spike inside the real admin panel, exercised against real data and the two or three formats you intend to store. If it clears, vendor the source into the repo or a private fork so asset publishing, Leaflet upgrades, and the Nominatim dependency stay under your control.
To executives: There is a small, focused open-source component that lets our operators set map coordinates directly inside the admin panel, using OpenStreetMap. The business case is cost and friction: no map API key, no per-load billing, no vendor contract. We avoid a build project and an ongoing Maps bill at the same time, and it closes a prerequisite that blocks several geo features already on the roadmap. The trade-off is maturity — young package, one maintainer, no downstream users — so the ask is a short evaluation, then a decision to own a copy internally. Risk is contained: it is back-office tooling, not customer-facing, and the coordinate data it writes is portable to any future mapping system.
To engineering: It is a Filament form field (MapInput) plus an Eloquent cast (PointCast) and a Point value object with an 11-format enum. Leaflet is vendored and published via vendor:publish --tag=filament-openstreetmap-assets. The Blade component uses wire:ignore with Alpine x-data and $wire.entangle(); note the known Livewire proxy gotcha where entangle() returns a proxy object, not a raw value — the package already unwraps initialValue, so don't "simplify" that code. Watch the coordinate order: internal storage is (lat, lng), GeoJSON/WKT are (lng, lat), and parsing is pattern-based auto-detection — add explicit validation and unit tests around our chosen format. No PHPUnit or static analysis ships in the package; assume we add both. Our plan is a two-day spike, then vendor the source so Leaflet and Nominatim usage stay under our control.
How can I help you explore Laravel packages today?