-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add a separate layer group in debug UI for elevator edges and vertices #6885
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
base: dev-2.x
Are you sure you want to change the base?
Conversation
return; | ||
} | ||
|
||
if (edge instanceof ElevatorHopEdge) { |
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.
Is this still necessary?
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.
In case of ElevatorHopEdges, the condition for early return used to happen the line before because they didn't return a geometry. So this is something I had to add as a special case.
@Override | ||
public LineString getGeometry() { | ||
List<Coordinate> segmentCoordinates = Arrays.asList(fromv.getCoordinate(), tov.getCoordinate()); | ||
return GeometryUtils.getGeometryFactory() |
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.
You can use GeometryUtils.makeLineString
here.
application/src/main/java/org/opentripplanner/street/model/edge/ElevatorHopEdge.java
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/street/model/vertex/ElevatorVertex.java
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6885 +/- ##
=============================================
- Coverage 72.10% 72.10% -0.01%
+ Complexity 19666 19665 -1
=============================================
Files 2125 2125
Lines 79522 79559 +37
Branches 8049 8050 +1
=============================================
+ Hits 57341 57366 +25
- Misses 19345 19355 +10
- Partials 2836 2838 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fix the formatting please. |
You need to resolve conflicts. |
3e9e6dd
to
14f0bdb
Compare
StyleBuilder.ofId("elevator-hop-edge") | ||
.group(ELEVATORS_GROUP) | ||
.typeLine() | ||
.vectorSourceLayer(edges) | ||
.edgeFilter(ElevatorHopEdge.class) | ||
.lineColor(ORANGE) | ||
.lineWidth(LINE_HALF_WIDTH) | ||
.lineOffset(LINE_OFFSET) | ||
.minZoom(6) | ||
.maxZoom(MAX_ZOOM) | ||
.intiallyHidden(), |
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.
These are slightly problematic as they are used for all elevators, but only visible for the horizontal elevators currently since the line has 0 length usually. I was thinking should we rename this so it's more clear that these will only show up for the horizontal elevators or somehow draw them as circles when they have 0 length and as lines when they don't. However, it's also possible that we don't do anything about it now.
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.
I somewhat agree but I still think that since we don't do any special filtering for these edges we'd want the name to represent all of them. Then the ui just draws what it can
Summary
Issue
This is related to improving indoor navigation #6829
Unit tests
style.json was regenerated by DebugStyleSpecTest.java
Bumping the serialization version id
Minor changes made to both ElevatorHopEdge and ElevatorVertex which requires to bump serialization id