Skip to content

Choose a tag to compare

@simonw simonw released this 13 Nov 22:30
a334ef4
  • Upgraded the bundled Leaflet from 1.7.1 to 1.9.4. #8
  • The JavaScript is still an ES module, loaded with import(datasette.leaflet.JAVASCRIPT_URL). Importing it continues to set a global window.L, so Leaflet plugins that expect that global, such as Leaflet.markercluster, keep working. #12
  • Tile layers now send the origin of the Datasette site as their Referer header by default. Datasette serves table pages with Referrer-Policy: no-referrer, which caused tile.openstreetmap.org to respond with "Access blocked" tiles. The bundled Leaflet changes the default of the referrerPolicy tile layer option to strict-origin-when-cross-origin, so tile servers see https://example.com/ but never the path or query string of the page showing the map. This applies to every plugin that uses this copy of Leaflet.
  • New tile_referrer_policy plugin setting for changing that policy, or turning it off with false. The value is available to JavaScript as datasette.leaflet.TILE_REFERRER_POLICY. The referrerPolicy option on an individual tile layer takes precedence. See Tile layers and the Referer header.
  • New update_leaflet.py script for downloading and bundling a new version of Leaflet.
  • Now requires Python 3.11 or higher.
  • Added an Apache 2.0 LICENSE file. #11