getLaneImage method

Uint8List? getLaneImage({
  1. Size? size,
  2. ImageFileFormat? format,
  3. LaneImageRenderSettings renderSettings = const LaneImageRenderSettings(),
  4. bool allowResize = false,
})

Lane configuration image for the current position.

Renders an image showing the available lanes and which lane(s) to use for the upcoming maneuver. Customizable via size, format, and rendering settings. Returns null if lane information is unavailable.

Parameters

  • size: (Size?) Desired image dimensions.
  • format: (ImageFileFormat?) Image format (PNG, JPEG, etc.).
  • renderSettings: (LaneImageRenderSettings) Rendering configuration. Defaults to const LaneImageRenderSettings().
  • allowResize: (bool) Allow SDK to adjust size for optimal rendering. Defaults to false.

Returns

  • (Uint8List?) Lane image data, or null if not available.

See also:

Implementation

Uint8List? getLaneImage({
  final Size? size,
  final ImageFileFormat? format,
  final LaneImageRenderSettings renderSettings =
      const LaneImageRenderSettings(),
  final bool allowResize = false,
}) {
  return GemKitPlatform.instance.callGetImage(
    pointerId,
    'NavigationInstructionGetLaneImage',
    size?.width.toInt() ?? -1,
    size?.height.toInt() ?? -1,
    format?.id ?? -1,
    arg: jsonEncode(renderSettings),
    allowResize: allowResize,
  );
}