(refactor)map.js