ProfessionalWiki / Maps

🗺 Maps is the MediaWiki extension that enables visualization of geographic data with dynamic embedded maps.
https://maps.extension.wiki
Other
73 stars 60 forks source link

Add option to embed OpenHistoricalMap #772

Open 1ec5 opened 8 months ago

1ec5 commented 8 months ago

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.

1ec5 commented 8 months ago

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