getNextSpeedLimitVariation method
Next speed limit variation within a specified distance.
Searches ahead on the planned route for speed limit changes within the specified distance. Returns a NextSpeedLimit object containing the location, distance, and new speed limit value. Check NextSpeedLimit.status to determine result validity.
Calculates the result in dynamic way, two calls with the same parameters may return different results.
Parameters
checkDistance: (int) Search distance in meters. Defaults to maximum int value (no limit).
Returns
- (NextSpeedLimit) Speed limit variation details.
See also:
- currentStreetSpeedLimit - Current road speed limit.
- NextSpeedLimit - Result object with distance, speed, and status.
Implementation
NextSpeedLimit getNextSpeedLimitVariation({
final int checkDistance = 2147483647,
}) {
final OperationResult resultString = objectMethod(
pointerId,
'NavigationInstruction',
'getNextSpeedLimitVariation',
args: checkDistance,
);
return NextSpeedLimit.fromJson(resultString['result']);
}