-
Notifications
You must be signed in to change notification settings - Fork 1
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
🏹 Implement Shuttle Route KML Visualization #996
Conversation
This reverts commit c8b7e13.
Coverage of commit
|
Coverage of commit
|
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.
A handful of minor things, otherwise looks good.
coordinate_pair | ||
|> String.split(",") | ||
|> Enum.map(&String.to_float/1) | ||
|> Enum.reverse() |
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.
Why does the pair need to be reversed? Is the coordinate_pair
string formatted like "long,lat" for some reason?
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.
correct, unsure why it's in this format
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.
Weird!
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.
Do you know where the coordinate pair string originates from? Wondering if this is something that's within our ability to fix.
If not, maybe just leave a comment above this line explaining why it needs to be reversed.
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.
my guess would be remix, the shape files come in with the pairs in long,lat format for some reason. the same is true for all the files currently in gtfs_creator
Coverage of commit
|
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.
Good to go!
(Unless you think there's a way to fix the cause of the "Long,Lat" strings. Then it's good to go after you make that fix.)
const PolyLines = ({ shapes }: { shapes: Shape[] }) => | ||
shapes.map((shape: Shape, index: number) => { | ||
const key = crypto.randomUUID() | ||
return <PolyLine shape={shape} index={index} key={key} keyPrefix={key} /> | ||
}) |
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.
Just leaving a note here:
The randomly-generated key
s should be fine in this case since we only expect this component to re-render (in other words, this function to run) when shapes
changes, and when shapes
changes it will be a completely different object since it describes a different route pattern.
So it's fine that all of this component's children will remount on re-render—we don't expect there to ever be partial changes to the shapes
object.
Summary of changes
Asana Ticket: 🏹 Implement Shuttle Route KML Visualization