An open API service indexing awesome lists of open source software.

https://github.com/doublesecretagency/craft-mapbox


https://github.com/doublesecretagency/craft-mapbox

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

Plugin icon

# Mapbox plugin for Craft CMS

**Maps in minutes. Powered by the Mapbox API.**

---

### Create flexible [Dynamic Maps](https://plugins.doublesecretagency.com/mapbox/dynamic-maps/)

Add markers, use popups, change marker icons, style maps, and much, much more...


Screenshot of a dynamic map

### [Universal API](https://plugins.doublesecretagency.com/mapbox/dynamic-maps/universal-api/) works across JavaScript, Twig, and PHP

The plugin features a powerful universal API which is nearly identical across multiple programming languages...

```js
// JavaScript
const map = mapbox.map()
.markers(locations, options)
.style(mapStyle)
.center(coords)
.zoom(level);
```

```twig
{# Twig #}
{% set map = mapbox.map()
.markers(locations, options)
.style(mapStyle)
.center(coords)
.zoom(level) %}
```

```php
// PHP
$map = Mapbox::map()
->markers($locations, $options)
->style($mapStyle)
->center($coords)
->zoom($level);
```

### Includes an easy-to-use [Address Field](https://plugins.doublesecretagency.com/mapbox/address-field/)

When managing your Craft data, each location can be set with a convenient Address field...


Annotated screenshot of an Address field

---

## How to Install the Plugin

To get started, see the [**complete installation instructions ➡️**](https://plugins.doublesecretagency.com/mapbox/getting-started/)

Once the plugin is installed, a [Mapbox Access Token](https://plugins.doublesecretagency.com/mapbox/getting-started/access-token/) will also be required.

---

## Further Reading

If you haven't already, flip through the [complete plugin documentation](https://plugins.doublesecretagency.com/mapbox/). The examples above are just the tip of the iceberg, there is so much more that is possible!

And if you have any remaining questions, feel free to [reach out to us](https://www.doublesecretagency.com/contact) (via Discord is preferred).

**On behalf of Double Secret Agency, thanks for checking out our plugin!** 🍺


Logo for Double Secret Agency