getVisibleRouteInterval method
Get the clipped part of the given route as a pair (startDistance, endDistance)
Parameters
- IN route The target route.
- IN screenRect Clipping rectangle in screen coordinates. If no clip rectangle is given, the whole screen is used
Returns
- The clipped part of the route as a pair (startDistance, endDistance)
Throws
- An exception if it fails.
Implementation
Pair<int, int> getVisibleRouteInterval(
final Route route, {
final RectType<int>? screenRect,
}) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapView',
'getVisibleRouteInterval',
args: <String, dynamic>{
'route': route.pointerId,
if (screenRect != null) 'clipRect': screenRect,
},
);
return Pair<int, int>(
resultString['result']['first'],
resultString['result']['second'],
);
}