Refactor JS code for map pages

* Create `mapPage.js` to contain reusable code from tree map page
* Rename `map.js` as `treeMap.js`
It looks like `searchBar` should not be factored out to `mapPage`, if map pages are just shared functionality for pages with a big map.