Layers and markers are implemented differently as the former boundaries always stay the same and the latter changes from year to year.
The boundaries of all provinces (see above) are loaded at start as static SVG and projected on top of the map tiles. Every time the year is changed, the boundaries are regrouped by selected realm (Ruler, Culture or Religion) and accordingly colored and labeled.
Markers on the other hand are destroyed and redrawn on every year change event. Markers use the Leaflet.markercluster plugin which can handle thousands of markers: