mainRoute property

Route? get mainRoute

Get the current main route.

Returns

  • The main route from the collection

Throws

  • An exception if it fails.

Implementation

Route? get mainRoute {
  final OperationResult resultString = objectMethod(
    pointerId,
    'MapViewRouteCollection',
    'getMainRoute',
  );

  final dynamic result = resultString['result'];
  if (result['empty'] == true) {
    return null;
  }
  return Route.init(result['oid'], mapId);
}
set mainRoute (Route? route)

Set the route as the main route in the collection.

Does not work unless the route is already in the collection.

Parameters

  • IN route The route to be set as the main route.

Throws

  • An exception if it fails.

Implementation

set mainRoute(final Route? route) {
  if (route == null) {
    ApiErrorServiceImpl.apiErrorAsInt = GemError.invalidInput.code;
    return;
  }

  objectMethod(
    pointerId,
    'MapViewRouteCollection',
    'setMainRoute',
    args: route.pointerId,
  );
}