Method CreateAsync
CreateAsync(Uri)
Creates a portal item object from a portal item Url.
Declaration
public static Task<PortalItem> CreateAsync(Uri url)
Parameters
Type | Name | Description |
---|---|---|
Uri | url | The Url of the portal item. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PortalItem> | The task object representing the asynchronous create operation. The value of the task result is a PortalItem object. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.14 - 100.15 |
.NET 6.0 | 100.14 - 100.15 |
.NET 6.0 Windows | 100.14 - 100.15 |
.NET Framework | 100.14 - 100.15 |
Xamarin.Android | 100.14 - 100.15 |
Xamarin.iOS | 100.14 - 100.15 |
UWP | 100.14 |
CreateAsync(ArcGISPortal, String)
Initializes a new instance of the PortalItem class from the specified item ID.
Declaration
public static Task<PortalItem> CreateAsync(ArcGISPortal portal, string itemId)
Parameters
Type | Name | Description |
---|---|---|
ArcGISPortal | portal | The ArcGIS portal. |
System.String | itemId | The item Id. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PortalItem> | The task object representing the asynchronous create operation. The value of the task result is a PortalItem object. |
Remarks
The portal itemId can be determined from the URL of the item details web page or the map viewer URL (for maps only) in your portal. The item details page has the following format (http://www.arcgis.com/home/item.html?id=[item_id]). The webmap viewer has the following format (http://www.arcgis.com/home/webmap/viewer.html?webmap=[item_id]). In both cases, the [item_id] can be used as the ID to instantiate a portal item.
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 |
Relevant samples
CreateAsync(ArcGISPortal, String, CancellationToken)
Initializes a new instance of the PortalItem class from the specified item ID.
Declaration
public static Task<PortalItem> CreateAsync(ArcGISPortal portal, string itemId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ArcGISPortal | portal | The ArcGIS portal. |
System.String | itemId | The item Id. |
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 create operation. The value of the task result is a PortalItem object. |
Remarks
The portal itemId can be determined from the URL of the item details web page or the map viewer URL (for maps only) in your portal. The item details page has the following format (http://www.arcgis.com/home/item.html?id=[item_id]). The webmap viewer has the following format (http://www.arcgis.com/home/webmap/viewer.html?webmap=[item_id]). In both cases, the [item_id] can be used as the ID to instantiate a portal item.
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 |