Drawing .shp file is slow with .NET C# API

455
2
Jump to solution
01-26-2023 05:01 AM
MattiasWesterberg
New Contributor III

Hi,

I am trying to draw a large .shp file using the class ShapefileFeatureTable as below(.NET C#).
The size of the .shp file is quite large: 63,6 MB (66 731 956 byte).

Map myMap = MyMapView.Map;
ShapefileFeatureTable myShapefileFeatureTable = await ShapefileFeatureTable.OpenAsync("C:\\myShpFile.shp");
FeatureLayer myFeatureLayer = new FeatureLayer(myShapefileFeatureTable);
MyMapView.Map.OperationalLayers.Add(myFeatureLayer);

The problem is that drawing it is very slow. First it takes a long time for the layer to show up at all.
Then when I zoom or scroll the map, it takes too long time for the layer to be redrawn.

When I open the same file in ArcGiS Pro it is shown much faster. Same for scrolling and zooming.

Is it possible to make drawing of such a large .shp file faster when using ArcGIS .NET C# API?
I have "licence for developer use only".

Any input would be appreciated.

Thanks, Mattias

0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor

Hi,

A few questions:

 

Thanks

View solution in original post

2 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

A few questions:

 

Thanks

MattiasWesterberg
New Contributor III

I changed the RenderingMode to Dynamic. So now it draws my .shp file much faster.

myFeatureLayer.RenderingMode = FeatureRenderingMode.Dynamic;

Thanks a lot!

0 Kudos