PHPackages                             jezzdk/statamic-mapbox - 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. jezzdk/statamic-mapbox

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

jezzdk/statamic-mapbox
======================

v3.0.1(3mo ago)05401PHP

Since Oct 8Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/jezzdk/statamic-mapbox)[ Packagist](https://packagist.org/packages/jezzdk/statamic-mapbox)[ RSS](/packages/jezzdk-statamic-mapbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

Statamic Mapbox
===============

[](#statamic-mapbox)

[![Statamic 6.0+](https://camo.githubusercontent.com/e2d97a60f0486aada69d7bf68516cff0f0ed6d2ad2f935e8dc54767eefb3295d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d362e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/e2d97a60f0486aada69d7bf68516cff0f0ed6d2ad2f935e8dc54767eefb3295d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d362e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![Latest Version on Packagist](https://camo.githubusercontent.com/266175d3893431aaa8daa284d61e28949a8aa2d6995e3668fe0911a4ca92e660/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a657a7a646b2f73746174616d69632d6d6170626f782e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/jezzdk/statamic-mapbox)

A Mapbox addon for Statamic 6 for creating and displaying a Mapbox map on your website.

Installation
------------

[](#installation)

Require it using Composer.

```
composer require jezzdk/statamic-mapbox

```

Publish the config file

```
php artisan vendor:publish --provider="Jezzdk\StatamicMapbox\ServiceProvider"

```

Add an environment variable, since this library uses [Mapbox](https://www.mapbox.com/) under the hood for displaying maps.

```
MAPBOX_API_KEY=""

```

Lastly, insert this tag in the header in order to load the Mapbox JavaScript on the frontend:

```
{{ mapbox_script }}

```

**\*Disclaimer\*** You will need a Mapbox account if you want to create an API key.

Usage
-----

[](#usage)

This addon provides a Mapbox field (Pro feature). You can use that in your blueprints which will enable your users to dynamically insert maps onto your website.

There is also a tag that you can use directly in your Antlers template. I'll explain both use cases below.

### Mapbox Tag

[](#mapbox-tag)

The simplest way to insert a map is by inserting the tag with longitude and latitude:

```

    {{ mapbox lng="12.1234" lat="52.1234" zoom="8" marker="true" showControls="true" }}

```

This will insert a map centered on the given coordinates and display a marker. The Mapbox tag supports the following attributes:

AttributeTypeDefaultDescriptionlngfloat*none*The longitude (required)latfloat*none*The latitude (required)zoominteger16The map zoom levelmarkerboolfalseDisplay a marker in the latitude and longitude from abovemarkerLngfloat*none*The longitude for the marker (the `marker` attribute must be true)markerLatfloat*none*The latitude for the marker (the `marker` attribute must be true)markerColorstring\#3FB1CESet the color of the marker. Accepts a hex, rgb or rgba valuetypestringstreetsValid values are: `streets`, `satellite`, `hybrid`, `outdoor`iconstring/assets/marker.png(Pro feature) Use a path relative to the public folder. If the file doesn't exist, the default Mapbox pin will be used.stylestring*none*(Pro feature) The map styles as a style URLshowControlsbooleanfalseShow the default map controls### Mapbox Field (Pro feature)

[](#mapbox-field-pro-feature)

Simply select the fieldtype when creating a blueprint. When a user pans around the map, changes zoom level or changes the map type, the settings are saved and the output will display the same view as selected in the control panel.

The field has a few settings:

- Initial map type - choose which map type should be selected when the map is loaded initially in the control panel
- Initial zoom level - choose the zoom level when the map is loaded initially in the control panel
- Enable maptype selector - Allow the user to select the map type
- Enable marker creation - The user can create and remove a marker on the map
- Enable Geocoder - This adds a search field on the map, enabling the user to search for ie. an address

When using markers, the script will look for an icon at `/public/assets/marker.png`. If it exist it will be used, otherwise it will use the default Mapbox pin.

Styles (Pro feature)
--------------------

[](#styles-pro-feature)

The map can be styled using a specific Mapbox style URL. You can generate the style and get the URL for free at .

The field has an input field where the style URL can be inserted, when the map type is set to `custom`. The mapbox tag has a `style` attribute for the same purpose.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance82

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~175 days

Recently: every ~190 days

Total

8

Last Release

91d ago

Major Versions

v1.0 → v2.02023-05-23

v2.2.1 → v3.0.02026-02-16

### Community

Maintainers

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

---

Top Contributors

[![jezzdk](https://avatars.githubusercontent.com/u/139632?v=4)](https://github.com/jezzdk "jezzdk (12 commits)")

### Embed Badge

![Health badge](/badges/jezzdk-statamic-mapbox/health.svg)

```
[![Health](https://phpackages.com/badges/jezzdk-statamic-mapbox/health.svg)](https://phpackages.com/packages/jezzdk-statamic-mapbox)
```

###  Alternatives

[statamic/ssg

Generate static sites with Statamic.

254302.4k](/packages/statamic-ssg)[statamic/seo-pro

65440.7k](/packages/statamic-seo-pro)[jacksleight/statamic-bard-texstyle

17172.5k](/packages/jacksleight-statamic-bard-texstyle)[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

2381.5k10](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)

PHPackages © 2026

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