change whole structure of mapApi.js