PHPackages                             davidpiesse/nova-map - 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. davidpiesse/nova-map

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

davidpiesse/nova-map
====================

Map field for Laravel Nova

0.0.9(3y ago)114224.3k↓15.2%27[4 issues](https://github.com/davidpiesse/nova-map/issues)[1 PRs](https://github.com/davidpiesse/nova-map/pulls)MITVuePHP &gt;=7.1.0

Since Aug 27Pushed 3y ago8 watchersCompare

[ Source](https://github.com/davidpiesse/nova-map)[ Packagist](https://packagist.org/packages/davidpiesse/nova-map)[ RSS](/packages/davidpiesse-nova-map/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)DependenciesVersions (11)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/40345a65ade70205341eac43dde99ae44983e39463d14fd5c70e04c4a3967ae0/68747470733a2f2f706f7365722e707567782e6f72672f64617669647069657373652f6e6f76612d6d61702f646f776e6c6f616473)](https://packagist.org/packages/davidpiesse/nova-map)[![Latest Stable Version](https://camo.githubusercontent.com/64ae075a49546a55c7d44c533201dee1974c14dc98f1fc44a9f79bca067b5760/68747470733a2f2f706f7365722e707567782e6f72672f64617669647069657373652f6e6f76612d6d61702f762f737461626c65)](https://packagist.org/packages/davidpiesse/nova-map)

Map Field
=========

[](#map-field)

This map field currently ONLY shows in details view

[![Gif!](https://camo.githubusercontent.com/3d0d661652d84db455b2f9bf028132536ff8b145f60774c5f1b76563ef3d985e/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64617669647069657373652f696d6167652f75706c6f61642f76313533353339373832312f657a6769662e636f6d2d726573697a655f6662786464632e676966)](https://camo.githubusercontent.com/3d0d661652d84db455b2f9bf028132536ff8b145f60774c5f1b76563ef3d985e/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64617669647069657373652f696d6167652f75706c6f61642f76313533353339373832312f657a6769662e636f6d2d726573697a655f6662786464632e676966)

You can use this Map Field with three different sort of spatial data:

- GeoJSON String property
- Latitude and Longitude properties
- Latitude and Longitude both in a single text field
- Core Laravel Spatial Types

    - Point
    - LineString
    - Polygon
    - Geometry
    - GeometryCollection
    - MultiPoint
    - MultiLineString
    - MultiPolygon To use these core types you need to install grimzy/laravel-mysql-spatial See the section below on setting this up. This can work with other databases, but YMMV.
- You can set the height of the map in px
- The field is disabled in Index and Form views by default
- This is very much a WIP - please submit issues to GitHub

Spatial Types
=============

[](#spatial-types)

To specify what sort of spatial data you are passing to this field you MUST set the spatialType() for example

```
    ->spatialType('Point')
```

These are the valid Spatial Types

- LatLon
- LatLonField (single field)
- GeoJSON
- Point
- LineString
- Polygon
- Geometry
- GeometryCollection
- MultiPoint
- MultiLineString
- MultiPolygon

Examples
========

[](#examples)

Point
-----

[](#point)

```
Map::make('Some Point Field', 'point_field_name')
    ->spatialType('Point'),
```

Polygon
-------

[](#polygon)

```
Map::make('Some Polygon Field', 'polygon_field_name')
    ->spatialType('Polygon'),
```

GeoJSON
-------

[](#geojson)

```
Map::make('Some GeoJSON Field')
    ->spatialType('GeoJSON')
    ->geojson('geojson_field_name'),
```

Latitude &amp; Longitude (in seperate fields)
---------------------------------------------

[](#latitude--longitude-in-seperate-fields)

```
Map::make('Some Point Location')
    ->spatialType('LatLon')
    ->latitude('latitude_field_name')
    ->longitude('longitude_field_name'),
```

Latitude &amp; Longitude (in single fields)
-------------------------------------------

[](#latitude--longitude-in-single-fields)

```
Map::make('Some Point Location', 'coordinate_field_name')
    ->spatialType('LatLonField'),
```

Set the Height
--------------

[](#set-the-height)

```
Map::make('Some Point Field', 'point_field_name')
    ->spatialType('Point')
    ->height('300px'),
```

Setting up the Laravel Spatial Types
====================================

[](#setting-up-the-laravel-spatial-types)

You need to install [grimzy/laravel-mysql-spatial](https://github.com/grimzy/laravel-mysql-spatial) into your main application

```
composer require grimzy/laravel-mysql-spatial

```

Add the SpatialTrait to your Model

```
use SpatialTrait;
```

You then also need to set any spatial fields you have set in the Model

```
protected $spatialFields = [
    'geo_point',
    'geo_linestring',
    ...
];
```

Your Model is now ready to process spatial data to Nova

Future Development
==================

[](#future-development)

- Editing capabilities for all Spatial Types
- View Place Field address on a Map
- Remove reliance on grimzy package from accessing core Spatial Types
- Allow all DB spatial fields to be used
- Customize the map futher
    - Tailwind Height classes
    - Customise Geometry Styling
        - Marker Icon
        - Colors, Thicknesses, Opacity
    - Basemap
        - Streets
        - Topo
        - Satellite
    - Navigation Tools (Compass, Zoom In/Out)
- Alternative Map Providers
    - Google Maps
    - Mapbox
    - OpenLayers

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.7% 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 ~152 days

Total

10

Last Release

1444d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9beea64e2348d11d5f96d4138ccfcf393bab92e803faa27437d794c279575d20?d=identicon)[davidpiesse](/maintainers/davidpiesse)

---

Top Contributors

[![davidpiesse](https://avatars.githubusercontent.com/u/800650?v=4)](https://github.com/davidpiesse "davidpiesse (21 commits)")[![neyaoz](https://avatars.githubusercontent.com/u/4792515?v=4)](https://github.com/neyaoz "neyaoz (3 commits)")[![bomshteyn](https://avatars.githubusercontent.com/u/4259699?v=4)](https://github.com/bomshteyn "bomshteyn (3 commits)")[![sutcliffe121](https://avatars.githubusercontent.com/u/33236577?v=4)](https://github.com/sutcliffe121 "sutcliffe121 (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![bilfeldt](https://avatars.githubusercontent.com/u/30228807?v=4)](https://github.com/bilfeldt "bilfeldt (1 commits)")[![pelmered](https://avatars.githubusercontent.com/u/680058?v=4)](https://github.com/pelmered "pelmered (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/davidpiesse-nova-map/health.svg)

```
[![Health](https://phpackages.com/badges/davidpiesse-nova-map/health.svg)](https://phpackages.com/packages/davidpiesse-nova-map)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

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

PHPackages © 2026

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