apaje

TimeSlider for Newbie

Discussion created by apaje on Aug 1, 2013
Latest reply on Aug 2, 2013 by apaje
I am fairly new to using the ArcGIS JavaScript API and have hit a wall trying to use the timeSlider to add a playback functionality to my map. 

My map is a global map that is using the following map server URL: https://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer, and it's being set in a ArcGISTiledMapServiceLayer:


[INDENT]map = new esri.Map("map");[/INDENT]
[INDENT]dojo.connect(map, "onLoad", initFunc);[/INDENT]
[INDENT]var layer = new esri.layers.ArcGISTiledMapServiceLayer(https://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer);[/INDENT]
[INDENT]map.addLayer(layer);[/INDENT]


My points are lat/long based and being plotted manually via a function call (addPointToMap(lon, lat)). The function created an esri.geometry.Point using the lat/long information, creates a esi.symbol.SimpleMarkerSymbol, and then adds a new graphic to the map using the point and marker.  Like this:


[INDENT]var point = new esri.geometry.Point(lon, lat, map.spatialReference);[/INDENT]
[INDENT]var marker = new esri.symbol.SimpleMarkerSymbol();[/INDENT]
[INDENT]marker.setColor(new dojo.Color([255, 0, 0, 0.5]));[/INDENT]

[INDENT]map.graphics.add(new esri.Graphic(point,marker))[/INDENT]


This all works fine and dandy, but I have no clue how to modify this to make the points plot over time using the slider.  All the examples I've seen use dynamicmaplayers, time extens, and map services with data hosted on arcgis.com.  I need this to be standalone, with the only thing being retrieved is the global map base.

Any help would be greatly appreciated.

Outcomes