main.js for maps