Skip to content

Instantly share code, notes, and snippets.

View simon04's full-sized avatar

Simon Legner simon04

  • Innsbruck, Austria
View GitHub Profile
@simon04
simon04 / leaflet-fullscreen-control.js
Created February 2, 2023 12:06
A Leaflet Control, to request fullscreen for map (no CSS, no image)
/**
* A Leaflet Control, to request fullscreen for map (no CSS, no image)
*
* @example new FullscreenControl({ position: "topleft" }).addTo(map);
*/
export class FullscreenControl extends L.Control {
onAdd() {
const container = L.DomUtil.create("div", " leaflet-bar");
const link = L.DomUtil.create("a", undefined, container);
link.innerHTML = "⛶";
@simon04
simon04 / MapCSS.peggy
Last active April 10, 2023 21:56
MapCSS grammar written for @peggyjs (a parser generator for JavaScript)
/*
* Parser definition for the main MapCSS parser:
*
* <pre>
*
* rule
* _______________________|______________________________
* | |
* selector declaration
* _________|___________________ _________|____________
@simon04
simon04 / _README.md
Last active December 24, 2025 12:29
Leaflet API Diff between version 1.9.4 and 2.0.0-alpha

Leaflet API Diff between version 1.9.4 and 2.0.0-alpha.1-87-gf33fbefb

Differences to the Leaflet API between version 1.9.4 and 2.0.0-alpha.1-87-gf33fbefb as outlined in the Leaflet 2.0 Alpha released blog post and subsequent commits.

Generated from diffing the entries https://devdocs.io/docs/leaflet~1.9/index.json and https://devdocs.io/docs/leaflet~2.0/index.json which are based https://leafletjs.com/reference.html and https://leafletjs.com/reference-2.0.0.html, respectively.

diff --git a/leaflet-1.9.txt b/leaflet-2.0.txt
index fdb6047..80e1b86 100644
--- a/leaflet-1.9.txt