adding a click handler to the map