Click or drag to resize

PortalItem Class

Represents an item (a unit of content) in the portal. An item may have associated binary or textual data which is available via the GetDataAsync. For example an item of type map package returns the actual bits corresponding to the map package via the item data resource.
Inheritance Hierarchy

Namespace:  Esri.ArcGISRuntime.Portal
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.7.0.0
Syntax
C#
public sealed class PortalItem : Item

The PortalItem type exposes the following members.

Constructors
  NameDescription
Public methodPortalItem(ArcGISPortal)
Initializes a new instance of the PortalItem class. Creates an empty portal item object for the specified portal.
Public methodPortalItem(String, ArcGISPortal)
Initializes a new instance of the PortalItem class. Creates a portal item object from a JSON string and a portal.
Public methodPortalItem(ArcGISPortal, PortalItemType)
Initializes a new instance of the PortalItem class. Creates a new portal item object with the specified type for the specified portal.
Public methodPortalItem(ArcGISPortal, PortalItemType, String)
Initializes a new instance of the PortalItem class. Creates a new portal item object with the specified type and title for the specified portal.
Top
Properties
  NameDescription
Public propertyAccess
Gets or sets the access level on the item. Private is the default and only the item owner can access. Shared allows the item to be shared with a specific group. Setting to Organization restricts item access to members of your organization. If Public, all users can access the item.
Public propertyAccessAndUseConstraintsHtml
Gets or sets the license information, restrictions and use constraints.
Public propertyAccessAndUseContraintsHtml
Gets or sets the license information, restrictions and use constraints.
Public propertyAccessInformation
Gets or sets the information on the source of the item.
(Inherited from Item.)
Public propertyAverageRating
Gets the average rating for this portal item.
Public propertyCommentCount
Gets the number of comments on the portal item.
Public propertyCreated
Gets the date the item was created.
(Inherited from Item.)
Public propertyCulture
Gets the item locale (language and country) information.
Public propertyCode exampleDescription
Gets or sets the detailed description of the item.
(Inherited from Item.)
Public propertyExtent
Gets or sets the bounding extent of the item (in geographical coordinates)
(Inherited from Item.)
Public propertyFolderId
Gets or sets the ID of the folder in which the owner has stored the item. The property is only returned to the item owner or the org admin.
Public propertyGuid
Gets the GUID of this portal item.
Public propertyIsCommentsEnabled
Gets a value indicating whether comments are allowed on this portal item.
Public propertyCode exampleItemId
Gets or sets the unique id for this item.
(Inherited from Item.)
Public propertyCode exampleModified
Gets the date the item was modified.
(Inherited from Item.)
Public propertyCode exampleName
Gets or sets the name of this portal item.
Public propertyOwner
Gets the username of the user who owns this portal item.
Public propertyPortal
Gets the ArcGIS portal containing the item.
Public propertyRatingCount
Gets the number of ratings on the portal item.
Public propertyServiceUrl
Gets the URL of the service that this portal item represents. Applies only to items that represent web-accessible resources such as map services.
Public propertySize
Gets the size of the portal item.
Public propertySnippet
Gets or sets the summary description of the item.
(Inherited from Item.)
Public propertySpatialReferenceName
Gets or sets the item's spatial reference name.
(Inherited from Item.)
Public propertyCode exampleTags
Gets the mutable list of user defined tags that are words or short phrases that describe the item.
(Inherited from Item.)
Public propertyTermsOfUse
Gets or sets the terms of use of this portal item.
(Overrides ItemTermsOfUse.)
Public propertyCode exampleThumbnail
Gets this item's thumbnail image.
(Overrides ItemThumbnail.)
Public propertyThumbnailUri
Gets the URI of the thumbnail image used for this portal item.
(Overrides ItemThumbnailUri.)
Public propertyCode exampleTitle
Gets or sets the item title. This is the name that is displayed to users and by which they refer to the item. Every item must have a title.
(Inherited from Item.)
Public propertyCode exampleType
Gets the GIS content type of this portal item. A portal item's type cannot be changed once it has an item ID; create a new portal item if you wish to change the type.
Public propertyTypeKeywords
Gets the mutable list 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. Update this list only if you wish to add additional type keywords.
(Inherited from Item.)
Public propertyTypeName
Gets the type name of this portal item.
Public propertyUnknownJson
Gets unknown data from the source JSON.
Public propertyUnsupportedJson
Gets unsupported data from the source JSON.
Public propertyCode exampleUrl
Gets the URL of this portal item.
Public propertyViewCount
Gets the number of views of this portal item.
Top
Methods
  NameDescription
