I'm creating an event-driven architecture where the elements within Step, such as Maneuver and Lane, could drive what gets displayed on a navigation app. I'm more referring to the visual display than the audible instructions, which means it's not an instruction that would be displayed momentarily once the user reaches a certain distance threshold and go away. It will continuously be displayed. Following are a few scenarios
Scenarios
- If there is only
Maneuverin aStep, then the visual display would show something like "In 100 meters, turn left into Hollingsworth Road" and the 100 meter distance would continuously decrease as the user approaches the turn. - If there is both
LaneandManueuverinformation within theStep, display "Use the rightmost 2 lanes" ahead of the turn instruction or "In 100 meters, use the rightmost 2 lanes to turn left into Hollingsworth Road" if the lane instruction and the maneuver instruction are close in proximity and the 100 meters would continuously decrease. - If there is a long stretch of straight road, "Continue on East Palmetto Street for 2 km", then "Use the rightmost 2 lanes, and finally "In 100 meters, turn left into Hollingsworth Road".
My question is, when there are two Step's consecutively, let's say Step 1 and Step 2 as following JSON, when should the maneuver and lane be used to notify the user? Should the maneuver information in Step 2 be used in Step 1? For example, the maneuver for turning right in Step 2 be used while the user is still going through Step 1? Likewise, should the lane information in Step 2 be used while in Step 1 or Step 2? If the maneuver and the lane information are to be combined like "In 100 meters, use the rightmost 2 lanes to turn left into Hollingsworth Road", does that mean the maneuver and the lane information belonging to the same Step have to be used or maneuver from Step 2 be combined with lane from Step 1 while the user is still going through Step 1? If I'm not mistaken, the Step 2's location of a maneuver is either at the end of Step 1 and at the beginning of Step 2 which makes it kind of confusing.
{
"geometry": "k}bjDhzcsNAG?_A@cC?wEBeEA{D?M",
"maneuver": {
"bearing_after": 88,
"bearing_before": 222,
"location": [
-81.944846,
28.036862
],
"modifier": "sharp left",
"type": "turn"
},
"mode": "driving",
"driving_side": "right",
"name": "East Palmetto Street",
"intersections": [
{
"lanes": [
{
"valid": true,
"indications": [
"none"
]
},
{
"valid": true,
"indications": [
"none"
]
},
{
"valid": false,
"indications": [
"right"
]
}
],
"out": 2,
"in": 1,
"entry": [
true,
false,
true,
true,
true
],
"bearings": [
0,
45,
90,
180,
270
],
"location": [
-81.944846,
28.036862
]
},
],
"weight": 41.7,
"duration": 41.7,
"distance": 402.8
},
{
"geometry": "i}bjDt`csNsA@S?",
"maneuver": {
"bearing_after": 358,
"bearing_before": 88,
"location": [
-81.940752,
28.036854
],
"modifier": "left",
"type": "turn"
},
"mode": "driving",
"driving_side": "right",
"name": "Hollingsworth Road",
"intersections": [
{
"out": 0,
"in": 2,
"entry": [
true,
true,
false,
true
],
"bearings": [
0,
180,
270,
315
],
"location": [
-81.940752,
28.036854
]
}
],
"weight": 5.2,
"duration": 5.2,
"distance": 57.2
},