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

Count the number of Divvy stations near a given point #17

Open
stevevance opened this issue Mar 4, 2015 · 9 comments
Open

Count the number of Divvy stations near a given point #17

stevevance opened this issue Mar 4, 2015 · 9 comments

Comments

@stevevance
Copy link
Collaborator

Install the context-menu plugin for Leaflet to allow the user to right-click a point on the map. Then find the 5 nearest Divvy stations and report their distances.

@stevevance
Copy link
Collaborator Author

The Turf.js "nearest" function only finds 1 feature and isn't extensible to find more than one. You can see this live on the map now, and it's also explained in my blog post.

@zorostang You should pull the latest from master because @rguico expanded your work on the Divvy station buffers to merge them into one polygon. I then added a right-click function that finds the nearest Divvy station to any part on the map.

@stevevance stevevance added this to the June MBAC milestone Mar 11, 2015
@rguico
Copy link
Contributor

rguico commented Mar 24, 2015

This issue remains open so that we can consider implementing https://github.com/mapbox/leaflet-knn instead.

@stevevance
Copy link
Collaborator Author

@rguico Are you working on this?

@rguico
Copy link
Contributor

rguico commented Mar 25, 2015

Yes, but heads up: it might be a slower algorithm. If it's decidedly slower I'll let you know.

@stevevance
Copy link
Collaborator Author

@rguico Keep in mind there's just a small chance I might want to add bike directions between the point and the Divvy station. The reason I would keep it out is because this isn't a Divvy app. We need to determine the utility of such a function towards our mission before including it.

@stevevance
Copy link
Collaborator Author

@rguico Can you update this function to only show those Divvy stations within 1/4 mile? And can you count up to 20 stations to find those within 1/4 mile?

@rguico
Copy link
Contributor

rguico commented May 12, 2015

I'm on it. I won't be available Tuesday nights for the next 2 weeks because
my parents / Tuesday babysitters are out of town. But I will try to find
time for it.

On Tue, May 12, 2015 at 1:17 PM, Steven Vance [email protected]
wrote:

@rguico https://github.com/rguico Can you update this function to only
show those Divvy stations within 1/4 mile? And can you count up to 20
stations to find those within 1/4 mile?


Reply to this email directly or view it on GitHub
#17 (comment)
.

@stevevance
Copy link
Collaborator Author

@rguico Okay, I'll keep that in mind. I'm spending today closing out old issues and if you sync you'll see I integrated the "find nearest bike lane" to the right-click "Get Access Index".

@stevevance
Copy link
Collaborator Author

@rguico Can you also make these changes:

  • Remove the lines between the source point and the Divvy stations
  • Replace the icon with a Divvy icon (attached)
  • Move the line's distance label into the Divvy station popup (I added the popup today)

icon_divvy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants