put all pap code into map.js file