createDefaultExportVectorTilesParameters method
Creates and returns the default parameters for the export vector tile task.
This function is asynchronous because it makes use of the service metadata to populate the ExportVectorTilesParameters object. Calling this function will trigger the ExportVectorTilesTask to be loaded, unless it is already loaded.
The supported geometry types for the area of interest are Envelope and Polygon. The area of interest must have a spatial reference. Where a Polygon is supplied, tiles will be filtered according to the polygon geometry, which can help reduce the size of the resulting tile package. Note that the filtered set of tiles may vary, depending on the underlying service.
A max_scale of 0 will include all levels of detail of the service. Be careful when you provide a large area of interest or a small max_scale value as this could result in a large number of tiles being requested. If the number of tiles requested exceeds the service's maximum export tile count the ExportVectorTilesJob will fail.
Parameters:
areaOfInterest
— a Geometry specifying the area of vector tiles to be exported. Must not be null.maxScale
— the map scale '1:max_scale' which determines how far in to export the vector tiles. Set the value to 0 to include all levels of detail in the service.
Return Value: The ExportVectorTilesParameters.
Implementation
Future<ExportVectorTilesParameters> createDefaultExportVectorTilesParameters({
required Geometry areaOfInterest,
required double maxScale,
}) {
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore
.RT_ExportVectorTilesTask_createDefaultExportVectorTilesParametersAsync(
_handle,
areaOfInterest._handle,
maxScale,
errorHandler,
);
});
return taskHandle.toFuture(
(element) => element.getValueAsExportVectorTilesParameters()!,
);
}