PortalItem class final
An item (unit of content) stored in an ArcGIS portal, such as a layer, web map, package file, or map service.
ArcGIS portals support various types of portal items, including:
- Web maps and scenes.
- Services such as feature, map, scene, image, and OGC services that can be added as layers to a map.
- Data files that can be uploaded, stored, and downloaded, such as .mmpk or .vtpk files.
- Applications and tools.
Each portal item contains information about the item such as its unique ID, the owning Portal, and the type of item it is (PortalItemType). Portal items can be kept private to the users that created them, shared with other users in specific groups, or made public and accessible to everyone.
You can use the portal item ID along with a portal URL to quickly instantiate a new portal item object. The item's details page has the following URL format: https://www.arcgis.com/home/item.html?id=\[item_id]. If your portal item is a web map, you can also obtain a URL with the format: https://www.arcgis.com/home/webmap/viewer.html?webmap=\[item_id] from the ArcGIS Online Map Viewer. In both cases, you can use the [item_id] as the ID to instantiate a portal item.
Alternatively, you can obtain a portal item directly from a portal using a
method such as Portal.findItemsAsync(PortalQueryParameters)
.
- Inheritance
- Mixed in types
Constructors
-
PortalItem.fromJson(Map<
String, dynamic> json) -
factory
- PortalItem.fromJsonString(String jsonString)
-
factory
- PortalItem.withPortalAndItemId({required Portal portal, required String itemId})
-
Creates a portal item object using the specified portal and item ID.
factory
- PortalItem.withPortalAndType({required Portal portal, required PortalItemType type})
-
Creates a new portal item with the specified type in the specified portal.
factory
Properties
- access → PortalAccess
-
The portal item access.
no setter
- accessInformation ↔ String
-
The information on the source of the item and its copyright status.
getter/setter pairinherited
- averageRating → double
-
The average rating of this portal item.
no setter
- commentCount → int
-
The number of comments on this portal item.
no setter
- commentsEnabled → bool
-
True if the comments are allowed on the portal item, false otherwise.
no setter
- created → DateTime?
-
The date the item was created.
no setterinherited
- culture → String
-
The culture (language and country) of the portal item.
no setter
- description ↔ String
-
The description of the specified item.
getter/setter pairinherited
- extent ↔ Envelope?
-
The extent of the specified item.
getter/setter pairinherited
- folderId → String
-
The ID of the folder in which the owner has stored the item. The property
is only returned to users who are the item's owner or the org admin.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemId → String
-
The item ID of the specified item.
no setterinherited
- loadError → ArcGISException?
-
The load error.
no setterinherited
- loadStatus → LoadStatus
-
The load status.
no setterinherited
- modified → DateTime?
-
The date the item was last modified.
no setterinherited
- name → String
-
The name of this item.
no setterinherited
-
onLoadStatusChanged
→ Stream<
LoadStatus> -
A stream that reports changes to the
LoadStatus
.no setterinherited - owner → String
-
The username of the user who owns this portal item.
no setter
- portal → Portal
-
The ArcGIS portal that contains this portal item.
no setter
- ratingCount → int
-
The number of ratings on the portal item.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceUri → Uri
-
The URL of the service that this portal item represents. This only applies
to portal items that represent web-accessible resources such as map
services.
no setter
- size → int
-
The size of this portal item.
no setter
- snippet ↔ String
-
The short summary description of the specified item.
getter/setter pairinherited
- spatialReferenceName → String
-
The spatial reference name of the specified item.
no setterinherited
-
The user defined tags that describe the specified item.
no setterinherited
- termsOfUse ↔ String
-
The terms of use of the item.
getter/setter pairinherited
- thumbnail → LoadableImage?
-
The thumbnail of the item.
no setterinherited
- title ↔ String
-
The title of the specified item.
getter/setter pairinherited
- type ↔ PortalItemType
-
The GIS content type of this portal item.
getter/setter pair
-
typeKeywords
→ List<
String> -
An array of keywords that further describes the type of this item. Each
item is tagged with a set of type keywords that are derived based on its
primary type.
no setterinherited
- typeName → String
-
The type name of this portal item.
no setter
- uri → Uri?
-
The URL of this portal item.
no setter
- viewCount → int
-
The number of views of this portal item.
no setter
Methods
-
cancelLoad(
) → void -
Cancels loading metadata for the object.
inherited
-
fetchData(
) → Future< Uint8List> -
Fetches the item's data.
inherited
-
fetchDataCancelable(
) → CancelableOperation< Uint8List> -
Cancelable version of fetchData. See that method for more information.
inherited
-
load(
) → Future< void> -
Loads the metadata for the object asynchronously.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retryLoad(
) → Future< void> -
Loads or retries loading metadata for the object asynchronously.
inherited
-
setThumbnail(
{required ArcGISImage? image}) → void -
Sets the thumbnail of the item with the specified image.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
-
toJsonString(
) → String -
Returns a JSON representation of this Object as a String.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateItemProperties(
) → Future< void> -
Updates an item's properties in a file on disk when this item instance is
a LocalItem.
inherited
-
updateItemPropertiesCancelable(
) → CancelableOperation< void> -
Cancelable version of updateItemProperties. See that method for more
information.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
withJson(
String json, {required Portal portal}) → PortalItem? - Creates a portal item from the specified JSON string and portal.
-
withUri(
Uri uri) → PortalItem? - Creates a portal item from the specified portal item URL.