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

[20391] Handle Lit Route road tag #409

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ enum class RoadTag {
*/
@SerializedName("UNKNOWN")
UNKNOWN,
@SerializedName("LIT-ROUTE")
LIT_ROUTE
}

fun String.parseRoadTag(): RoadTag =
Expand All @@ -52,7 +54,8 @@ fun RoadTag.getRoadSafetyColorPair(): Pair<Int, Boolean> {
RoadTag.CYCLE_NETWORK,
RoadTag.BICYCLE_DESIGNATED,
RoadTag.BICYCLE_BOULEVARD,
RoadTag.CCTV_CAMERA -> android.R.color.holo_blue_dark to true
RoadTag.CCTV_CAMERA,
RoadTag.LIT_ROUTE -> android.R.color.holo_blue_dark to true

RoadTag.SIDE_WALK,
RoadTag.SIDE_ROAD,
Expand All @@ -72,7 +75,8 @@ fun RoadTag.getRoadSafetyColor(): Int {
RoadTag.CYCLE_NETWORK,
RoadTag.BICYCLE_DESIGNATED,
RoadTag.BICYCLE_BOULEVARD,
RoadTag.CCTV_CAMERA -> Color.parseColor("#0000b3")
RoadTag.CCTV_CAMERA,
RoadTag.LIT_ROUTE -> Color.parseColor("#0000b3")

RoadTag.SIDE_WALK,
RoadTag.SIDE_ROAD,
Expand All @@ -92,7 +96,8 @@ fun RoadTag.getRoadSafetyIndex(): Int {
RoadTag.CYCLE_NETWORK,
RoadTag.BICYCLE_DESIGNATED,
RoadTag.BICYCLE_BOULEVARD,
RoadTag.CCTV_CAMERA -> 1
RoadTag.CCTV_CAMERA,
RoadTag.LIT_ROUTE -> 1

RoadTag.SIDE_WALK,
RoadTag.SIDE_ROAD,
Expand All @@ -113,6 +118,7 @@ fun RoadTag.getTextColor(): Int {
RoadTag.BICYCLE_DESIGNATED,
RoadTag.BICYCLE_BOULEVARD,
RoadTag.CCTV_CAMERA,
RoadTag.LIT_ROUTE,
RoadTag.SIDE_ROAD,
/*RoadTag.SEGREGATED,*/
RoadTag.UNKNOWN,
Expand All @@ -136,6 +142,7 @@ fun RoadTag.getRoadTagLabel(): String {
/*RoadTag.SERVICE_ROAD -> "Service Road"*/ //Ignored
RoadTag.STREET_LIGHT -> "Street Light"
RoadTag.CCTV_CAMERA -> "CCTV Camera"
RoadTag.LIT_ROUTE -> "Lit Route"
/*RoadTag.SEGREGATED -> "Segregated"*/ //Ignored
else -> "Other"
}
Expand Down