private void QueryTask_ExecuteCompleted(object sender, ESRI.ArcGIS.Client.Tasks.QueryEventArgs args) { FeatureSet featureSet = args.FeatureSet; if ((args.UserState as string) == "incidentQuery") { DateTime incidentDate; foreach (Graphic graphic in args.FeatureSet.Features) { if (DateTime.TryParse(graphic.Attributes["IndidentDate"].ToString(), out incidentDate)) graphic.TimeExtent = new TimeExtent(incidentDate); } //...... more code (if you have any) } }
//loop through all graphics and set the time extent graphic.TimeExtent = new TimeExtent(incidentDateOfTheGraphic);
<esri:TimeSlider x:Name="MyTimeSlider" Height="20" TimeMode="TimeExtent" MinimumValue="{Binding ElementName=MyMap, Path=Layers[EarthquakesLayer].TimeExtent.Start, Mode=OneWay}" MaximumValue="{Binding ElementName=MyMap, Path=Layers[EarthquakesLayer].TimeExtent.End, Mode=OneWay}" Value="{Binding ElementName=MyMap, Path=Layers[EarthquakesLayer].TimeExtent, Mode=OneWay}" > </esri:TimeSlider>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.