externalized progress loop code

externalized progress loop js code - added external file to route
map.html