PubCrawlr - the Global Pub Crawl Generator

If you want to plan your next wild night out then you need my new global pub crawl generator - PubCrawlr.

The map lets you click anywhere in the world to instantly generate a walking pub crawl between nearby bars. You can also search for any city, neighborhood, or address using the built-in location search box.

After selecting a location the app:

  • Finds nearby bars
  • Optimizes the walking order
  • Draws the route on the map
  • Calculates total walking distance and time
  • Lists every stop in order
  • Displays extra venue details when you click a bar name

The result is a fully automated walking bar crawl generator powered entirely by open mapping and location APIs.

How the Map Works

The map combines three APIs to generate each pub crawl: 

  1. The BizData API is used to find nearby bars from the exact latitude and longitude of a map click, returning detailed venue information including names, addresses, websites, phone numbers, email addresses and opening hours. 
  2. The Nominatim API powers the location search box by converting place names into map coordinates. 
  3. The Open Source Routing Machine routing API calculates the optimal walking order between bars, including the total distance, estimated walking time and the final route geometry displayed on the map.

Using the BizData API to Build Pub Crawls

The map is my second project to use the new BizData API. The BizData API is used by PubCrawlr to generate venue recommendations dynamically from map clicks.

Whenever a user clicks the map, the application captures the latitude and longitude. Those coordinates are then sent directly to the BizData API. The API call requests:

  • The clicked location
  • The category (`bar`)
  • The number of venues requested

The API returns a JSON collection of nearby bars and pubs around the selected point.

The BizData API returns much richer information than simple map markers. For each bar the map can display: name, address, phone number, website, e-mail address and opening hours.

Because the map is driven by live APIs, the map can generate pub crawls almost anywhere in the world with no prebuilt venue database. 

However it does not work very well in the UK. One current limitation of the BizData API is that 'pub' is not yet one of the 37 supported categories. In the UK and Ireland, the vast majority of traditional drinking establishments are tagged specifically as amenity=pub in the OpenStreetMap database rather than amenity=bar. This means that while US coverage is excellent, UK results can be thinner unless the establishment is cross-categorized. Hopefully the BizData API will one day expand to include 38 categories.

Comments

Popular Posts