Hi, I have a query where I add many feature in runtime..now i write
if (projFeatureLayer.FullExtent != null)
{
double projectXMin = projFeatureLayer.FullExtent.XMin;
double projectXMax = projFeatureLayer.FullExtent.XMax;
double projectYMin = projFeatureLayer.FullExtent.YMin;
double projectYMax = projFeatureLayer.FullExtent.YMax;
//To also Envelope a single point
double coordOffset = .01;
if (projectXMin == projectXMax && projectYMin == projectYMax)
{
projectXMax = projectXMax + coordOffset;
projectXMin = projectXMin - coordOffset;
}
//Set Zoom Duration (Time)
mainPage.map.ZoomDuration = new TimeSpan(0, 0, Convert.ToInt32(App.Current.Resources["ZoomDuration"]));
Envelope projectEnvelope = new Envelope(projectXMin, projectYMin, projectXMax, projectYMax);
//Set zoom Extents
mainPage.map.ZoomTo(projectEnvelope.Expand(Convert.ToDouble(App.Current.Resources["ZoomExpand"])));
mainPage.panelCustomLegend.Visibility = System.Windows.Visibility.Visible;
//mainPage.boolRefreshCustomLegend = true;
//mainPage.CustomLegend.Refresh();
return true;
}
to zoom to one feature layer on "feature layer update-completed event" but how do I zoom to all the feature layers added on the map...??Please guide