OpenCLTBrigade / adopt-a-street

Adopt A Street
1 stars 8 forks source link

Prototype MapBox / Sails Server #45

Closed MissAutumnForest closed 8 years ago

MissAutumnForest commented 9 years ago
rmion commented 9 years ago

I can't make it to Hackathon tonight (Sept. 8), but this feels like the next big step: setup MapBox with the draw-able lines so that we can conduct user-tests to ensure the UI is appropriate for the task of selecting/extending streets.

MissAutumnForest commented 9 years ago

Cool, I'll get on that next week (either at our meeting place or from home)

MissAutumnForest commented 9 years ago

Just pushed my sails codebase into a new branch called sailsjs-mapbox

tannerhodges commented 9 years ago

Probably already saw my comment on the Node commit — glad to see this started.

Next up:

Bonus:

*Really, these are routes. Somehow we need to define available streets and allow users to select from there. Transitmix is sweet, but it just has you pick a start and end point and fills in the rest. We need something more controlled. Thoughts?

I'm gonna mess with Transitmix and Mapbox a bit more next week and circle back around to this. In the meantime, great start. Keep it up.

TraceyK14 commented 9 years ago

Well after hours of trying to get sails to install I finally got it!

Anywho, I made some changes that allow you to click two locations on the map and it will draw a line between the locations. There is alot we can do with the information stored in the markers, I've just been up too long to mess with it anymore haha.

I'm sure what I did isn't the most efficient way but at least it's a start and maybe someone with more experience who would like to help can clean it up for us.

I think the next phase should be trying to lock the user clicks to the actual road, because the way it is now they can click anywhere on the map. I don't think geo locking is hard as for the city of Charlotte but forcing the clicking of a street may be difficult.

Also why use Sails? You can just implement MapBox in Rails.

tannerhodges commented 9 years ago

Awesome. What ended up being the problem installing Sails? Would be great to note in the README for others coming on the project later.

I don't have a compelling reason for using Sails or Rails. CFC arguably has more experience with Rails. We have 2 JavaScript developers on this project. Your thoughts?

I'll have time next week to check out your map additions. Sounds like a great start so far, though.

Transitmix is a similar project that locks marker selections to the road like you mentioned. It's a good reference that we can pull a lot from (it's Rails + Backbone, btw). I forked a copy and made some minor tweaks to get the map working locally: https://github.com/tannerhodges/transitmix/tree/tanner

As for forcing the clicking of a street, Transitmix has that behavior once you create a path. It creates a line from the route between 2 markers, which you can select and is effectively a street. I'm thinking we find a way to store all the separate street segments in Charlotte, load them into the map as selectable lines, and go from there.

Ultimately, our models will look something like:

Where users adopt routes, which are collections of (connected) street segments. Street segments are either available, adopted, or don't belong to the city.

Update: Whoops on closing the issue. Getting click happy on my phone.

TraceyK14 commented 9 years ago

For some reason there are some scripts that Sails tries to run but can't and this would prevent it from installing. So I ran npm install -g sails --ignore-scripts and it worked. But I asked the question on stack overflow and posted my error and now someone I think is saying there's another reason it was happening so maybe I'll have a true answer for you and can updated you on it.

It's honestly which ever you prefer. I'm not as experienced with JS as I am with Ruby, especially Rails framework as opposed to Sails. But if you have more committed JS developers then they may prefer Sails.

I'll check out the Transitmix project and see what we can do. This would save us alot of time, and we would be using Rails :).

The database part of the project shouldn't be too terrible difficult. But I do think we need to have the map fully working before we start with the database structure as It fully relies on a working map, with segments.

tannerhodges commented 8 years ago

Moving the rest of the todos from this issue to https://github.com/CodeForCharlotte/adopt-a-street/issues/23 and marking as closed.

Progress march on.