Location Detection
When you click "📍 Locate me", Pub Runna uses your browser's Geolocation API to request your current position. This data is never stored or shared - it's only used temporarily to center the map and set your starting point. If you prefer privacy, you can manually enter an address instead.
Pub Data Sourcing
All pub and bar data comes from OpenStreetMap (OSM), a free, open-source map database maintained by volunteers worldwide. We query the Overpass API with your specified radius and amenity type (pubs or bars). The data includes names, coordinates, and basic information, which we display as markers on the map.
Data is fetched in real-time and cached briefly for performance. We don't store any venue data permanently.
Radius and Dead-Zone Calculations
The blue circle represents your maximum search radius. The red circles around selected pubs indicate dead-zones - areas where new pubs won't be suggested to avoid overcrowding. We use the Turf.js library for geometric calculations and distance measurements.
Dead-zones are calculated using buffer operations around each selected pub, ensuring a minimum distance between stops.
Random Route Generation
Our random route feature uses a weighted algorithm to select pubs within your criteria. It prioritizes pubs that are:
- Within your radius
- Outside existing dead-zones
- Optimally spaced for walking
The algorithm considers walking distances and tries to create a logical path, though it's randomized for discovery.
Route Planning and OSRM
For detailed routing, we use the Open Source Routing Machine (OSRM) demo service. This calculates walking/driving routes between your selected pubs. The routing considers:
- Real street networks
- Walking speeds
- Traffic restrictions
Route data is processed client-side and displayed using Leaflet Routing Machine.
Data Privacy
Pub Runna operates entirely in your browser. Your location data, selected pubs, and saved plans are stored locally using browser storage. Nothing is sent to our servers - all processing happens on your device.
Saved plans use localStorage, which persists between sessions but stays on your device.
Shareable Links
When you share a plan, we encode your selected pubs as base64 JSON in the URL. This allows others to view your exact route without storing data on our end. The link is self-contained and doesn't require server processing.