Skip to content

Commit 01ee7a7

Browse files
committed
Add readme and image
1 parent c9c26da commit 01ee7a7

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
317 KB
Loading
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<h1>Export Vector Tiles</h1>
2+
3+
<p>Demonstrates how to export vector tiles with its style from a vector tiled layer.</p>
4+
5+
<p><img src="ExportVectorTiles.png"/></p>
6+
7+
<h2>How to use the sample</h2>
8+
9+
<p>First, a dialog will appear prompting for authentication credentials to arcgis.com. You must supply valid
10+
credentials for an organization user to continue. When the vector tiled layer loads, zoom in to the extent you want
11+
to export. The red box shows the extent that will be exported. Click the "Export Vector Tiles"
12+
button to start the job. A progress indicator will show. The larger the extent, the longer it will take to export. When
13+
finished, a dialog will show the exported result in a new map view.</p>
14+
15+
<h2>How it works</h2>
16+
17+
<p>To export tiles from an <code>ArcGISVectorTiledLayer</code>:</p>
18+
<ol>
19+
<li>Create an <code>ExportVectorTilesTask</code>, passing in the <code>PortalItem</code> for the vector tiled layer.
20+
Since vector tiled layers are premium content, you must first authenticate with the Portal.</li>
21+
<li>Create default <code>ExportTilesParameters</code> with <code>task.createDefaultExportTilesParametersAsync(extent, maxScale)</code>.</li>
22+
<li>Call <code>task.exportVectorTilesAsync(defaultParams, vtpkPath, resourcePath)</code> to create the
23+
<code>ExportVectorTilesJob</code>. The resource path is required if you want to export the tiles with the style.</li>
24+
<li>Call <code>job.start()</code> to start the export job.</li>
25+
<li>When the job is done, use <code>job.getResult()</code> to get the resulting
26+
<code>ExportVectorTilesResult</code>.</li>
27+
<li>You can load the result as a <code>ArcGISVectorTiledLayer</code> with <code>new ArcGISVectorTiledLayer(result.getVectorTileCache(), result.getItemResourceCache())</code>.</li>
28+
</ol>
29+
30+
<h2>Features</h2>
31+
32+
<ul>
33+
<li>ArcGISVectorTiledLayer</li>
34+
<li>ExportVectorTilesJob</li>
35+
<li>ExportVectorTilesParamters</li>
36+
<li>ExportVectorTilesResult</li>
37+
<li>ExportVectorTilesTask</li>
38+
<li>ItemResourceCache</li>
39+
<li>Portal</li>
40+
<li>PortalItem</li>
41+
<li>UserCredential</li>
42+
<li>VectorTileCache</li>
43+
</ul>

0 commit comments

Comments
 (0)