MapboxStaticMap Twig
The MapboxStaticMap
component can be used to display custom maps anywhere, without having to load the full Mapbox GL JavaScript library. You can test all features from this API on the static images API playground from Mapbox.
Table of content
Usage
Register the Figure component in your JavaScript app and use the Twig template to display images.
js
import { Base, createApp } from '@studiometa/js-toolkit';
import { Figure } from '@studiometa/ui';
class App extends Base {
static config = {
name: 'Base',
components: {
Figure,
}
};
}
export default createApp(App);
twig
{% set options = {
access_token: '<YOUR_MAPBOX_ACCESS_TOKEN>',
} %}
{% include '@ui/molecules/MapboxStaticMap/MapboxStaticMap.twig' with options %}