3.16 apply HeatMap renderer to GraphicLayer

1465
0
05-12-2016 08:04 AM
ThomasPaschke
New Contributor III

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.geometry, null, aggregation.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

0 Kudos
0 Replies