Select to view content in your preferred language

3.16 apply HeatMap renderer to GraphicLayer

1569
0
05-12-2016 08:04 AM
ThomasPaschke
Deactivated User

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