JavaScript openstreetmap-validator Projects
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Yeah, the country location is a requirement to show the opening hours. The library (https://github.com/opening-hours/opening_hours.js) is aware of holidays in many countries, but for that it needs to know what country a POI is in.
The country awareness source code is here: https://github.com/pietervdvn/latlon2country
The idea: I've taken all the country boundaries from OSM (via nominatim); I slice them in four parts. If the resulting geojson is too big, I slice this again until I have small geojsons, suitable to download. If you know the zoomlevel and location, one can use the standard slippy-tile-index to fetch the correct tile. (Alternatively, if the entire tile is within a country, it'll just return the country code)
However, the client also needs to know what zoomlevel there is. For that, I built a search tree.
It's been a while though, so I've forgotten some of the details ;)
Index
Project | Stars | |
---|---|---|
1 | opening_hours.js | 213 |
Sponsored