Method CreateAsync
CreateAsync(Uri)
Creates a portal item object from a portal item Url.
Declaration
public static async Task<PortalItem> CreateAsync(Uri url)
Parameters
Type | Name | Description |
---|---|---|
System.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 - 200.5 |
.NET | 100.14 - 200.5 |
.NET Windows | 100.14 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.14 - 200.5 |
Xamarin.Android | 100.14 |
Xamarin.iOS | 100.14 - 100.15 |
UWP | 100.14 - 200.5 |
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 ArcGIS Online map viewer
URL (for maps only) in your portal. The item details page has this format:
http://www.arcgis.com/home/item.html?id=[item_id]
. The webmap viewer has this 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 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |
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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.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 ArcGIS Online map viewer
URL (for maps only) in your portal. The item details page has this format:
http://www.arcgis.com/home/item.html?id=[item_id]
. The webmap viewer has this 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 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |