HarlanH / code-for-dc-edu

Code for DC Education Project
20 stars 17 forks source link

Enhanced school view #88

Closed cmgiven closed 11 years ago

cmgiven commented 11 years ago

Adds templates for school and neighborhood info. (#63) Adds some basic content to the school and neighborhood templates. Implements boundary map view, and toggle between map views. (#20, #74)

If you haven't been in the JS recently, recommend checking out templates.js. This file is doing most of the lifting on displaying contextual information for the school or neighborhood being displayed.

cmgiven commented 11 years ago

Oh, and I would love to have the map automatically zoom to the bounds of the info being displayed, but getBounds() is not working for the boundary layers. Leaflet throws a TypeError. It's weird. Code commented out for the time being.

cmgiven commented 11 years ago

In case anyone wonders, the TypeError above was caused by my use of objects to supply the latlons for the polygons, rather than simple arrays. Although Leaflet documentation claims to support this, the getBounds() method does not. Switching to arrays makes getBounds() work as expected.

HarlanH commented 11 years ago

This is very, very cool functionality. We'll want to probably hem and haw a bit about the interface, and whether the boundary vs commute toggle is what we want to do and where we want it.

cmgiven commented 11 years ago

Added some comments to help clarify the lo-dash code.

Yup, agreed. I'm not paying much attention to the interface.

HarlanH commented 11 years ago

awesomesauce