Tuesday, September 16, 2014

Opening Hours on Google Maps


One of my biggest first world problems is never being able to find an open cafe late at night. After going out for a meal or visiting a pub in the evening I often feel like a decent cup of coffee before heading home. However for some reason in London most cafes shut between 6-9 pm. This makes it very difficult to find a good cup of coffee late at night.

When the Google Places API was released I created a little personal app, to help me find cafes around my location that were currently open. When I share my location on my Places app I can view all the nearby open cafes on a Google Map. It is probably the most used app on my phone.

Over the years I've wondered about adding other options, for example to find bars nearby which are currently open. However I've never really felt the need for these other options and because the application has only one user (me) I've never bothered developing it further.

If you live in the USA, Australia, Ireland or the United Kingdom then you have no need to build your own application. Instead you can use Localmint. Localmint is an application to find the opening hours and place details of nearby businesses. Enter a search term (e.g. 'coffee') and an address into Localmint and you can view a Google Map showing all the nearby local businesses.

All the results are plotted on a Google Map and also listed in the map sidebar. The sidebar results show the opening-hours for each business and you can also select a business' marker to view the hours that it is open.

If you are interested in building your own opening hours application it is very easy to do using the Google Maps API. You can use this Google Maps documentation Geolocation demo to get the user's current location. You can then use the returned location with the Google Places API.

The Places API allows you to return only places which are currently open ('openNow: true'). Using this option it possible therefore to create a simple application which only shows businesses nearby which are currently open.

No comments:

Post a Comment