setRouteRoadBlock static method

GemError setRouteRoadBlock(
  1. RouteInstructionBase instruction
)

Sets a user-defined road block to trigger route recalculation.

Marks a road section from a RouteInstructionBase as blocked, causing active navigation to recalculate the route avoiding that zone. The block persists until resetRouteRoadBlocks is called. Useful for manually handling traffic incidents, construction, or road closures not yet reflected in map data.

Only affects active navigation sessions—road blocks set before navigation starts are ignored. Multiple road blocks can be set cumulatively; call resetRouteRoadBlocks to clear all at once.

Parameters

Returns

  • GemError.success if the road block was set successfully.
  • Other GemError values indicate failure (e.g., invalid instruction).

See also:

Implementation

static GemError setRouteRoadBlock(final RouteInstructionBase instruction) {
  final OperationResult result = staticMethod(
    'RoutingService',
    'setRouteRoadBlock',
    args: instruction.pointerId,
  );

  return GemErrorExtension.fromCode(result['result']);
}