Any help on this would be appreciated.
This does not work:
if (graphicsLayer.Graphics.Count > 0)
{
Envelope gEnvelope = graphicsLayer.FullExtent;
//(gEnvelope is null)
}
This Works:
if (graphicsLayer.Graphics.Count > 0)
{
Envelope selEnv = null;
foreach (Graphic g in graphicsLayer.Graphics)
{
if (selEnv == null)
{
selEnv = g.Geometry.Extent;
}
else
{
selEnv = selEnv.Union(g.Geometry.Extent);
}
}
if (!selEnv.IsEmpty)
{
selEnv = selEnv.Expand(1.5);
mapMain.SetView(selEnv);
}
}
Thanks for posting this. This is currently by design (due mixed-spatialreference support / performance reasons) but we are looking into it.