startIntroImage method
GemError
startIntroImage({
- required GemMapController controller,
- required Path track,
- required String outputPath,
- ImageFileFormat format = ImageFileFormat.png,
- ActivityVideoPreviewSettings settings = const ActivityVideoPreviewSettings(),
- required void onComplete(
- GemError error
Renders only the opening overview of the video and writes it to outputPath as a picture.
The picture matches the first frame of the video start renders with the same settings: the whole-track overview with the track, the dots and the watermark. Only the overview related settings are used. The render needs no video encoder and reports no progress.
Parameters
controller: The map used for rendering. It must stay mounted and visible until the render completes.track: The recorded track to render.outputPath: The path of the image file to write.format: The image file format, ImageFileFormat.png or ImageFileFormat.jpeg. Defaults to ImageFileFormat.png.settings: The render settings; only the overview related ones are used. Defaults to the native defaults.onComplete: Callback invoked once when the render finishes, unless the renderer is disposed first. The function is called with:error- GemError.success when the picture was written, otherwise the failure reason.
Returns
- GemError.success when the render started. Any other value means nothing started and
onCompleteis not called:- GemError.invalidInput when
formatis neither PNG nor JPEG, the track is unusable or the map is not available. - GemError.inUse when the previous render of this renderer has not called its
onCompleteyet, or another renderer is rendering on the same map. - GemError.missingCapability when the renderer is not available in this SDK.
- GemError.internalAbort when the render could not be scheduled.
- GemError.invalidInput when
See also:
- start - Render the fly-over video.
Implementation
GemError startIntroImage({
required GemMapController controller,
required Path track,
required String outputPath,
ImageFileFormat format = ImageFileFormat.png,
ActivityVideoPreviewSettings settings =
const ActivityVideoPreviewSettings(),
required void Function(GemError error) onComplete,
}) {
return _start(
'startIntroImage',
<String, dynamic>{
..._renderArgs(controller, track, outputPath, settings),
'imageFormat': format.id,
},
onComplete,
null,
);
}