Public methodAddCommentAsync(String)
Adds a comment to an item. Available only to authenticated users who have access to the item.
Public methodAddCommentAsync(String, CancellationToken)
Adds a comment to an item. Available only to authenticated users who have access to the item.
Public methodAddRatingAsync(Double)
Adds a rating to an item that you have access to. Only one rating can be given to an item per user. If this call is made on an already rated item, the new rating will overwrite the current one. A user cannot rate their own item. Available only to authenticated users.
Public methodAddRatingAsync(Double, CancellationToken)
Adds a rating to an item that you have access to. Only one rating can be given to an item per user. If this call is made on an already rated item, the new rating will overwrite the current one. A user cannot rate their own item. Available only to authenticated users.
Public methodStatic memberCode exampleCreateAsync(Uri, Credential)
Creates a portal item object from a portal item Url.
Public methodStatic memberCode exampleCreateAsync(ArcGISPortal, String)
Initializes a new instance of the PortalItem class from the specified item ID.
Public methodStatic memberCode exampleCreateAsync(ArcGISPortal, String, CancellationToken)
Initializes a new instance of the PortalItem class from the specified item ID.
Public methodGetCommentsAsync
Gets the comments for the item that you have access to. Available only to authenticated users.
Public methodGetCommentsAsync(CancellationToken)
Gets the comments for the item that you have access to. Available only to authenticated users.
Public methodGetDataAsync
Gets the item data. The data component of an item (the "item file") is used to stream the actual data represented by the item to the client. This resource is available only for the file and text item types.
(Overrides ItemGetDataAsync.)
Public methodCode exampleGetDataAsync(CancellationToken, String)
Gets the item data. The data component of an item (the "item file") is used to stream the actual data represented by the item to the client. This resource is available only for the file and text item types.
Public methodGetGroupsAsync
Gets the groups that this item belongs to. Only those groups that are visible to the current portal user will be returned.
Public methodGetGroupsAsync(CancellationToken)
Gets the groups the item is a part of. Only shows the groups which the calling user can access.
Public methodGetThumbnailDataAsync
Get the thumbnail image data for this portal item.
Public methodSetThumbnail
Sets the thumbnail for this portal item from the given data stream.
(Overrides ItemSetThumbnail(Stream).)
Public methodSetThumbnailWithImage
Sets the thumbnail for this portal item from the given data stream.
Public methodShareWithAsync(Boolean, Boolean)
Shares the portal item with everyone or just with the user's organization. If both 'everyone' and 'organization' arguments are true, the item will be shared with everyone (Public). If both 'everyone' and 'organization' arguments are false, the item will be made private, unless the item has been shared with one or more groups. In that case, the items Access property will be set to Shared. The groups an item has been shared with are not affected by this method. This Method is available only to authenticated users.
Public methodShareWithAsync(Boolean, Boolean, CancellationToken)
Shares the portal item with everyone or just with the user's organization. If both 'everyone' and 'organization' arguments are true, the item will be shared with everyone (Public). If both 'everyone' and 'organization' arguments are false, the item will be made private, unless the item has been shared with one or more groups. In that case, the items Access property will be set to Shared. The groups an item has been shared with are not affected by this method. This Method is available only to authenticated users.
Public methodShareWithGroupsAsync(IEnumerablePortalGroup)
Shares this PortalItem with the specified list of PortalGroup. This Method is available only to authenticated users.
Public methodShareWithGroupsAsync(IEnumerablePortalGroup, CancellationToken)
Shares this PortalItem with the specified list of PortalGroup. This Method is available only to authenticated users.
Public methodToJson
Serializes the item to a JSON string.
Public methodUnshareAsync
Unshare (make private) this portal item.
Public methodUnshareAsync(CancellationToken)
Unshare (make private) this portal item.
Public methodUnshareGroupsAsync(IEnumerablePortalGroup)
Stops sharing this PortalItem with the specified list of PortalGroup. This Method is available only to authenticated users.
Public methodUnshareGroupsAsync(IEnumerablePortalGroup, CancellationToken)
Stops sharing this PortalItem with the specified list of PortalGroup. This Method is available only to authenticated users.
Public methodUpdateDataAsync(Stream)
Updates the file data for this portal item on the portal asynchronously. This call is available to the item owner and the administrator of the organization.
Public methodUpdateDataAsync(String)
Updates the JSON data for this portal item on the portal asynchronously. This call is available to the item owner and the administrator of the organization.
Public methodUpdateDataAsync(Stream, CancellationToken)
Updates the file data for this portal item on the portal asynchronously. This call is available to the item owner and the administrator of the organization.
Public methodUpdateDataAsync(String, CancellationToken)
Updates the JSON data for this portal item on the portal asynchronously. This call is available to the item owner and the administrator of the organization.
Public methodUpdateItemPropertiesAsync
Executes an asynchronous operation to update any item properties that have been changed.
(Inherited from Item.)
Public methodUpdateItemPropertiesAsync(CancellationToken)
Executes an asynchronous operation to update any item properties that have been changed.
(Inherited from Item.)
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Item.)
Top
Remarks

