doublesecretagency/craft-mapbox

Maps in minutes. Powered by the Mapbox API.

2.0.0 2024-02-24 20:28 UTC

This package is auto-updated.

Last update: 2024-10-15 23:23:50 UTC


README

Plugin icon

Mapbox plugin for Craft CMS

Maps in minutes. Powered by the Mapbox API.

Create flexible Dynamic Maps

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

Screenshot of a dynamic map

Universal API works across JavaScript, Twig, and PHP

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

// JavaScript
const map = mapbox.map()
    .markers(locations, options)
    .style(mapStyle)
    .center(coords)
    .zoom(level);
{# Twig #}
{% set map = mapbox.map()
    .markers(locations, options)
    .style(mapStyle)
    .center(coords)
    .zoom(level) %}
// PHP
$map = Mapbox::map()
    ->markers($locations, $options)
    ->style($mapStyle)
    ->center($coords)
    ->zoom($level);

Includes an easy-to-use 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 ➡️

Once the plugin is installed, a Mapbox Access Token will also be required.

Further Reading

If you haven't already, flip through the complete plugin documentation. 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 (via Discord is preferred).

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

Logo for Double Secret Agency