[New] Sample: Download raster tiles to local cache#792
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Edit and Manage Data sample that demonstrates exporting raster tiles from a tiled map service into a local tile cache on-device, then previewing the downloaded cache in a separate map.
Changes:
- Added a new SwiftUI sample view that runs an
ExportTileCacheTaskand previews the resultingTileCache. - Added sample documentation (
README.md) and catalog metadata (README.metadata.json). - Registered the new sample source file/group in the Xcode project.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| Shared/Samples/Download raster tiles to local cache/README.metadata.json | Adds sample catalog metadata (category, keywords, APIs, snippet reference). |
| Shared/Samples/Download raster tiles to local cache/README.md | Adds end-user documentation for the new sample. |
| Shared/Samples/Download raster tiles to local cache/DownloadRasterTilesToLocalCacheView.swift | Implements the tile export workflow + progress UI + preview sheet. |
| Samples.xcodeproj/project.pbxproj | Adds the new sample file to the project/groups and build phases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ting <cht@bupt.cn>
Co-authored-by: Caleb Rasmussen <Caleb.rasmu553n@gmail.com>
Co-authored-by: Caleb Rasmussen <Caleb.rasmu553n@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Use license keys to grab the screenshot to remove watermark.
There was a problem hiding this comment.
The screenshot still needs to be updated
Co-authored-by: Ting <cht@bupt.cn>
…ter-tile' into chrisw/download-raster-tile
| @State private var extentRect = CGRect.zero | ||
|
|
||
| var body: some View { | ||
| GeometryReader { _ in |
There was a problem hiding this comment.
This GeometryReader can be removed now that you are using an onGeometryChange modifier.
| /// Creates the export tile cache parameters. | ||
| /// - Parameter areaOfInterest: The area of interest to create the parameters for. | ||
| /// - Returns: An `ExportTileCacheParameters` if there are no errors. | ||
| private func makeExportTileCacheParameters(areaOfInterest: Envelope) async throws -> ExportTileCacheParameters { |
There was a problem hiding this comment.
| private func makeExportTileCacheParameters(areaOfInterest: Envelope) async throws -> ExportTileCacheParameters { | |
| private func makeExportTileCacheParameters( | |
| areaOfInterest: Envelope | |
| ) async throws -> ExportTileCacheParameters { |
This line is pretty long; consider breaking it up.

Description
This PR implements
Download raster tiles to local cacheinEdit and Manage Datacategory.URL to README:
Here
Linked Issue(s)
swift/issues/6910Screenshot