feat(junction): enable complex carriageway width editing
This commit is contained in:
1 parent
56647fcdaa
commit
c4bcbe8ff9
22 files changed
+449
-52
No files matched your search
@@ -25,6 +25,14 @@ function anchorFor(kind) {
|
||||
if (type === 'road-interval')
|
||||
return { type, roadId: 'road:way/1:forward', startStation: 0.25, endStation: 0.75, side: 'left' };
|
||||
if (type === 'junction-approach') return { type, nodeId: 'node/9', segmentId: 'road:way/1:segment/0' };
|
||||
if (type === 'cluster-carriageway')
|
||||
return {
|
||||
type,
|
||||
clusterId: 'cluster/9',
|
||||
carriagewayKey: 'cluster:cluster%2F9:carriageway:node%2F9/road%3Away%2F1%3Asegment%2F0/road%3Away%2F1%3Aforward',
|
||||
sourceNodeIds: ['node/9', 'node/10'],
|
||||
sourceRoadIds: ['road:way/1:forward'],
|
||||
};
|
||||
if (type === 'lane') return { type, laneId: 'lane:road:way/1:forward:1' };
|
||||
return { type, nodeId: 'node/9', incomingRoadId: 'road:way/1:forward', outgoingRoadId: 'road:way/2:forward' };
|
||||
}
|
||||
@@ -42,6 +50,8 @@ function valueFor(kind) {
|
||||
return { boundaryIndex: 2, offsetMeters: -1.6, transition: 'smoothstep' };
|
||||
case 'junction-approach-width':
|
||||
return { widthMeters: 12.5 };
|
||||
case 'cluster-carriageway-width':
|
||||
return { widthMeters: 12.5 };
|
||||
case 'junction-cutback':
|
||||
return { cutbackMeters: 4 };
|
||||
case 'junction-corner-radius':
|
||||
@@ -102,6 +112,7 @@ assert.deepEqual(CONSTRAINT_KINDS, [
|
||||
'road-sidewalk-width',
|
||||
'road-lane-divider',
|
||||
'junction-approach-width',
|
||||
'cluster-carriageway-width',
|
||||
'junction-cutback',
|
||||
'junction-corner-radius',
|
||||
'junction-crosswalk-inset',
|
||||
|
||||
Reference in new issue
Block a user