Refactor map.js
Minor change