Exemplo n.º 1
0
        private static async Task BuildThemesForNodeAsync(TmNode tmNode)
        {
            IGisLayer layer;

            try
            {
                layer = await GisInterface.ParseItemAtPathAsGisLayerAsync(tmNode.Data.Path);
            }
            catch (Exception ex)
            {
                Debug.Print("Unable to load GIS data layers at " + tmNode.Data.Path + " " + ex.Message);
                // The caller set a default type. Do not return too much info, it may generate an unexpected icon.
                tmNode.Data.Type += "; Unable to load.";
                return;
            }
            tmNode.Data.Type = layer.DataType;
            if (layer.IsGroup)
            {
                await BuildSubThemesForGroupLayerAsync(tmNode, layer);
            }
            else
            {
                BuildThemeDataForLayer(tmNode.Data, layer);
            }
        }
Exemplo n.º 2
0
        static async Task InspectLayerFileAsync(string layerPath)
        {
            var node = await GisInterface.ParseItemAtPathAsGisLayerAsync(layerPath);

            Print(layerPath, node);
        }