Map (Leaflet)
Use the Leaflet Map component to show the user geographic information with Leaflet.js. For example:
- An electoral boundary (e.g: their constituency/ward)
- The location of a place (e.g: their assigned polling station)
- The route to a place (e.g: from their house to their assigned polling station)
Some examples of leaflet maps in the wild:
- In a card, showing a route: Where Do I Vote
- In a details/summary, showing a boundary: Every Election
Light theme
Dark theme
Invoke the dark theme on any component by applyingclass="ds-dark"
to a container element.
Here’s a demo:
<div id="area_map" class="ds-map-leaflet"></div>