Select to view content in your preferred language

HeatmapRenderer on GraphicsLayer?

2083
2
10-26-2015 12:54 PM
FabianoScardua
Emerging Contributor

Is it possible assign a HeatmapRenderer to GraphicsLayer?

Like this:

var graphicLayer = new GraphicsLayer();

var heatmapRenderer = new HeatmapRenderer();

graphicLayer.setRenderer(heatmapRenderer);

map.addLayer(graphicLayer);

This code does not work properly.

0 Kudos
2 Replies
TimWitt2
MVP Alum

Fabiano,

your heatmaprender needs to have Parameters, namely colors.

See here:HeatmapRenderer | API Reference | ArcGIS API for JavaScript

Tim

FabianoScardua
Emerging Contributor

It's not work too.

When I use a FeatureLayer it's work , but with a GraphicsLayer it's not work.

var graphicLayer = new GraphicsLayer();

var heatmapRenderer = new HeatmapRenderer({
    colors
: ["rgba(0, 0, 255, 0)","rgb(0, 0, 255)","rgb(255, 0, 255)", "rgb(255, 0, 0)"],
    blurRadius
: 12,
    maxPixelIntensity
: 250,
    minPixelIntensity
: 10
});

graphicLayer.setRenderer(heatmapRenderer);

map.addLayer(graphicLayer);

0 Kudos