Skip to content

Commit 8f2d854

Browse files
committed
Fix OfflineMapTask instantiation pattern.
1 parent 5ceb66b commit 8f2d854

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Shared/Samples/Generate offline map/GenerateOfflineMapView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private extension GenerateOfflineMapView {
159159
do {
160160
// Waits for the online map to load.
161161
try await onlineMap.load()
162-
offlineMapTask = OfflineMapTask(portalItem: napervillePortalItem)
162+
offlineMapTask = OfflineMapTask(onlineMap: onlineMap)
163163
isGenerateDisabled = false
164164
} catch {
165165
self.error = error

Shared/Samples/Generate offline map/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When the map loads, zoom to the extent you want to take offline. The red border
1515
## How it works
1616

1717
1. Create a `Map` instance with a `PortalItem`.
18-
2. Create an `OfflineMapTask` instance with a `PortalItem`.
18+
2. Create an `OfflineMapTask` instance with the online map.
1919
3. Create `GenerateOfflineMapParameters` parameters for the offline map task with `OfflineMapTask.makeDefaultGenerateOfflineMapParameters(areaOfInterest:)`.
2020
4. Create a `GenerateOfflineMapJob` with `OfflineMapTask.makeGenerateOfflineMapJob(parameters:downloadDirectory:)`, using the parameters and specifying a download directory URL.
2121
5. Start the job and await its output.

0 commit comments

Comments
 (0)