Adding functionality to detect clicks on the map