ArcGISPortal Class is the gateway to build applications with Esri's cloud infrastructure of ArcGIS Online or ArcGIS Portal. ArcGIS Portal is software technology from Esri that customers can deploy either on premise or in the cloud. ArcGIS Online is Esri's Software as a Service offering that represents GIS as a Service and is implemented using the same technology as ArcGIS Portal. The classes in the Esri.ArcGISRuntime.Portal namespace allow developers to work with users, groups and content hosted within ArcGIS Online or within an ArcGIS Portal.

The portal item ID can be used along with a portal URL to quickly instantiate a new portal item object. The ID 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.

A PortalItem is an item of content in the ArcGISPortal Class. There are several ways to obtain an PortalItem via the Esri.ArcGISRuntime.Portal Assembly; they include:

Examples

Android

Example Name: OpenStreetMapLayer

Add OpenStreetMap as a basemap layer.

Code example screen shot.

C#
// Copyright 2019 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific 
// language governing permissions and limitations under the License.

using Android.App;
using Android.OS;
using Android.Widget;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.UI.Controls;

namespace ArcGISRuntimeXamarin.Samples.OpenStreetMapLayer
{
    [Activity (ConfigurationChanges=Android.Content.PM.ConfigChanges.Orientation | Android.Content.PM.ConfigChanges.ScreenSize)]
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        "OpenStreetMap layer",
        "Layers",
        "Display an OpenStreetMap layer as a basemap.",
        "")]
    public class OpenStreetMapLayer : Activity
    {
        // Create and hold reference to the used MapView.
        private MapView _myMapView;

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Title = "OpenStreetMap layer";

            CreateLayout();
            Initialize();
        }

        private void Initialize()
        {
            // Create the OpenStreetMap basemap.
            Basemap osmBasemap = Basemap.CreateOpenStreetMap();

            // Create the map with the OpenStreetMap basemap.
            Map osmMap = new Map(osmBasemap);

            // Show the map in the view.
            _myMapView.Map = osmMap;
        }

        private void CreateLayout()
        {
            // Create a new vertical layout for the app.
            var layout = new LinearLayout(this) {Orientation = Orientation.Vertical};

            // Add the map view to the layout.
            _myMapView = new MapView(this);
            layout.AddView(_myMapView);

            // Show the layout in the app.
            SetContentView(layout);
        }
    }
}
Examples

