ArcGIS Pro 2.7 API Reference Guide
GetBasemapsAsync Method

ArcGIS.Desktop.Core Namespace > ArcGISPortalExtensions Class : GetBasemapsAsync Method
Gets the list of base maps that are configured for the given portal
Syntax
public static Task<IReadOnlyList<PortalItem>> GetBasemapsAsync( 
   ArcGISPortal portal
)
Public Shared Function GetBasemapsAsync( _
   ByVal portal As ArcGISPortal _
) As Task(Of IReadOnlyList(Of PortalItem))

Parameters

portal

Return Value

Exceptions
ExceptionDescription
Thrown when an invalid portal is provided as the active portal.
Base map gallery group query was not found
Base map gallery group for 'baseMapGroupQuery' was not found
You do not have permissions to access this resource or perform this operation.
Request failed: status code {status code}
Remarks
The base maps may include vector base maps if the portal administrator has configured vector base maps as the preferred default. The base maps may also vary depending on the given user's culture.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

ArcGISPortalExtensions Class
ArcGISPortalExtensions Members