How can I diagnose the above exception? In my code, I roughly do the following:
- Create an overlay (
overlay = new GraphicsOverlay()
) - Create a set of polygons (
poly = new Polygon(mappoints)
wheremappoints
is aPointCollection
) - Create a graphic with the polygon geometry and a simple fill symbol for each polygon
(
graphic = new Graphic() { Geometry = poly, Symbol = new SimpleFillSymbol() { Color = Colors.Red } }
) - Add that graphic to the overlay. (
overlay.Add(graphic)
)
Then, when something changes, I will call overlay.Graphics.Clear()
, then repeat steps 2-3.
When I do this, sometimes on the new Graphic(...)
, I will get the exception (but not every time)
I'm using Esri.ArcGISRuntime version 100.0.0.0. Any idea what's going on?