In ArcGIS.Desktop.Mapping within the ArcGIS Pro 3.0.3 SDK the following method has been removed:
var x = LayerFactory.Instance.CreateRasterLayer(uri, mapView.Map, 0, theShortName)
var x = LayerFactory.Instance.CreateFeatureLayer(uri, mapView.Map, 0, theShortName)
what are there replacement?
Solved! Go to Solution.
Found what I was looking for: ProConcepts 3.0 Migration Guide · Esri/arcgis-pro-sdk Wiki · GitHub
In 2.x this line:
var x = ArcGIS.Desktop.Mapping.LayerFactory.Instance.CreateFeatureLayer(uri, mapView.Map, 0, theShortName)
Is now replaced by:
var layerParams = new FeatureLayerCreationParams(uri)
{
MapMemberPosition = MapMemberPosition.AddToBottom,
Name = theShortName
};
var x = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, mapView.Map);
Found what I was looking for: ProConcepts 3.0 Migration Guide · Esri/arcgis-pro-sdk Wiki · GitHub
In 2.x this line:
var x = ArcGIS.Desktop.Mapping.LayerFactory.Instance.CreateFeatureLayer(uri, mapView.Map, 0, theShortName)
Is now replaced by:
var layerParams = new FeatureLayerCreationParams(uri)
{
MapMemberPosition = MapMemberPosition.AddToBottom,
Name = theShortName
};
var x = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, mapView.Map);