Public Function New( _ ByVal layerDoc As CIMLayerDocument _ )
public LayerCreationParams( CIMLayerDocument layerDoc )
Parameters
- layerDoc
- A ArcGIS.Core.CIM.CIMLayerDocument object.
Public Function New( _ ByVal layerDoc As CIMLayerDocument _ )
public LayerCreationParams( CIMLayerDocument layerDoc )
{
//Get the LayerDocument from a lyrx file
var layerDoc = new LayerDocument(@"E:\Data\SDK\Default2DPointSymbols.lyrx");
//Get the CIMLayerDocument from the LayerDocument and use it to create LayerCreationParams
var createParams = new LayerCreationParams(layerDoc.GetCIMLayerDocument());
//Create a FeatureLayer using the LayerCreationParams
//Note: Needs QueuedTask to run
LayerFactory.Instance.CreateLayer<FeatureLayer>(createParams, MapView.Active.Map);
}
{
// Note: call within QueuedTask.Run()
{
//Create with initial visibility set to false. Add to current scene
var createparams = new LayerCreationParams(new Uri(sceneLayerUrl, UriKind.Absolute))
{
IsVisible = false
};
//cast to specific type of scene layer being created - in this case FeatureSceneLayer
var sceneLayer = LayerFactory.Instance.CreateLayer<Layer>(
createparams, MapView.Active.Map) as FeatureSceneLayer;
//or...specify the cast directly
var sceneLayer2 = LayerFactory.Instance.CreateLayer<FeatureSceneLayer>(
createparams, MapView.Active.Map);
//ditto for BuildingSceneLayer, PointCloudSceneLayer, IntegratedMeshSceneLayer
//...
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)