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

Events page auto-centers based on top 10 events #389

Closed
wants to merge 1 commit into from

Conversation

justsml
Copy link
Contributor

@justsml justsml commented Nov 28, 2015

Hey @mikeal Here's a clean PR RE #382

return a.dist > b.dist ? 1 :
a.dist < b.dist ? -1 : 0;
})
var nearest = Array.isArray(points) && (points.length > 10 ? points.slice(0, 9) : points.slice(0, points.length-1));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this safety is necessary because we're in the feature layer's onready, so points will always be an array and it'll always be huge (much more than 10) because we load the array from the giant geojson url.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, thx for spotting that. One sec...

@justsml
Copy link
Contributor Author

justsml commented Nov 28, 2015

Hopefully that looks better

@justsml
Copy link
Contributor Author

justsml commented Dec 1, 2015

Hey @mikeal Hope you had a good thanksgiving.

Did you notice my latest update?
... Presumably after you've woken up out of the food coma. 😴

@mikeal
Copy link
Contributor

mikeal commented Dec 1, 2015

This looks great! I've merged locally and am modifying just a little bit. I realized that we also need a minimum threshold of distance so that when you're in a very dense area you don't get a hyper localized map.

@mikeal
Copy link
Contributor

mikeal commented Dec 1, 2015

This was merged as part of b3efd13

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