createRemovePlannedRouteCommandBatch function
JsonCommandBatch
createRemovePlannedRouteCommandBatch(
- String routeId, {
- Iterable<
String> iconUrls = const [], - CommandBuilderOptions options = const CommandBuilderOptions(namespace: 'crm-planned-route'),
Implementation
JsonCommandBatch createRemovePlannedRouteCommandBatch(
String routeId, {
Iterable<String> iconUrls = const [],
CommandBuilderOptions options = const CommandBuilderOptions(
namespace: 'crm-planned-route',
),
}) {
final ids = getPlannedRouteCommandIds(
routeId,
namespace: options.namespace,
origin: options.origin,
);
return buildCommandBatch([
mapCommand('source', 'remove', {'sourceId': ids.sourceId}),
mapCommand('image', 'remove', {'imageId': ids.arrowImageId}),
for (final url in iconUrls.toSet())
mapCommand('image', 'remove', {'imageId': _pointImageId(url, options)}),
], options: options);
}