Formatting code in map.js according to coding standards