Xamarin Forms Android

Example Name: OpenMapURL

Display a web map.

Code example screen shot.

C#
// Copyright 2016 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific 
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime.Mapping;
using System;
using System.Linq;
using Xamarin.Forms;

namespace ArcGISRuntime.Samples.OpenMapURL
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        "Open map (URL)",
        "Map",
        "This sample demonstrates how to open an existing map from a portal. The sample opens with a map displayed by default. You can change the shown map by selecting a new one from the populated list.",
        "")]
    public partial class OpenMapURL : ContentPage
    {
        // String array to hold urls to publicly available web maps
        private string[] itemURLs = {
            "https://www.arcgis.com/home/item.html?id=392451c381ad4109bf04f7bd442bc038",
            "https://www.arcgis.com/home/item.html?id=01f052c8995e4b9e889d73c3e210ebe3",
            "https://www.arcgis.com/home/item.html?id=92ad152b9da94dee89b9e387dfe21acd"
        };

        // String array to store titles for the webmaps specified above. These titles are in the same order as the urls above
        private string[] titles = {
            "Population Pressure",
            "USA Tapestry Segmentation",
            "Geology of United States"
        };

        public OpenMapURL()
        {
            InitializeComponent ();

            // Create the UI, setup the control references and execute initialization 
            Initialize();
        }

        private void Initialize()
        {
            // Create a new Map instance with url of the webmap that is displayed by default
            Map myMap = new Map(new Uri(itemURLs[0]));

            // Provide used Map to the MapView
            MyMapView.Map = myMap;
        }

        private async void OnMapsClicked(object sender, EventArgs e)
        {
            // Show sheet and get title from the selection
            string selectedMapTitle = 
                await ((Page)Parent).DisplayActionSheet("Select map", "Cancel",null, titles);

            // If selected cancel do nothing
            if (selectedMapTitle == null || selectedMapTitle == "Cancel") return;

            // Get index that is used to get the selected url
            int selectedIndex = titles.ToList().IndexOf(selectedMapTitle);

            // Create a new Map instance with url of the webmap that selected
            MyMapView.Map = new Map(new Uri(itemURLs[selectedIndex]));
        }
    }
}
XAML
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"             
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
             xmlns:mapping="clr-namespace:Esri.ArcGISRuntime.Mapping;assembly=Esri.ArcGISRuntime" 
             x:Class="ArcGISRuntime.Samples.OpenMapURL.OpenMapURL">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
      <Button x:Name="MapsButton" Text="Maps" Clicked="OnMapsClicked"></Button>
      <esriUI:MapView x:Name="MyMapView" Grid.Row="1"/>
  </Grid>
