-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced school view #88
Conversation
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. |
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. |
"properties": {"BLDG_NUM": schoolCode} | ||
}); | ||
if (matches.length === 1) { | ||
return _(matches[0].geometry.coordinates[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind documenting this line a bit? It's a little opaque to me.
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. |
Added some comments to help clarify the lo-dash code. Yup, agreed. I'm not paying much attention to the interface. |
awesomesauce |
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.