Leaflet

Small JavaScript library for interactive maps in the browser, with image tiles, markers and plugins such as marker clustering.

Website ↗

Leaflet draws interactive maps from image tiles and puts markers, popups and layers on top. I use it with the plugin leaflet.markercluster for the world map of my photos.

What matters in practice

  • Tiles are plain <img> elements: a Content Security Policy needs the tile host in img-src, not in connect-src.
  • referrerPolicy on the tile layer (since version 1.9) sets the Referrer-Policy for each tile image and overrides the page's policy. Tile services that check the domain need it.

More on this

Used in
Tags

Show in the graph view →