AnsweredAssumed Answered

3.16 apply HeatMap renderer to GraphicLayer

Question asked by TPaschke-esristaff Employee on May 12, 2016

Hi,

 

Is it in 3.16 possible to apply a HeatmapRenderer to a GraphicLayer?

 

I searched the discussion forum and only found that this was not working a while back (HeatmapRenderer on GraphicsLayer?) and a workaround using a custom DynamicMapServiceLayer for Heatmap.js (Heatmap layer as Graphics Layer? ).

 

I created a new GraphicLayer and set a HeatmapRenderer ...

 

var heatmapLayer = new GraphicsLayer({

                id: "heatmap"

            });

heatmapLayer.setRenderer(HeatmapRenderer)

map.addLayer(heatmapLayer);

 

... then added graphics (Points) to it with the symbol = null ...

    

var graphic = new Graphic(aggregation[i].geometry, null, aggregation[i].attributes, null);

heatmapLayer.add(graphic)

[...]

heatmapLayer.refresh();

 

... but the layer won't render this as a HeatMap. Any suggestions how this can work?

 

Thanks a lot!

 

Tom

Outcomes