Skip to content
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

Merged
merged 7 commits into from
Oct 19, 2013
Merged

Conversation

cmgiven
Copy link
Contributor

@cmgiven cmgiven commented Oct 17, 2013

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
Copy link
Contributor Author

cmgiven commented Oct 17, 2013

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
Copy link
Contributor Author

cmgiven commented Oct 17, 2013

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])
Copy link
Owner

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.

@HarlanH
Copy link
Owner

HarlanH commented Oct 19, 2013

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
Copy link
Contributor Author

cmgiven commented Oct 19, 2013

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

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

HarlanH added a commit that referenced this pull request Oct 19, 2013
@HarlanH HarlanH merged commit d53490e into HarlanH:master Oct 19, 2013
@HarlanH
Copy link
Owner

HarlanH commented Oct 19, 2013

awesomesauce

@cmgiven cmgiven deleted the enhanced-school-view branch October 19, 2013 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants