codeforamerica/human_services_finder — pull request #279 by anselmbradford (2013-10-09 23:57:37+00:00)
Title: Fixes map loading errors

- Map initialization was hooked into AJAX search loading so that a AJAX
callback is provided to the map to enable it to route location clicks
through an AJAX request. However, AJAX search is currently disabled so
the map was not being initializing properly and was not loading. This
commit fixes the issue by completely removing AJAX-related modules from
the module loading sequence and initializing the maps directly within
their page route initializers.

- If the Google Maps API timed out the maps failed to load. This commit
adds RequireJS error hooks on the route initializers that loads
"no-map" versions of the map manager modules, which handle cleanup by
hiding the map container HTML and displaying an alert message to the
user to try reloading the page or sending feedback. This occurs after a
7 second timeout so the map will display blank for the first seven
seconds before being hidden.