I'm afraid I have no idea what I want. I just copied the code from the examples...When is 'results' defined? What is it? And how does one find out things like that? My experience with the documentation so far has been pretty frustrating.In any case, trying to refer to features1.timeExtent results in this message in the js console: "TimeExtent not specified, or in incorrect format." According to the map service:Time Info:Start Time Field: PERMITYEAR_TimeSliderDATE End Time Field: null Track ID Field: null Time Extent:[1999/01/01 00:00:00 UTC, 2010/01/01 00:00:00 UTC]Time Reference: N/A Time Interval: 1 Time Interval Units: esriTimeUnitsYears Has Live Data: false Export Options:Use Time: true Time Data Cumulative: true Time Offset: null (null)Is there something wrong here?
function initSlider (results) { var slider = new esri.dijit.TimeSlider ({}, dojo.byId ('sliderDiv')); map.setTimeSlider (slider); // var layerTimeExtent = results [1].layer.timeInfo.timeExtent; var layerTimeExtent = features1.timeInfo.timeExtent; slider.createTimeStopsByTimeInterval (layerTimeExtent, 1, 'esriTimeUnitsYears'); slider.singleThumbAsTimeInstant (false); slider.startup(); }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.