feat: More Mapbox mappings
This commit is contained in:
parent
ac24c6ed2f
commit
c3d553ece0
1 changed files with 21 additions and 10 deletions
|
@ -14,27 +14,38 @@ class MapboxMapper {
|
||||||
"roundabout" -> {
|
"roundabout" -> {
|
||||||
direction.out = OutType.RightRoundabout
|
direction.out = OutType.RightRoundabout
|
||||||
}
|
}
|
||||||
"fork" -> direction.out = OutType.LongerLane
|
|
||||||
"arrive" -> {
|
"arrive" -> {
|
||||||
// flag = true
|
direction.out = OutType.Flag
|
||||||
|
direction.angle = OutAngle.Right
|
||||||
}
|
}
|
||||||
"turn" -> {
|
"turn" -> {
|
||||||
when (this.type) {
|
when (this.modifier) {
|
||||||
"straight" -> direction.angle = OutAngle.Straight
|
"straight" -> direction.angle = OutAngle.Straight
|
||||||
|
"slight right" -> direction.angle = OutAngle.EasyRight
|
||||||
|
"slight left" -> direction.angle = OutAngle.EasyLeft
|
||||||
|
"sharp right" -> direction.angle = OutAngle.SharpRight
|
||||||
|
"sharp left" -> direction.angle = OutAngle.SharpLeft
|
||||||
|
"uturn" -> direction.angle = OutAngle.LeftDown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
when (this.modifier) {
|
when (this.modifier) {
|
||||||
"right" -> {
|
"right" -> {
|
||||||
|
direction.angle = OutAngle.Right
|
||||||
when (this.type) {
|
when (this.type) {
|
||||||
"turn" -> direction.angle = OutAngle.Right
|
|
||||||
"roundabout" -> {
|
"roundabout" -> {
|
||||||
when (this.degrees) {
|
when (this.degrees!!.toInt()) {
|
||||||
137.0 -> direction.angle = OutAngle.EasyRight
|
in 22..66 -> direction.angle = OutAngle.SharpRight
|
||||||
180.0 -> direction.angle = OutAngle.Straight
|
in 67..111 -> direction.angle = OutAngle.Right
|
||||||
|
in 112..156 -> direction.angle = OutAngle.EasyRight
|
||||||
|
in 157..203 -> direction.angle = OutAngle.Straight
|
||||||
|
in 204..248 -> direction.angle = OutAngle.EasyLeft
|
||||||
|
in 249..293 -> direction.angle = OutAngle.Left
|
||||||
|
in 294..338 -> direction.angle = OutAngle.SharpLeft
|
||||||
|
else -> direction.angle = OutAngle.Down
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"off ramp" -> {
|
"fork", "off ramp" -> {
|
||||||
direction.angle = OutAngle.EasyRight
|
direction.angle = OutAngle.EasyRight
|
||||||
direction.out = OutType.LongerLane
|
direction.out = OutType.LongerLane
|
||||||
}
|
}
|
||||||
|
@ -42,9 +53,9 @@ class MapboxMapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
"left" -> {
|
"left" -> {
|
||||||
|
direction.angle = OutAngle.Left
|
||||||
when (this.type) {
|
when (this.type) {
|
||||||
"turn" -> direction.angle = OutAngle.Left
|
"fork", "off ramp" -> {
|
||||||
"off ramp" -> {
|
|
||||||
direction.angle = OutAngle.EasyLeft
|
direction.angle = OutAngle.EasyLeft
|
||||||
direction.out = OutType.LongerLane
|
direction.out = OutType.LongerLane
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue