cfpb/hmda-explorer — pull request #8 by wpears (2014-07-28 07:52:07+00:00)
Title: Slight dependency change and map layers lazily loaded.

Hey,

When setting up the project, the grunt-cfpb-internal file wasn't found on npm, so I updated the dependency to reference the repository itself. If this is by design and I just have something misconfigured, please let me know.

The more substantial portion of this pull request involves delaying the loading of the three hidden layers on the home page until the first scroll event is received. This cuts 500kb from the initial pageload while still preloading the layers for the cool zoom effect. While just listening for the first scroll event is fairly crude (we're still loading the tiles earlier than necessary), it moves the tiles closer to the ideal time to load them and doesn't clutter the code overly much.