-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New] Download vector tiles to local cache #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that I didn't submit previous comments... will add more soon.
1. Create an `ExportVectorTilesTask` object, passing in the `PortalItem` for the vector tiled layer. Since vector tiled layers are premium content, you must first authenticate with the Portal. | ||
2. Create parameters for the export by using the task's method, `ExportVectorTilesTask.createDefaultExportVectorTilesParameters(areaOfInterest:maxScale:)`, specifying the area of interest and max scale. | ||
3. Create an `ExportVectorTileJob` by using the task's method, `ExportVectorTilesTask.exportVectorTiles(parameters:vectorTileCacheURL:itemResourceCacheURL:)`, passing in the parameters and specifying a vector tile cache path and an item resource path. The resource path is required if you want to export the tiles with the style. | ||
4. Start the job, then await the job's results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the sentence can be rephrased, but will leave it to other reviewers.
Shared/Samples/Download vector tiles to local cache/DownloadVectorTilesToLocalCacheView.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. We can wait for the replies from #31 before proceeding with the review on this PR.
Shared/Samples/Download vector tiles to local cache/DownloadVectorTilesToLocalCacheView.swift
Outdated
Show resolved
Hide resolved
Shared/Samples/Download vector tiles to local cache/README.metadata.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a build error in DisplayFeatureLayersView.swift
at line 68. Please merge in latest from v.next
if possible.
Shared/Samples/Download vector tiles to local cache/DownloadVectorTilesToLocalCacheView.swift
Outdated
Show resolved
Hide resolved
Shared/Samples/Download vector tiles to local cache/DownloadVectorTilesToLocalCacheView.swift
Show resolved
Hide resolved
Co-authored-by: David Feinzimer <dfeinzimer@gmail.com>
Description
This PR implements
Download vector tiles to local cache
inLayers
category.URL to README: URL
Linked Issue(s)
common-samples/issues/3587
How To Test
To Discuss
EDIT: No longer an issue. Sample crashes when rotating device in the results sheet
Looks like it traces back to the map's basemap.Results sheet viewpoint
When the results sheet is presented, the viewpoint doesn't seem to be set to the extent or I am unable to make it show the center of the exported tiles.
Area of interest set by geometryI'm not sure if this is the best way to set the area of interest/extent. The iOS samples app just has a fixed UIView and then converts the view to an envelope.