Where do the Children Play (in Bangalore)
Feb 12, 2018
2 minute read

A bunch of us have recently started playing Badminton regularly (on weekends), in Bangalore. We use Playo to book a court to play on. But, all of us live in different parts of the city, and it’s often difficult to find a convenient place to play. Often, we end up in bad courts because we don’t pay enough attention to the ratings, while focusing on trying to find a court in a convenient location.

To help make this search easier, I built a small web app that shows the venues from Playo on a map, and then allows you to specify the locations of players, and the radius (in km) that they are willing to travel. Hopefully, we end up finding a good court in the overlapping region. Clicking on the venue marker allows you to jump to the Playo booking page for that venue. The source is available here.

  • I usually go with leaflet when I want to do map related stuff. This is the first time I used Google APIs, and it was a pretty decent experience.
  • I also ended up using the Google URL shortener API to make it easier to share URLs. The entire state of the app is being saved in the URL fragment, so that URLs are shareable, but it makes them long and ugly. Short URLs seemed like a good workaround.
  • I got most of it working with vanilla javascript, until I started doing things where I felt it would be nice to have a light-weight two-way data and view binding library. I ended up trying knockoutjs for the first time, and enjoyed using it.
  • The data for Playo venues is updated everyday using a cron job that runs on Travis. So, the ratings of venues should be pretty up-to-date.
  • But, Playo allows players to rate venues overall, and not by sport. So, it may so happen that the venue is a decent one overall, and has good facilities for some other sport, but the badminton courts are still bad. But, some venues are badminton only, and in those cases the ratings are more useful.
  • It should be pretty easy to make the app fetch data for other things like restaurants/movie theaters, to make this app do more than just help find Playo venues.

To Moar Badminton!



comments powered by Disqus