</ContentPage>
See Also
Additional Examples
Hyperlink to ExampleDescription
AccessLoadStatusDetermine the map's load status which can be: `NotLoaded`, `FailedToLoad`, `Loading`, `Loaded`.
AddAnIntegratedMeshLayerView an integrated mesh layer from a scene service.
AddEncExchangeSetDisplay nautical charts per the ENC specification.
AddFeaturesAdd features to a feature layer.
AddGraphicsRendererChange the style of all graphics in a graphics overlay by referencing a single symbol style.
AddGraphicsWithSymbolsUse a symbol style to display a graphic on a graphics overlay.
AddPointSceneLayerView a point scene layer from a scene service.
AnalyzeHotspotsUse a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots.
AnalyzeViewshedCalculate a viewshed using a geoprocessing service, in this case showing what parts of a landscape are visible from points on mountainous terrain.
Animate3DGraphicAn `OrbitGeoElementCameraController` follows a graphic while the graphic's position and rotation are animated.
ApplyScheduledUpdatesApply scheduled updates to a downloaded preplanned map area.
ArcGISMapImageLayerUrlAdd an ArcGIS Map Image Layer from a URL to a map.
ArcGISTiledLayerUrlLoad an ArcGIS tiled layer from a URL.
ArcGISVectorTiledLayerUrlLoad an ArcGIS Vector Tiled Layer from a URL.
AuthorMapCreate and save a map as an ArcGIS `PortalItem` (i.e. web map).
BrowseWfsLayersBrowse a WFS service for layers.
BufferCreate a buffer around a map point and display the results as a `Graphic`
BufferListGenerate multiple individual buffers or a single unioned buffer around multiple points.
ChangeAtmosphereEffectChanges the appearance of the atmosphere in a scene.
ChangeBasemapChange a map's basemap. A basemap is beneath all layers on an `Map` and is used to provide visual reference for the operational layers.
ChangeBlendRendererBlend a hillshade with a raster by specifying the elevation data. The resulting raster looks similar to the original raster, but with some terrain shading, giving it a textured look.
ChangeEncDisplaySettingsConfigure the display of ENC content.
ChangeFeatureLayerRendererChange the appearance of a feature layer with a renderer.
ChangeStretchRendererUse a stretch renderer to enhance the visual contrast of raster data for analysis.
ChangeSublayerRendererApply a renderer to a sublayer.
ChangeSublayerVisibilityChange the visibility of sublayers.
ChangeTimeExtentThis sample demonstrates how to filter data in layers by applying a time extent to a MapView.
ChangeViewpointSet the map view to a new viewpoint.
ChooseCameraControllerControl the behavior of the camera in a scene.
ClipGeometryClip a geometry with another geometry.
ClosestFacilityFind a route to the closest facility from a location.
ClosestFacilityStaticFind routes from several locations to the respective closest facility.
ControlAnnotationSublayerVisibilityUse annotation sublayers to gain finer control of annotation layer subtypes.
ConvexHullCreate a convex hull for a given set of points. The convex hull is a polygon with shortest perimeter that encloses a set of points. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails.
ConvexHullListThis sample demonstrates how to use the GeometryEngine.ConvexHull to generate convex hull polygon(s) from multiple input geometries.
CreateAndSaveKmlFileConstruct a KML document and save it as a KMZ file.
CreateFeatureCollectionLayerCreate a Feature Collection Layer from a Feature Collection Table, and add it to a map.
CreateGeometriesCreate simple geometry types.
CreateTerrainSurfaceFromRasterUse a terrain surface with elevation described by a raster file.
CreateTerrainSurfaceFromTilePackageSet the terrain surface with elevation described by a local tile package.
CustomDictionaryStyleUse a custom dictionary style (.stylx) to symbolize features using a variety of attribute values.
CutGeometryCut a geometry along a polyline.
DeleteFeaturesDelete features from an online feature service.
DensifyAndGeneralizeA multipart geometry can be densified by adding interpolated points at regular intervals. Generalizing multipart geometry simplifies it while preserving its general shape. Densifying a multipart geometry adds more vertices at regular intervals.
DictionaryRendererGraphicsOverlayRender graphics with mil2525d symbols.
DisplayAnnotationDisplay annotation from a feature service URL.
DisplayDeviceLocationDisplay your current position on the map, as well as switch between different types of auto pan Modes.
DisplayDrawingStatusGet the draw status of your map view or scene view to know when all layers in the map or scene have finished drawing.
DisplayGridDisplay coordinate system grids including Latitude/Longitude, MGRS, UTM and USNG on a map view. Also, toggle label visibility and change the color of grid lines and grid labels.
DisplayKmlLoad and display KML from a URL, a local file, or a portal item.
DisplayKmlNetworkLinks Display a file with a KML network link.
DisplayLayerViewStateView the status of the layers on the map.
DisplayMapDisplay a map with an imagery basemap.
DisplaySceneDisplay a scene with a terrain surface and some imagery.
DisplayWfsDisplay a layer from a WFS service, requesting only features for the current extent.
DistanceMeasurementMeasure distances between two points in 3D.
DownloadPreplannedMapTake a map offline using an available preplanned map area.
EditAndSyncFeaturesSynchronize offline edits with a feature service.
EditFeatureAttachmentsAdd, delete, and download attachments for features from a service.
EditKmlGroundOverlayEdit the values of a KML ground overlay.
ExportTilesDownload tiles to a local tile cache file stored on the device.
FeatureCollectionLayerFromPortalThis sample demonstrates opening a feature collection saved as a portal item.
FeatureCollectionLayerFromQueryCreate a feature collection layer to show a query result from a service feature table. The feature collection is then displayed on a map with a feature collection layer.
FeatureLayerDefinitionExpressionLimit the features to display on the map using a definition expression.
FeatureLayerDictionaryRendererConvert features into graphics to show them with mil2525d symbols.
FeatureLayerExtrusionExtrude features based on their attributes.
FeatureLayerGeodatabaseDisplay features from a local geodatabase.
FeatureLayerGeoPackageDisplay features from a local GeoPackage.
FeatureLayerQueryFind features in a feature table which match an SQL query.
FeatureLayerRenderingModeMapRender features statically or dynamically by setting the feature layer rendering mode.
FeatureLayerRenderingModeSceneRender features in a scene statically or dynamically by setting the feature layer rendering mode.
FeatureLayerSelectionSelect features in a feature layer.
FeatureLayerShapefileOpen a shapefile stored on the device and display it as a feature layer with default symbology.
FeatureLayerTimeOffsetShow data from the same service side-by-side with a time offset. This allows for the comparison of data over time.
FeatureLayerUrlShow a feature layer on a map using the URL to the service.
FindAddressFind the location for an address.
FindPlaceFind places of interest near a location or within a specific area.
FindRouteDisplay directions for a route between two points.
FindServiceAreaFind the service area within a network from a given point.
FindServiceAreasForMultipleFacilitiesFind the service areas of several facilities from a feature service.
FormatCoordinatesFormat coordinates in a variety of common notations.
GenerateGeodatabaseGenerate a local geodatabase from an online feature service.
GenerateOfflineMapTake a web map offline.
GenerateOfflineMapWithOverridesUse the `OfflineMapTask` with overrides to take a webmap offline. The overrides workflow allows you to adjust the settings used for taking each layer in the map offline. For a simple example of how you take a map offline, please consult the "Generate Offline Map" sample.
GeodatabaseTransactionsThis sample demonstrates how to manage edits to a local geodatabase inside of transactions.
GeodesicOperationsThis sample demonstrates how to perform geodesic operations on geometries using the GeometryEngine. Geodesic calculations take into account the curvature of the Earth, while planar calculations are based on a 2D Cartesian plane.
GeoViewSyncKeep the view points of two views (a MapView and a SceneView in this case) synchronized with each other.
GetElevationAtPointGet the elevation for a given point on a surface in a scene.
GroupLayersGroup a collection of layers together and toggle their visibility as a group.
HonorMobileMapPackageExpirationAccess the expiration information of an expired mobile map package.
IdentifyGraphicsDisplay an alert message when a graphic is clicked.
IdentifyKmlFeaturesThis sample demonstrates how to identify features in a KML layer. Identified feature attributes are displayed in a callout to simulate a popup.
IdentifyLayersIdentify features in all layers in a map. MapView supports identifying features across multiple layers. Because some layer types have sublayers, the sample recursively counts results for sublayers within each layer.
IntegratedWindowsAuthUse Windows credentials to access services hosted on a portal secured with Integrated Windows Authentication (IWA).
LineOfSightGeoElementShow a line of sight between two moving objects.
LineOfSightLocationPerform a line of sight analysis between two points in real time.
ListGeodatabaseVersionsThis sample calls a custom GeoprocessingTask to get a list of available versions for an enterprise geodatabase. The task returns a table of geodatabase version information, which is displayed in the app as a list.
ListKmlContentsList the contents of a KML file. KML files can contain a hierarchy of features, including network links to other KML content.
ListRelatedFeaturesList features related to the selected feature.
ListTransformationsGet a list of suitable transformations for projecting a geometry between two spatial references with different horizontal datums.
LoadWebTiledLayerDisplay a tiled web layer.
ManageBookmarksAccess and create bookmarks on a map.
ManageOperationalLayersAdd, remove, and reorder operational layers in a map.
MapImageLayerTablesFind features in a spatial table related to features in a non-spatial table.
MapImageSublayerQueryFind features in a sublayer based on attributes and location.
MapReferenceScaleSet a map's reference scale and control which feature layers should honor that scale.
MapRotationRotate a map.
MobileMapSearchAndRouteDisplay maps and use locators to enable search and routing offline using a Mobile Map Package.
NavigateRouteUse a routing service to navigate between points.
NavigateRouteReroutingNavigate between two points and dynamically recalculate an alternate route when the original route is unavailable.
NearestVertexShows how to find the nearest vertex on a geometry to a given point.
OAuthThis sample demonstrates how to authenticate with ArcGIS Online (or your own portal) using OAuth2 to access secured resources (such as private web maps or layers). Accessing secured items requires a login on the portal that hosts them (an ArcGIS Online account, for example).
OfflineBasemapByReferenceUse the `OfflineMapTask` to take a web map offline, but instead of downloading an online basemap, use one which is already on the device.
OfflineGeocodeGeocode addresses to locations and reverse geocode locations to addresses offline.
OfflineRoutingSolve a route on-the-fly using offline data.
OpenMapURLDisplay a web map.
OpenMobileMapDisplay a map from a mobile map package.
OpenMobileScenePackageOpen and display a scene from a Mobile Scene Package (.mspk).
OpenSceneOpen a scene from a Portal item. Just like Web Maps are the ArcGIS format for maps, Web Scenes are the ArcGIS format for scenes. These scenes can be stored in ArcGIS Online or Portal.
OpenStreetMapLayerAdd OpenStreetMap as a basemap layer.
PlayKmlToursPlay tours in KML files.
ProjectProject a point from one spatial reference to another.
ProjectWithSpecificTransformationThis sample demonstrates how to use the GeometryEngine with a specified geographic transformation to transform a geometry from one coordinate system to another.
QueryFeatureCountAndExtentZoom to features matching a query and count the features in the current visible extent.
RasterColormapRendererApply a colormap renderer to a raster.
RasterHillshadeUse a hillshade renderer on a raster.
RasterLayerFileCreate and use a raster layer made from a local raster file.
RasterLayerGeoPackageOpen a `GeoPackage`, obtain a raster from the package, and display the table as a `RasterLayer`.
RasterLayerImageServiceRasterCreate a raster layer from a raster image service.
RasterLayerRasterFunctionShow a raster layer from an image service with a raster function applied.
RasterRenderingRuleDisplay a raster on a map and apply different rendering rules to that raster.
RasterRgbRendererUse an `RGBRenderer` on a `RasterLayer`. An `RGBRenderer` is used to adjust the color bands of a multispectral image.
ReadGeoPackageAdd rasters and feature tables from GeoPackages to a map.
ReadShapefileMetadataRead a shapefile and display its metadata.
RenderPictureMarkersUse pictures for markers.
RenderSimpleMarkersShow a simple marker symbol on a map.
RenderUniqueValuesRender features in a layer using a distinct symbol for each unique attribute value.
ReverseGeocodeUse an online service to find the address for a tapped point.
RouteAroundBarriersFind a route that reaches all stops without crossing any barriers.
SceneLayerSelectionIdentify GeoElements in a scene layer.
SceneLayerUrlDisplay an ArcGIS scene layer from a URL.
ScenePropertiesExpressionsUpdate the orientation of a graphic using scene property rotation expressions.
SceneSymbolsShow various kinds of 3D symbols in a scene.
SearchPortalMapsFind webmap portal items by using a search term.
SelectEncFeaturesSelect features in an ENC layer.
ServiceFeatureTableCacheDisplay a feature layer from a service using the **on interaction cache** feature request mode.
ServiceFeatureTableManualCacheDisplay a feature layer from a service using the **manual cache** feature request mode.
ServiceFeatureTableNoCacheDisplay a feature layer from a service using the **no cache** feature request mode.
SetInitialMapAreaDisplay the map at an initial viewpoint representing a bounding geometry.
SetInitialMapLocationDisplay a map centered on an initial point with a specified level of detail (zoom level).
SetMapSpatialReferenceSpecify a map's spatial reference.
SetMinMaxScaleRestrict zooming between specific scale ranges.
ShowCalloutShow a callout with the latitude and longitude of user-tapped points.
ShowLabelsOnLayerDisplay custom labels on a feature layer.
ShowLocationHistoryDisplay your location history on the map.
ShowMagnifierTap and hold on a map to show a magnifier.
SimpleRenderersDisplay common symbols for all graphics in a graphics overlay with a renderer.
SketchOnMapUse the Sketch Editor to edit or sketch a new point, line, or polygon geometry on to a map.
SpatialOperationsFind the union, intersection, or difference of two geometries.
SpatialRelationshipsDetermine spatial relationships between two geometries.
StatisticalQueryQuery a table to get aggregated statistics back for a specific field.
StatsQueryGroupAndSortQuery a feature table for statistics, grouping and sorting by different fields.
StyleWmsLayerDiscover available styles and apply them to WMS sublayers.
SurfacePlacementsPosition graphics relative to a surface using different surface placement modes.
SymbolizeShapefileDisplay a shapefile with custom symbology.
SymbolsFromMobileStyleOpen a mobile style (.stylx) and read its contents. Combine several symbols from the style into a single multilayer point symbol, then use it to display graphics in the map view.
TakeScreenshotTake a screenshot of the map.
TerrainExaggerationConfigure the vertical exaggeration of terrain (the ground surface) in a scene.
TimeBasedQueryThis sample demonstrates how to query data using a time extent. This workflow can be used to return records that are between a specified start and end date. For example, you could specify to only show records that are before September 16, 2000.
TokenSecuredChallengeThis sample demonstrates how to prompt the user for a username and password to authenticate with ArcGIS Server to access an ArcGIS token-secured service. Accessing secured services requires a login that's been defined on the server.
TraceUtilityNetworkDiscover connected features in a utility network using connected, subnetwork, upstream, and downstream traces.
UpdateAttributesUpdate feature attributes in an online feature service.
UpdateGeometriesUpdate a feature's location in an online feature service.
UseDistanceCompositeSymChange a graphic's symbol based on the camera's proximity to it.
ViewContentBeneathSurfaceSee through terrain in a scene and move the camera underground.
ViewPointCloudDataOfflineDisplay local 3D point cloud data.
ViewshedCameraAnalyze the viewshed for a camera. A viewshed shows the visible and obstructed areas from an observer's vantage point.
ViewshedGeoElementAnalyze the viewshed for an object (GeoElement) in a scene.
ViewshedLocationPerform a viewshed analysis from a defined vantage point. Viewshed analyses have several configuration options that are demonstrated in this sample.
WfsXmlQueryLoad a WFS feature table using an XML query.
WmsIdentifyIdentify features in a WMS layer and display the associated popup content.
WMSLayerUrlDisplay a WMS layer using a WMS service URL.
WmsServiceCatalogConnect to a WMS service and show the available layers and sublayers. Layers are shown in a hierarchy. Selecting a group layer will recursively select all sublayers for display.
WMTSLayerDisplay a layer from a Web Map Tile Service.