public static T GetRenderer <T>([NotNull] LayerDocument template) where T : CIMRenderer { CIMLayerDocument layerDocument = template.GetCIMLayerDocument(); // todo daro: implement more robust CIMDefinition definition = layerDocument.LayerDefinitions[0]; return(((CIMFeatureLayer)definition)?.Renderer as T); }
public ProLayer(string path, CIMLayerDocument doc, string uri) { _path = path; _layerDoc = doc; _layer = doc.LayerDefinitions.FirstOrDefault(l => l.URI == uri); try { Initialize(); } catch (Exception ex) { DataType = "Error: " + ex.Message; } if (DataType == null) { DataType = LayerDescription; } SubLayers = GetSubLayers(); }