-
Notifications
You must be signed in to change notification settings - Fork 1k
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
vector tile: add no-thru traffic restrictions layer #6146
vector tile: add no-thru traffic restrictions layer #6146
Conversation
24c6206
to
06f97dc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6146 +/- ##
==========================================
Coverage 69.75% 69.76%
- Complexity 17657 17663 +6
==========================================
Files 2007 2007
Lines 75573 75641 +68
Branches 7734 7738 +4
==========================================
+ Hits 52716 52768 +52
- Misses 20144 20158 +14
- Partials 2713 2715 +2 ☔ View full report in Codecov by Sentry. |
1bb4fc1
to
b10b81d
Compare
+ group no-thru traffic and permission layers by mode
b10b81d
to
336fb13
Compare
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.
It's nice to get rid of the checkboxes for all permission combinations.
I haven't looked at the vectortiles before but I think this looks good in general. I tested it out and added my thoughts.
@@ -181,9 +197,8 @@ private static List<StyleBuilder> edges(VectorSourceLayer edges) { | |||
.group(EDGES_GROUP) | |||
.typeLine() | |||
.vectorSourceLayer(edges) | |||
.lineColor(MAGENTA) | |||
.edgeFilter(EDGES_TO_DISPLAY) |
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.
Can you explain why we remove this filter?
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.
The style changes have been reverted.
Since only the edge layer was interactive, my thought was to have an indicative background layer on which any edge could be selected.
That has been replaced with an update to MapControl
/LayerControl
so that the list of dynamic layers is updated based on the selected layers.
.toList(); | ||
} | ||
|
||
private static String permissionColors(StreetTraversalPermission p) { |
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.
private static String permissionColors(StreetTraversalPermission p) { | |
private static String permissionColor(StreetTraversalPermission p) { |
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.
Thanks, updated ✔️
.lineColor(MAGENTA) | ||
.edgeFilter(EDGES_TO_DISPLAY) | ||
.lineWidth(LINE_WIDTH) | ||
.lineColor(GRAY) |
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.
This is hard to see.
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.
The original styling has been restored.
.lineColor(GRAY) | ||
.lineOpacity(0.2f) |
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.
This is very hard to see
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.
The original styling has been restored.
public static String streetPermissionAsString(StreetTraversalPermission permission) { | ||
return ( | ||
permission == StreetTraversalPermission.ALL | ||
? "PEDESTRIAN_AND_BICYCLE_AND_CAR" |
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.
This does add a bit of noise to the map since the labels that used to say ALL
now says PEDESTRIAN BICYCLE CAR
. Maybe that's ok since it's more explicit?
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.
The layer style has been updated to handle ALL
instead.
26f78f5
to
171092c
Compare
171092c
to
8e786c0
Compare
@@ -78,7 +79,7 @@ export function MapView({ | |||
}} | |||
// it's unfortunate that you have to list these layers here. | |||
// maybe there is a way around it: https://github.com/visgl/react-map-gl/discussions/2343 | |||
interactiveLayerIds={['regular-stop', 'area-stop', 'group-stop', 'parking-vertex', 'vertex', 'edge', 'link']} | |||
interactiveLayerIds={interactiveLayerIds} |
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.
Fantastic! I was waiting for someone to come up with a solution for this.
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 could remove the coment above it.
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.
It has been removed 🙇
... since the list of interactive layer ids is updated when a layer's visibility is changed
Summary
The new vector tile layers did not include no-thru traffic details. This adds layers reusing the existing colors from the permission layer.
The edge layers are grouped by street mode. This allows coloring all edges usable by the selected modes.
Issue
Fixes #6145