Class OfflineMapAreasView
The OfflineMapAreasView allows users to take a web map offline by downloading map areas.
Inheritance
Implements
Namespace: Esri.ArcGISRuntime.Toolkit.Maui
Assembly: Esri.ArcGISRuntime.Toolkit.Maui.dll
Syntax
public class OfflineMapAreasView : TemplatedView, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, ILayout, ILayoutController, IVisualTreeElement, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Remarks
The view supports both ahead-of-time(preplanned) and on-demand map areas for an offline enabled web map. The view:
Displays a list of map areas.
- Shows download progress and status for map areas.
- Opens a map area for viewing when selected.
- Provides options to view details about downloaded map areas.
- Supports removing downloaded offline map areas files from the device.
For preplanned workflows, the view:
- Displays a list of available preplanned map areas from an offline-enabled web map that contains preplanned map areas when the network is connected.
- Downloads preplanned map areas in the list.
- Displays a list of downloaded preplanned map areas on the device when the network is disconnected.
For on-demand workflows, the view:
- Allows users to add and download on-demand map areas to the device by specifying an area of interest and level of detail.
- Displays a list of on-demand map areas available on the device that are tied to a specific web map
If you're using the OfflineMapAreasView on iOS 26 or later, maps will be downloaded using a background transfer service which allows downloads to continue even if the app is suspended.
However for that to work, you must register the background task in your info.plist and add the following entry:
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>APP_BUNDLE_IDENTIFIER.cpt.jobs.*</string>
</array>
where APP_BUNDLE_IDENTIFIER is the bundle identifier of your app. If this entry is not added, downloads will still work but they may be paused when the app is suspended and may not resume until the app is opened again.
Constructors
| Name | Description |
|---|---|
| OfflineMapAreasView() | Initializes a new instance of the OfflineMapAreasView class. |
Fields
| Name | Description |
|---|---|
| ItemTemplateProperty | Identifies the ItemTemplate dependency property. |
| OfflineMapInfoProperty | Identifies the OfflineMapInfo dependency property. |
| OnlineMapProperty | Identifies the OnlineMap dependency property. |
| VerticalScrollBarVisibilityProperty | Identifies the VerticalScrollBarVisibility dependency property. |
Properties
| Name | Description |
|---|---|
| GoOnlineCommand | Sets the selected map back to the OnlineMap |
| ItemTemplate | Gets or sets item template for the IOfflineMapAreaItem items in the list. |
| OfflineMapInfo | Gets or sets OfflineMapInfo to display areas for in the list. |
| OnlineMap | Gets or sets Online map to display areas for in the list. |
| SelectedMap | Gets the currently selected map. This will be set to the map associated with a map area item when a map area is selected from the list in the view. This can be used to display the selected map in a MapView or to take other actions based on the selected map. |
| VerticalScrollBarVisibility | Gets or sets the vertical scrollbar visibility of the scrollviewer below the title. |
Methods
| Name | Description |
|---|---|
| OnApplyTemplate() |