Hello,
i'm new to SDk for .net. I wrote an windows desktop application, that shows csv-files (csvLayer) per drag and drop.
How can I count, how many csvLayers are on the map?
Thanks a lot
Karsten
Have you tried iterating through the layers of the Map and counting the number of layers that are of type CsvLayer? I would think that you could do either of the following to accomplish this.
Option A
var count = 0; foreach (var layer in MyMapView.Map.Layers) { if (layer is CsvLayer) count += 1; }
Option B
var count = MyMapView.Map.Layers.OfType<CsvLayer>().Count(); // Linq expression
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.