Method SaveAsync
SaveAsync(Boolean)
Saves any changes that have been made to the map to the associated PortalItem.
Declaration
public Task SaveAsync(bool forceSaveToSupportedVersion = false)
Parameters
Type | Name | Description |
---|---|---|
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 |
---|---|
Task | A task that represents the asynchronous save operation. |
Remarks
Asynchronous method to save any changes that have been made to the map. The map must have been constructed using the Map(PortalItem) constructor to associate it with a PortalItem object, and must be loaded.
Updates the map content data on the portal and also updates the portal item properties stored on the portal to match those stored within the map's PortalItem object.
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.15 |
SaveAsync(Boolean, CancellationToken)
Save any changes that have been made to the map to the associated PortalItem.
Declaration
public Task SaveAsync(bool forceSaveToSupportedVersion, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
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 | CancellationToken |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous save operation. |
Remarks
Asynchronous method to save any changes that have been made to the map allowing cancellation. The map must have been constructed using the Map(PortalItem) constructor to associate it with a PortalItem object, and must be loaded.
Updates the map content data on the portal and also updates the portal item properties stored on the portal to match those stored within the map's PortalItem object.
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 |