Add option to embed OpenHistoricalMap
This extension’s support for Leaflet and openstreetmap-carto raster tiles is useful for some sites, but others like Housetrails, which focuses on historical geography, would benefit from maps that place the overlays in the correct time period instead of the present day. OpenHistoricalMap is a complement to OpenStreetMap that focuses on mapping history. It would be great if a site like Housetrails could embed an OHM map instead of an OSM map when a date is provided as context.
Unlike openstreetmap-carto, the main OHM map uses vector tiles that are rendered on the client side using MapLibre GL JS, but there’s a plugin for bridging the rendered style into Leaflet. openhistoricalmap.org itself uses Leaflet with this plugin.
Here’s some code you can use to adapt the style at runtime to filter all the layers by a given date:
https://github.com/OpenHistoricalMap/ohm-embed-1yr/blob/7780271d97293aad402b47f84eedaaf7d462d735/embed-map-single-year.js#L75-L168