Refactor JS code for map pages

* Create `mapPage.js` to contain reusable code from tree map page
* Rename `map.js` as `treeMap.js`