Refactor JS code for map pages

* Create `mapPage.js` to contain reusable code from tree map page
* Rename `map.js` as `treeMap.js`
Merge pull request #1555 from RickMohr/refactor-map-pages

Refactor JS code for map pages