Detecting a users location can be very useful and incorporated into functionality, your imagination is your only limit with this technology, when this page first loaded you would have hopefully have been asked to give permission to the website to allow it to know your location.

When developing a function using geolocation it’s important to remember that people have the choice to not give you their location so its recommended that you do not build functionality that is dependent on that data, having a fall back or at least an error message would be advisable.

Google maps api has a lot of features to play with, once you know the users location you could plot on the map where they are.