Unfortunately getBoundingClientRect() function introduced errors when scrolling down and when the map is only partly to see. So the function to find the absolute positioning of elements has to be introduced.