Hello community,
I want to make a timeslider with a Heatmap made from a featureLayer that i have in my rest service but i wanna know if somebody has made anything similar or how is the proper way to do it.
I have this for makin the heatmap and it works, but i want to make a timeslider with it.
<SPAN class="keyword token">var</SPAN> serviceUrl <SPAN class="operator token">=</SPAN> <SPAN class="string token">"myserver/MapServer/1?f=json&token="</SPAN> <SPAN class="operator token">+</SPAN> resolve<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> heatmapFeatureLayerOptions <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN>
mode<SPAN class="punctuation token">:</SPAN> FeatureLayer<SPAN class="punctuation token">.</SPAN>MODE_SNAPSHOT<SPAN class="punctuation token">,</SPAN>
outFields<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"*"</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> heatmapFeatureLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">FeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN>serviceUrl<SPAN class="punctuation token">,</SPAN> heatmapFeatureLayerOptions<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> heatmapRenderer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">HeatmapRenderer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>
colors<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"rgba(0,255,0, 0)"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"rgb(255, 255, 0)"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"rgb(255, 0, 0)"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
blurRadius<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">16</SPAN><SPAN class="punctuation token">,</SPAN>
maxPixelIntensity<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">250</SPAN><SPAN class="punctuation token">,</SPAN>
minPixelIntensity<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">5</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
heatmapFeatureLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setRenderer</SPAN><SPAN class="punctuation token">(</SPAN>heatmapRenderer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addLayer</SPAN><SPAN class="punctuation token">(</SPAN>heatmapFeatureLayer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I already know that the feature service has to have the timeextent setted up in the service, but how can i make a timeslider that shows this heatmap made?
Thanks in advice! Any example will be really appreciated! 