I setup a quick test using the code below and cannot reproduce the problem. In this test case if you run the application then move both sliders to the same position and start playing you'll see that data displays on the map. It looks like you have an extra space in the following line, perhaps this is the issue or maybe it was an error when copying the code?timeSlider.createTimeStopsByTimeInterval(timeExten t, 1, 'esriTimeUnitsDays');Here's my test case:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>H1N1 Flu Outbreak</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css">
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script>
<script type="text/javascript" language="Javascript">
dojo.require("esri.map");
dojo.require("esri.tasks.query");
dojo.require("esri.layers.FeatureLayer");
dojo.require("esri.dijit.TimeSlider")
var timeSlider,map;
var opLayer;
function init() {
map = new esri.Map("map");
var layers = [];
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
layers.push(basemap);
opLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://servicesbeta.esri.com/ArcGIS/rest/services/Health/h1n1/MapServer");
layers.push(opLayer);
//add all the layers to the map then initialize the slider
map.addLayers(layers);
dojo.connect(map,"onLayersAddResult",function(results){
timeSlider = new esri.dijit.TimeSlider({},dojo.byId("timeSliderDiv"));
map.setTimeSlider(timeSlider);
timeSlider.setThumbCount(2);
//get the time extent from the H1N1 layer and use that to define the time stops
timeSlider.createTimeStopsByTimeInterval(results[1].layer.timeInfo.timeExtent,1,'esriTimeUnitsDays');
dojo.connect(timeSlider,"onTimeExtentChange",extentChanged);
timeSlider.startup();
});
}
function extentChanged(timeExtent){
//format the dates
console.log(timeExtent.startTime.toUTCString());
console.log(timeExtent.endTime.toUTCString());
var startVal = timeExtent.startTime.getMonth() + 1 + "/" + timeExtent.startTime.getDate() + "/" + timeExtent.startTime.getFullYear();
var endVal = timeExtent.endTime.getMonth() + 1 + "/" + + timeExtent.endTime.getDate() + "/" + timeExtent.endTime.getFullYear();
dojo.byId("timeVal").innerHTML = "<b>H1N1 Flu Outbreak data from " + startVal + " TO " + endVal + "<\/b>";
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
<div id="timeVal"></div>
<div id="map" style="width:900px; height:600px; border:1px solid #000;"></div>
<div id="timeSliderDiv"></div>
</body>
</html>