Hi,
I found that ExtentHelper.GetBoundingBoxOfItems(IEnumerable<Feature> features) does not always return the correct extent, sometimes it just return the current extent.
I try to use that to zoom in to certain features on the map, it doesn't work on some streets, I would say like 10% of the streets on the map.
Is this a known issue or am I doing something wrong?
below is the code:
private static void ZoomToFeatures(Collection<Feature> features, Feature center)
{
if(features.Count > 0)
{
CurrentMap.CurrentExtent = ExtentHelper.GetBoundingBoxOfItems(features);
CurrentMap.CenterAt(center);
CurrentMap.CurrentExtent.ScaleUp(20);
CurrentMap.Refresh();
}
}
I put a break point on CurrentMap.CurrentExtent = ExtentHelper.GetBoundingBoxOfItems(features);
to make sure it gets called every time. And I also confirmed that features return correct values, which contain a street, a point, a intersecting street and the intersecting point.