Method SaveAsAsync
SaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerable<String>, Uri, Boolean)
Save the map to a new PortalItem.
Declaration
[Obsolete("Use SaveAsAsync(ArcGISPortal, PortalFolder, string, string, IEnumerable<string>, RuntimeImage, bool).")]
public Task<PortalItem> SaveAsAsync(ArcGISPortal portal, PortalFolder portalFolder, string title, string description, IEnumerable<string> tags, Uri thumbnailUri, bool forceSaveToSupportedVersion = false)
Parameters
Type | Name | Description |
---|---|---|
ArcGISPortal | portal | The portal to save the map to |
PortalFolder | portalFolder | The portal folder in which to save the map. If |
System.String | title | The title of the map. Cannot be empty |
System.String | description | The description of the map |
IEnumerable<System.String> | tags | The tags to be associated with the newly created portal item |
Uri | thumbnailUri | The thumbnail URL of the map |
Boolean | forceSaveToSupportedVersion | 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. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 map as a new portal item. 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.Exceptions
Type | Condition |
---|---|
InvalidOperationException | Map must be loaded before saving to a portal. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.14 |
SaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerable<String>, Uri, Boolean, CancellationToken)
Save the map to a new PortalItem.
Declaration
[Obsolete("Use SaveAsAsync(ArcGISPortal, PortalFolder, string, string, IEnumerable<string>, RuntimeImage, bool, CancellationToken).")]
public async Task<PortalItem> SaveAsAsync(ArcGISPortal portal, PortalFolder portalFolder, string title, string description, IEnumerable<string> tags, Uri thumbnailUri, bool forceSaveToSupportedVersion, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ArcGISPortal | portal | The portal to save the map to |
PortalFolder | portalFolder | The portal folder in which to save the map. If |
System.String | title | The title of the map. Cannot be empty |
System.String | description | The description of the map |
IEnumerable<System.String> | tags | The tags to be associated with the newly created portal item |
Uri | thumbnailUri | The thumbnail URL of the map |
Boolean | forceSaveToSupportedVersion | 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 | cancellationToken | The token to monitor for cancellation requests. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 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.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.14 |
SaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerable<String>, RuntimeImage, Boolean)
Save the map to a new PortalItem.
Declaration
public Task<PortalItem> SaveAsAsync(ArcGISPortal portal, PortalFolder portalFolder, string title, string description, IEnumerable<string> tags, RuntimeImage thumbnailImage = null, bool forceSaveToSupportedVersion = false)
Parameters
Type | Name | Description |
---|---|---|
ArcGISPortal | portal | The portal to save the map to |
PortalFolder | portalFolder | The portal folder in which to save the map. If |
System.String | title | The title of the map. Cannot be empty |
System.String | description | The description of the map |
IEnumerable<System.String> | tags | The tags to be associated with the newly created portal item |
RuntimeImage | thumbnailImage | The thumbnail of the map |
Boolean | forceSaveToSupportedVersion | 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. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 map as a new portal item. 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.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Map must be loaded before saving to a portal. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.1 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 100.14 |
SaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerable<String>, RuntimeImage, Boolean, CancellationToken)
Save the map to a new PortalItem.
Declaration
public async Task<PortalItem> SaveAsAsync(ArcGISPortal portal, PortalFolder portalFolder, string title, string description, IEnumerable<string> tags, RuntimeImage thumbnailImage, bool forceSaveToSupportedVersion, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ArcGISPortal | portal | The portal to save the map to |
PortalFolder | portalFolder | The portal folder in which to save the map. If |
System.String | title | The title of the map. Cannot be empty |
System.String | description | The description of the map |
IEnumerable<System.String> | tags | The tags to be associated with the newly created portal item |
RuntimeImage | thumbnailImage | The thumbnail of the map |
Boolean | forceSaveToSupportedVersion | 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 | cancellationToken | A CancellationToken with which to cancel the operation if required. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 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.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.1 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 100.14 |