Add an alternate street address to the segment.
ID of segments to add an alternate street to.
Street id for the alternate street.
Splits two intersecting segments into four segments at their intersection point.
This method divides two intersecting segments into four new segments, with a new node created at the intersection point to connect them.
Note: This method only splits two segments, and they should have the same road type
Ids of segments to be split.
the ids of the four newly created segments.
Add a new segment to the map.
Segment geometry.
A type of the segment to be added.
segment id of the new segment
An id of the segment to get address for.
an address of the segment with provided id.
an array of all the segments in the WME data model
An id of the segment to find.
segment with id, or null if not found in the WME data model
Gets segments connected to a specified segment.
This method retrieves an array of segments connected to the segment identified by segmentId.
You can check for connections in either the forward or reverse direction using the reverseDirection parameter.
Forward direction checks if segments share the node defined by the fromNodeID attribute.
Reverse direction checks if segments share the node defined by the toNodeID attribute.
OptionalreverseDirection?: booleanIf segments should be connected in reverse direction, defaults to false.
An id of the segment to find connected segments for.
connected segments in specified direction
Identifies which segments in a given list of IDs are directionally reversed.
The direction is determined relative to the first segment in the list, which is considered 'forward'. Any other segment connected against this flow (e.g., head-to-head or tail-to-tail) is marked as reversed.
An array of segments that are considered reversed within the provided list.
all possible road types and their localised names.
array of nodes virtually connected to the specified segment.
Optionalpermission?: SegmentPermissionA name of the permission to check. If not provided, the method checks whether the current user has any permissions for this segment.
An id of the segment to check the permissions for.
whether the current user has a permission for this segment or not.
The type of the road to check.
boolean indicating whether specified road type is drivable.
Splits a segment at a specific point.
This method divides a segment into two segments at the provided point.
two segments the original segment was split into.
Update segment address or alternative addresses.
OptionalalternateStreetIds?: number[]New ids of the alternative streets for the segment.
OptionalprimaryStreetId?: numberAn id of the new street for the segment.
The id of the segment to update the address for.
Update segment attributes.
Optionaldirection?: SegmentDirectionNew traffic direction for the segment.
OptionalelevationLevel?: numberNew elevationLevel for the segment.
OptionalflagAttributes?: Pick<SegmentFlagAttributes, "tunnel" | "unpaved" | "headlights" | "nearbyHOV">New flag attributes for the segment.
Allows updating flags such as unpaved, tunnel, nearbyHOV, and headlights.
OptionalfromLanesInfo?: null | SegmentLanesInfoNew lanes info for the segment in the forward direction, or null if lanes info has to be deleted.
laneWidth should be provided in m or ft depending on the active units system.
OptionalfwdSpeedLimit?: null | numberNew max speed for the segment in the forward direction, in km/h.
Optionalgeometry?: LineStringNew geometry for the segment.
OptionalhasToll?: booleanNew toll status for the segment. Will be set on both directions of the segment.
OptionallockRank?: UserRankNew lock rank for the segment.
OptionalrevSpeedLimit?: null | numberNew max speed for the segment in the reverse direction, in km/h.
OptionalroadType?: RoadTypeIdNew road type for the segment.
OptionalroutingRoadType?: 1 | 2 | 3 | 6 | 7New routing road type of the segment.
The id of the segment to be updated.
OptionaltoLanesInfo?: null | SegmentLanesInfoNew lanes info for the segment in the reverse direction, or null if lanes info has to be deleted.
laneWidth should be provided in m or ft depending on the active units system.
Methods for dealing with Segments.