Home > @magiclane/maps-sdk > TrafficService > addPersistentRoadblockByArea
TrafficService.addPersistentRoadblockByArea() method
Add a user persistent roadblock to collection (area impact zone type).
Signature:
static addPersistentRoadblockByArea(params: {
area: GeographicArea;
startTime: Date;
expireTime: Date;
transportMode: RouteTransportMode;
id: string;
}): Pair<TrafficEvent | null, GemError>;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
params |
{ area: GeographicArea; startTime: Date; expireTime: Date; transportMode: RouteTransportMode; id: string; } |
The roadblock parameters. |
params properties:
- area: GeographicArea
The geographic area affected by the roadblock.
- startTime: Date
The roadblock start time.
- expireTime: Date
The roadblock expire time.
- transportMode: RouteTransportMode
The transport mode for which the roadblock applies.
- id: string
The user roadblock id. Can be used to get / delete a defined roadblock.
Returns:
Pair<TrafficEvent | null, GemError>
The TrafficEvent object and GemError.success if successful, or null with error code if failed.