8 ms·
Damn, my nearest restroom seems to be about 6600 km away. If you decide to go global, it's easy to get locations (and sometimes other data, like wheelchair acc
by helb 8y ago
Damn, my nearest restroom seems to be about 6600 km away.
If you decide to go global, it's easy to get locations (and sometimes other data, like wheelchair access or even opening hours) from OSM:
- tag: https://wiki.openstreetmap.org/wiki/Tag:amenity=toilets https://wiki.openstreetmap.org/wiki/Tag:amenity=toilets
- example query with Overpass API: http://overpass-turbo.eu/?template=key-value&key=amenity&value=toilets http://overpass-turbo.eu/?template=key-value&key=amenity&val...
But this approach (all data in a single huge array) could be pretty slow with a lot of restrooms: https://restroomfinder.co/data.js https://restroomfinder.co/data.js
- visujosh 8y agoThank you for the feedback! I could definitely use OpenStreetMap to add more restroom information. And yes - the code right now is very messy. I'm learning coding as I work on this project. I am planning to rebuild it with React and Express on the backend. Performance definitely worries me considering scalability. I observed that most of the maps out there have a 'redo search in this region' button. I plan to do the same so that I don't have to load all the markers at once but only those that are near the user's location. Let me know if you have any other suggestions as this is all new to me!