saveAs

suspend fun saveAs(portal: Portal, folder: PortalFolder?, title: String, description: String, tags: Iterable<String>, thumbnail: BitmapDrawable?): Result<Unit>

Saves the feature collection as a new PortalItem (of type PortalItemType.FeatureCollection). To be saved, the FeatureCollection does not need to be associated with an existing PortalItem object but it must be loaded.

Once saved, the FeatureCollection.item will be populated with the new portal item. Note that if the FeatureCollection already had a valid PortalItem (either because the FeatureCollection was created using a portal item or was previously saved), the FeatureCollection.item will be replaced with a new PortalItem, effectively duplicating the feature collection on the portal.

Return

a Result indicating whether the feature collection was successfully saved. The result will be a failure with type:

Since

200.2.0

Parameters

portal

The portal to save the feature collection to.

folder

The folder in which to save the feature collection. If null, it will be added to the user's root folder.

title

The title of the feature collection.

description

The description of the feature collection.

tags

The tags to be associated with the newly created portal item.

thumbnail

The thumbnail of the feature collection.