Running into 2 related issues
I have a map the users interact with, it uses an Operational Layer and a graphics overlay collection
Now my issue
If the user closes the map, and then comes back into the map, I run into this error.
For Graphics overlays I have been trying to clear() both the graphics layer on the map and clear() the graphics collection
EsriMapView.GraphicsOverlays.Clear();
BasicOverlays.Clear(); GraphicCollection
We do A WHOLE lot of stuff, and then I bomb here.
EsriMapView.GraphicsOverlays = BasicOverlays;// this is bombing on re enter
The operational layer is a little more tricky, and does NOT bomb whenever I come back in. But wont allow me to change the data or redraw the data, like if the user selects a different file to load, or changes a rendering option.
//Are we entering this again?
if (SectorLayer != null) Not firing on reenter, but does if I try and call this method again to "redraw"
{
EsriMapView.Map.OperationalLayers.Remove(SectorLayer);
SectorLayer = null;
}
try
{
SectorLayer = new Esri.ArcGISRuntime.Mapping.FeatureLayer(BlockGroupGeoPackage.GeoPackageFeatureTables[0]); <- Bombs here
}
catch
{
MessageBox.Show("Error Adding Sector Outlines");
}
SectorLayer.Renderer = _alternateRenderer;
EsriMapView.Map.OperationalLayers.Add(SectorLayer);
Both are showing the same error, could someone help me out here understanding this? According the debug the layers are clear, the SectorLayer is Null, the graphics layers & collection are clear, and the map.operational layer is clear.