Indoors - do I absolutely need to provide Pathways?

318
1
08-19-2023 05:38 PM
Labels (1)
mprogers
New Contributor II

I am trying to figure out ArcGIS Indoors. I don't want to worry about paths right now, I just want to be able to get a blue dot to pop up on a screen. I am working with the IndoorPositioning example in the ArcGIS Samples app (this is for .NET MAUI), and it throws an exception on this line:

FeatureLayer pathwaysFeatureLayer = MyMapView.Map.OperationalLayers.OfType<FeatureLayer>().Single(l => l.Name.Equals(PathwaysLayerName, StringComparison.InvariantCultureIgnoreCase));

The exception is InvalidOperationsException: Sequence contains no matching elements.

My Map does have a Pathways feature class, it's just empty (it has columns, but no rows). Is that why this is throwing the exception? And how can I get around this without having to go through the rigmarole of making paths?

0 Kudos
1 Reply
ips_Dejan
Esri Contributor

Hi @mprogers,

Pathways feature class does not need to be populated with any features, but it does need to be configured with the appropriate schema. Here is the link to the documentation that goes into detail on how to do this. 

Also, did you define it with a correct variable? Code line you shared includes 

..... (l => l.Name.Equals(PathwaysLayerName, ........

The name of the layer needs to be Pathways. If this is not the case, the issues may arise. 

 

0 Kudos