Hello, I'm still quite new with the ArcGIS SDK.
I'm loading a kml file into my application to display its content in a xaml treeview. And it works fine.
But unfortunately if the kml file is very large then my application freezes during the loading process.
That's why I decided to outsource the loading process into another thread. But I don't know where the loading process exactly occurs.
I open a file dialog and parse the content of the kml file into a kmlTree.
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "KML File|*.kml";
openFileDialog.Title = "Open KML file:";
Nullable<bool> dialogResult = openFileDialog.ShowDialog();
if (dialogResult == true)
{
string path = openFileDialog.FileName;
Uri kmlUri = new Uri(path);
Dataset = new KmlDataset(kmlUri);
KmlLayer layer = new KmlLayer(Dataset);
SavesTreeToLayer.Add(kmlTree, layer);
mapView.Map.OperationalLayers.Add(layer);
}
Does anybody have an idea?
Thanks in advance.
Hi,
decided to outsource the loading process into another thread. But I don't know where the loading process exactly occurs.
Do you mean your loading process or ArcGIS Runtime parsing the KML contents?
Can you share any code?
While it's UWP, this demo might help: https://github.com/Esri/arcgis-runtime-demos-dotnet/tree/main/src/KmlViewer/KmlViewer