azavea/OTM2 — pull request #233 by RickMohr (2013-08-22 15:29:32+00:00)
Title: Refactor map page to support different interaction modes

The main "map" page has several modes -- browse trees, add a tree, and edit tree details. Each mode has a div in the sidebar to show its UI and a JS module to handle UI events. The "modesForMapPage" module initializes the mode modules and orchestrates switching between modes.

Note that different modes will interpret map clicks differently. We pass the map's "clickedLatLonStream" to each mode, but filter it so the events will be ignored unless the mode is active.