openinghoursmap
June 16, 2026 ยท View on GitHub
opening_hours tag is used in OpenStreetMap project to describe time ranges when a specific facility (for example, a cafe) is open.
This map shows the opening_hours as nicely readable time table.
A mirror is set up under: https://openingh.ypid.de/
Install
Just clone the repository:
git clone --recursive https://github.com/opening-hours/opening_hours_map
and install its dependencies (execute inside the repository):
npm install
make dependencies-get
This will:
- Install development dependencies (ESLint, html-validate)
- Download OpenLayers
- Initialize the opening_hours.js git submodule
How does it work?
The map uses OpenLayers to show a base map from OpenStreetMap. An additional optional layer shows POIs which are tagged with opening_hours. The data for this additional layer is queried from the OverpassAPI. The basic query in OverpassQL looks like this:
[out:json][timeout:3][bbox:{{bbox}}];
(
node["opening_hours"];
way["opening_hours"];
);
out body center 1000;
Development
The app is fully static. Serve index.html through any local HTTP server for
development or open the hosted instance directly.
Overpass requests go directly to public fallback endpoints:
https://overpass-api.de/api/interpreterhttps://overpass.kumi.systems/api/interpreterhttps://overpass.private.coffee/api/interpreter
Network/CORS failures trigger endpoint cooldown and a short global cooldown to avoid hammering endpoints.
Building
To build the opening_hours.js library for production:
make ready-for-hosting
This will build the minified version of opening_hours.js with all dependencies.
Testing
Run validation and linting:
npm test
Dependencies
- This map is built with OpenLayers 10.
- The opening_hours evaluation is handled by the opening_hours.js library.
Author
Credits
-
Big thanks goes to Netzwolf who created some OpenLayers extensions and examples. He also created the same map showing opening_hours with his JS implementation (which is withdrawn in favour of opening_hours.js). Big parts of his code are still in use for the map. Although most code around the opening_hours interpretation was rewritten.
-
Also thanks to FOSSGIS for hosting a public instance of this service. See the wiki.