exportAs method
- PathFileFormat format
Export route data in a standard file format.
Serializes route data into the requested format (for example GPX or KML) and returns the resulting
file contents as a UTF-8 string.
Parameters
format: The PathFileFormat describing the desired export format.
Returns
- A
Stringcontaining the exported route data in the requested format.
Implementation
String exportAs(final PathFileFormat format) {
final OperationResult resultString = objectMethod(
pointerId,
'RouteBase',
'exportAs',
args: format.index,
);
final String encodedResult = resultString['result'];
final Uint8List resultAsUint8List = base64Decode(encodedResult);
final String result = utf8.decode(resultAsUint8List);
return result;
}