Method SaveAsAsync
SaveAsAsync(String)
Saves this node and any referenced local files as a KMZ archive.
Declaration
public Task SaveAsAsync(string pathToKmz)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathToKmz | Path (including filename) where KMZ data should be written. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous write operation. |
Remarks
The node will be saved to a KMZ file to ensure that any referenced files are available locally when sharing the file with others. If this method is called on a leaf node (KmlPlacemark, KmlGroundOverlay, and so on), only that node and its referenced files will be saved. If this method is called on container node (KmlDocument or KmlFolder), the node and all of its children and referenced files will be saved. If this method is called on a KmlNetworkLink, the link will be saved but the children will not. This is because the children will simply be re-fetched when the saved KmlNetworkLink is loaded.
Saving referenced files will differ based on the type of reference. For HTTP paths, the path will be saved as is but the referenced file will not be zipped into the archive, as it will simply be re-fetched when the new KMZ is loaded. For relative paths, the path will be saved as is and the referenced file will be zipped relative to the root of the KMZ file. For absolute paths, the path will be converted to a relative path, and the referenced file will be zipped into a "files" folder at the root of the KMZ file. For example, "C:/icons/some_icon.png" would be converted to "files/some_icon.png" and stored at that location in the KMZ file. The filename supports Unicode characters as well as nested directories. It must be non-empty and there must not be an existing file located there.
Saving a node to a KMZ file requires an ArcGIS Runtime 'Standard' license level.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.6 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.6 - 200.6 |
Xamarin.Android | 100.6 - 100.15 |
Xamarin.iOS | 100.6 - 100.15 |
UWP | 100.6 - 200.6 |