Change mapFormat into a js file