PHPackages                             xddesigners/silverstripe-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. xddesigners/silverstripe-mapbox

ActiveSilverstripe-vendormodule

xddesigners/silverstripe-mapbox
===============================

Add a mapbox to silverstripe pages

2.0.4(7y ago)0761BSD-3-ClausePHP

Since Jan 13Pushed 7y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (8)Used By (0)

Silverstripe Mapbox
===================

[](#silverstripe-mapbox)

Add a Mapbox map to your Silverstripe pages.

### Instalation

[](#instalation)

Simply install the moduel by requireing it in you composer.json or by running:

```
composer require "xddesigners/silverstripe-mapbox"

```

Then add the controller extension to the page you want the map to show and configure the basic properties:

```
HomePagecontroller:
  extensions:
    - XD\MapBox\MapBox

XD\MapBox\MapBox:
  access_token: 'YOUR_MAPBOX_ACCESS_TOKEN'
  style: 'YOUR_MAPBOX_STYLE'

```

### Configuration

[](#configuration)

The map can be configured and optionally be configured to hold an icon, the sintax follows the leaflet configuration, any option that you can pass there is passable here. All set options will be combined to a json object.

```
XD\MapBox\MapBox:
  map_options:
    dragging: false
    zoomControl: false
    scrollWheelZoom: false
  icon_options:
    iconUrl: 'path/to/the.icon'
    iconSize:
      - 50
      - 50
    iconAnchor:
      - 25
      - 50

```

To center the map to a location you need to add the method `mapBoxMarkers()` to the model that holds the MapBox extension. This method needs to return an array with at least one location to center the map on. If using multiple markers you can set the config setting `fit_bounds_to_markers` to true so all markers will be displayed on the map.

A interface is available for models that use the extension, just add `implements UseMapBox` to your class to force the method.

License
-------

[](#license)

Copyright (c) 2016, XD designers All rights reserved.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- The name of Bram de Leeuw may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~109 days

Recently: every ~0 days

Total

7

Last Release

2747d ago

Major Versions

1.0.0 → 2.0.02018-10-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/6131c03b7f5ba6b10fef192c90d68d57508e84c007a13321df6960b8298e19d1?d=identicon)[TheBnl](/maintainers/TheBnl)

![](https://www.gravatar.com/avatar/011200839f5f7a480b6d262c45cbba2d02df1e2063c9dc9e05de540492476b60?d=identicon)[XD designers](/maintainers/XD%20designers)

---

Top Contributors

[![TheBnl](https://avatars.githubusercontent.com/u/1334195?v=4)](https://github.com/TheBnl "TheBnl (5 commits)")

---

Tags

silverstripeleafletmapbox

### Embed Badge

![Health badge](/badges/xddesigners-silverstripe-mapbox/health.svg)

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

###  Alternatives

[composer/installers

A multi-framework Composer library installer

1.4k136.0M6.0k](/packages/composer-installers)[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

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