Updated code to try to fix map scrolling