Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to embed OpenHistoricalMap #772

Open
1ec5 opened this issue Feb 26, 2024 · 1 comment
Open

Add option to embed OpenHistoricalMap #772

1ec5 opened this issue Feb 26, 2024 · 1 comment

Comments

@1ec5
Copy link

1ec5 commented Feb 26, 2024

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
Copy link
Author

1ec5 commented Feb 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants