tidied up some interaction logic with new function mouseOnMap()