Leaflet is an open-source JavaScript library for building interactive maps.
- It's designed to be map provider-agnostic.
// basic fullscreen map of the world
const map = Leaflet.map('map').fitWorld();
// add a tile layer
Leaflet.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
attribution: '...',
maxZoom: 18,
tileSize: 512,
zoomOffset: -1
}).addTo(map);
- Provides an API for initializing maps, managing state, etc.
- Simple, event-driven API is similar to DOM
Build a simple radio.garden clone.