Get started with leaflet-plugins CDN

MIT licensed

Leaflet plugins extend the functionality of the open-source Leaflet JS mapping library.

Tags:
  • leaflet
  • plugins
  • map
  • google
  • bing
  • yandex
  • kml
  • gpx

Stable version

Copied!

How to start using leaflet-plugins CDN


// Include Leaflet and the Permalink control
L.mapbox.accessToken = 'your.mapbox.access.token'; // Replace with your Mapbox access token

const map = L.map('mapid').setView([51.505, -0.09], 13);

L.tileLayer('{s}.tiles.mapbox.com/{id}/{z}/{x}/{y}.png', {
  attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
    '<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
    'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
}).addTo(map);

// Add the Permalink control to the map
L.control.permalink().addTo(map);
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions