Show / Hide Table of Contents

Method SaveAsAsync

SaveAsAsync(ArcGISPortal, PortalFolder?, string, string, IEnumerable<string>, RuntimeImage?)

Save the FeatureCollection to a new PortalItem.

Declaration
public Task<PortalItem> SaveAsAsync(ArcGISPortal portal, PortalFolder? folder, string title, string description, IEnumerable<string> tags, RuntimeImage? thumbnailImage = null)
Parameters
Type Name Description
ArcGISPortal portal

The portal to save the map to

PortalFolder folder

The portal folder in which to save the map. If null is passed it will be saved to the user's root folder.

string title

The title of the map. Cannot be empty

string description

The description of the map

IEnumerable<string> tags

The tags to be associated with the newly created portal item

RuntimeImage thumbnailImage

The thumbnail of the map

Returns
Type Description
Task<PortalItem>

The task object representing the asynchronous save as operation. The value of the task result is a PortalItem object.

Remarks

Asynchronous method to save a FeatureCollection as a new portal item. The FeatureCollection does not need to be associated with an existing PortalItem object. The FeatureCollection must be loaded. The result is a reference to the new PortalItem which the FeatureCollection is now associated with.

Note that if the FeatureCollection was already associated with a PortalItem object (either because the FeatureCollection was created using a PortalItem or was previously saved), that object will be replaced with a new PortalItem, effectively duplicating the FeatureCollection on the portal.

Exceptions
Type Condition
ArgumentNullException

portal, title, or tags are null.

InvalidOperationException

FeatureCollection isn't loaded -or- portal is accessed anonymously.

LicensingException

Current license does not allow editing portal content

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.2 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.1 - 200.8
Xamarin.Android100.1 - 100.14
Xamarin.iOS100.1 - 100.15
UWP100.1 - 200.8

SaveAsAsync(ArcGISPortal, PortalFolder?, string, string, IEnumerable<string>, RuntimeImage?, CancellationToken)

Save the FeatureCollection to a new PortalItem.

Declaration
public Task<PortalItem> SaveAsAsync(ArcGISPortal portal, PortalFolder? folder, string title, string description, IEnumerable<string> tags, RuntimeImage? thumbnailImage, CancellationToken cancellationToken)
Parameters
Type Name Description
ArcGISPortal portal

The portal to save the map to

PortalFolder folder

The portal folder in which to save the map. If null is passed it will be saved to the user's root folder.

string title

The title of the map. Cannot be empty

string description

The description of the map

IEnumerable<string> tags

The tags to be associated with the newly created portal item

RuntimeImage thumbnailImage

The thumbnail of the map

CancellationToken cancellationToken

A CancellationToken with which to cancel the operation if required.

Returns
Type Description
Task<PortalItem>

The task object representing the asynchronous save as operation. The value of the task result is a PortalItem object.

Remarks

Asynchronous method to save a FeatureCollection as a new portal item allowing cancellation. The FeatureCollection does not need to be associated with an existing PortalItem object. The FeatureCollection must be loaded. The result is a reference to the new PortalItem which the FeatureCollection is now associated with.

Note that if the FeatureCollection was already associated with a PortalItem object (either because the FeatureCollection was created using a PortalItem or was previously saved), that object will be replaced with a new PortalItem, effectively duplicating the FeatureCollection on the portal.

Exceptions
Type Condition
ArgumentNullException

portal, title, or tags are null.

InvalidOperationException

FeatureCollection isn't loaded -or- portal is accessed anonymously.

LicensingException

Current license does not allow editing portal content

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.2 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.1 - 200.8
Xamarin.Android100.1 - 100.14
Xamarin.iOS100.1 - 100.15
UWP100.1 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.