Click or drag to resize

MapSaveAsAsync Method (ArcGISPortal, PortalFolder, String, String, IEnumerableString, Uri, Boolean, CancellationToken)

Save the map to a new PortalItem.

Namespace:  Esri.ArcGISRuntime.Mapping
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.6.0.0
Syntax
C#
public Task<PortalItem> SaveAsAsync(
	ArcGISPortal portal,
	PortalFolder portalFolder,
	string title,
	string description,
	IEnumerable<string> tags,
	Uri thumbnailUri,
	bool forceSaveToSupportedVersion,
	CancellationToken cancellationToken
)

Parameters

portal
Type: Esri.ArcGISRuntime.PortalArcGISPortal
The portal to save the map to
portalFolder
Type: Esri.ArcGISRuntime.PortalPortalFolder
The portal folder in which to save the map. If null is passed it will be saved to the user's root folder.
title
Type: SystemString
The title of the map. Cannot be empty
description
Type: SystemString
The description of the map
tags
Type: System.Collections.GenericIEnumerableString
The tags to be associated with the newly created portal item
thumbnailUri
Type: SystemUri
The thumbnail URL of the map
forceSaveToSupportedVersion
Type: SystemBoolean
Flag to indicate whether the map should be saved to the supported webmap version that the API supports (see system requirements). This may cause data loss as unknown data is not saved. If true, unknown data will be removed and the map will be saved. If false, the operation will fail if the map contains unknown data that will not be saved. This flag can be used to provide a warning to users that some map data may be lost when the map is saved.
cancellationToken
Type: System.ThreadingCancellationToken
The token to monitor for cancellation requests. The default value is None.

Return Value

Type: TaskPortalItem
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 map as a new portal item allowing cancellation. The map does not need to be associated with an existing PortalItem object. The map must be loaded. The result is a reference to the new PortalItem which the map is now associated with.

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

This method is obsolete since 100.1. Use SaveAsAsync method taking RuntimeImage thumbnail instead.

See Also