Leaflet is "an open-source JavaScript library for mobile-friendly interactive maps"
- Map
- Provider:
- Open Street Maps
- Mapbox
- Layers:
- Marker
- Circle
- Polygon
- Popups
This example is build on quick start example from leaflet.
No configuration needed, continue with create a new map.
- You require an Mapbox account.
- Navigate to Classic -> Mapbox Editor Projects
- Create a new Mapbox Editor project
- After you choose the style, save the project
- In the projects overview, you'll see your project id, that is required later
- You also need an API access token. You can find it under Account -> API access token
- Navigate to Maps, in Octobercms backend.
- Create a new map
- Insert a name and copy and paste your Mapbox project id and your API access token.
- After that you can add objects at the buttom.
- Possible parameters for objects can be found on Leaflet documentation.
- Open a cms page
- Add map component
- Select the map, that you want to display and set the properties.
- Include the
{% component 'map' %}
in the cms page.