PHPackages                             opscale-co/nova-geospatial-fields - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. opscale-co/nova-geospatial-fields

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

opscale-co/nova-geospatial-fields
=================================

Laravel Nova fields for geospatial data — render Location pins, Addresses with geocoding, Geofence polygons, Area circles, and Routes on interactive Leaflet maps.

1.0.1(3w ago)0161MITShellPHP ^8.3CI passing

Since May 4Pushed 3w agoCompare

[ Source](https://github.com/opscale-co/nova-geospatial-fields)[ Packagist](https://packagist.org/packages/opscale-co/nova-geospatial-fields)[ RSS](/packages/opscale-co-nova-geospatial-fields/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (12)Versions (3)Used By (1)

Support us
----------

[](#support-us)

At Opscale, we're passionate about contributing to the open-source community by providing solutions that help businesses scale efficiently. If you've found our tools helpful, here are a few ways you can show your support:

⭐ **Star this repository** to help others discover our work and be part of our growing community. Every star makes a difference!

💬 **Share your experience** by leaving a review on [Trustpilot](https://www.trustpilot.com/review/opscale.co) or sharing your thoughts on social media. Your feedback helps us improve and grow!

📧 **Send us feedback** on what we can improve at . We value your input to make our tools even better for everyone.

🙏 **Get involved** by actively contributing to our open-source repositories. Your participation benefits the entire community and helps push the boundaries of what's possible.

💼 **Hire us** if you need custom dashboards, admin panels, internal tools or MVPs tailored to your business. With our expertise, we can help you systematize operations or enhance your existing product. Contact us at  to discuss your project needs.

Thanks for helping Opscale continue to scale! 🚀

Description
-----------

[](#description)

Storing latitude/longitude pairs, street addresses, or delivery routes in a database is easy. Seeing them on a map inside Nova is not — until now. This package ships five purpose-built Nova fields backed by an interactive Leaflet map, so your admin panel shows the shape of your geodata, not just the numbers. Compatible with Nova 5.

FieldPurposeStorage`Location`Single pin — a lat/lng point picked from the map.GeoJSON `Point``Address`Text box that geocodes (via Nominatim or Photon) to a pin.GeoJSON `Point` + formatted address`Geofence`Closed polygon — draw the perimeter of a zone.GeoJSON `Polygon``Area`Circle defined by a center point + radius (meters).GeoJSON `Point` + radius`Route`Multi-waypoint polyline for paths or delivery routes.GeoJSON `LineString`Installation
------------

[](#installation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/37e9e842e531c64f47c034469b593c6a8441499a83d7c89ea86909a8a3e46de9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f707363616c652d636f2f6e6f76612d67656f7370617469616c2d6669656c64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/opscale-co/nova-geospatial-fields)

```
composer require opscale-co/nova-geospatial-fields
```

The package auto-registers its service provider.

Back each field with a `json` column (or `text`) — the payload is stored as GeoJSON so you can query it with your database's native geo support if present, or as plain JSON otherwise.

```
Schema::create('places', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->json('location')->nullable();   // Location field
    $table->json('address')->nullable();    // Address field
    $table->json('geofence')->nullable();   // Geofence field
    $table->json('area')->nullable();       // Area field
    $table->json('route')->nullable();      // Route field
    $table->timestamps();
});
```

Usage
-----

[](#usage)

```
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Resource;
use Opscale\Fields\Geospatial\Address;
use Opscale\Fields\Geospatial\Area;
use Opscale\Fields\Geospatial\Geofence;
use Opscale\Fields\Geospatial\Location;
use Opscale\Fields\Geospatial\Route;

class Place extends Resource
{
    public static $model = \App\Models\Place::class;

    public function fields(NovaRequest $request): array
    {
        return [
            ID::make()->sortable(),
            Text::make('Name')->rules('required', 'max:255'),

            Location::make('Location')
                ->defaultCenter(40.4168, -3.7038) // Madrid
                ->defaultZoom(13),

            Address::make('Address')
                ->geocoder('nominatim'), // or 'photon'

            Geofence::make('Geofence'),

            Area::make('Area')
                ->defaultRadius(500), // meters

            Route::make('Route'),
        ];
    }
}
```

### Field behavior

[](#field-behavior)

ViewBehaviorCreate / UpdateInteractive Leaflet map with drawing tools (marker / polygon / circle / polyline). Address shows a search input that geocodes on submit.DetailRead-only map showing the stored shape, centered and fit to the data.IndexCompact text summary (e.g. `40.42, -3.70` for a point, `6 vertices` for a polygon).API`fillAttributeFromRequest` accepts raw GeoJSON strings as well as the internal JSON payload.### Configuration

[](#configuration)

```
// config/nova-geospatial-fields.php (publishable)
return [
    'tile_layer' => [
        'url' => 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
        'attribution' => '© OpenStreetMap contributors',
    ],
    'geocoder' => [
        'driver' => env('NOVA_GEOSPATIAL_GEOCODER', 'nominatim'),
        'nominatim' => [
            'url' => 'https://nominatim.openstreetmap.org',
            'user_agent' => env('APP_NAME', 'Laravel').' / nova-geospatial-fields',
        ],
        'photon' => [
            'url' => 'https://photon.komoot.io',
        ],
    ],
    'routing' => [
        'osrm_url' => 'https://router.project-osrm.org/route/v1',
    ],
];
```

### Under the hood

[](#under-the-hood)

LayerDependencyMap[Leaflet](https://leafletjs.com/)Drawing[Leaflet.draw](https://github.com/Leaflet/Leaflet.draw)Routing[Leaflet Routing Machine](https://www.liedman.net/leaflet-routing-machine/) + OSRMGeocoding[Nominatim](https://nominatim.org/) or [Photon](https://photon.komoot.io/)Circle → GeoJSON[@turf/circle](https://turfjs.org/docs/#circle)Testing
-------

[](#testing)

```
npm run test           # Unit + feature
npm run test:web       # Dusk browser tests — verifies the map renders
```

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

2

Last Release

22d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3722594?v=4)[opscale](/maintainers/opscale)[@opscale](https://github.com/opscale)

---

Top Contributors

[![opscale-development](https://avatars.githubusercontent.com/u/181295122?v=4)](https://github.com/opscale-development "opscale-development (10 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (2 commits)")

---

Tags

laravelgeocodingaddressmaplocationfieldrouteleafletgeospatialnovageofence

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/opscale-co-nova-geospatial-fields/health.svg)

```
[![Health](https://phpackages.com/badges/opscale-co-nova-geospatial-fields/health.svg)](https://phpackages.com/packages/opscale-co-nova-geospatial-fields)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[mostafaznv/nova-map-field

Map Field for Laravel Nova

46101.8k](/packages/mostafaznv-nova-map-field)[optimistdigital/nova-notes-field

This Laravel Nova package adds a notes field to Nova's arsenal of fields.

52142.9k](/packages/optimistdigital-nova-notes-field)[naif/map_address

A Laravel Nova field to place a marker on map to get coordinates then it reverse geocoding the coordinates to get a street address

134.2k](/packages/naif-map-address)[outl1ne/nova-color-field

A Laravel Nova Color Picker field.

26259.6k](/packages/outl1ne-nova-color-field)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12233.3k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
