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>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.