fixes for map.html: added missing libs, fixed crashes, wait spinner, etc.