I am having a problem rendering a heatmap. I am sure the heatmap is created but it doesnt display when I replace or add a renderer.
var TF = new FeatureLayer({
url:"https://services3.arcgis.com/1pxU2hJU9ZszJDcX/ArcGIS/rest/services/Young_Adult_Treatment_Facilities/FeatureServer/0",
})
//apply HM to layer
function apply(result){
console.log("applying")
TF.renderer = result.renderer;
};
var heatmapParams = {
layer: TF,
basemap: map.basemap
};
document.getElementById("butt").addEventListener("click", heatmapRendererCreator.createRenderer(heatmapParams).then(apply));
Whenever I call the apply function to create a renderer the point layer disappears.
Here's a codepen:
1 Answer 1
You must pass the view
object to the heatmapParams
:
var heatmapParams = {
layer: TF,
view: view
};
answered May 21, 2019 at 20:12
Explore related questions
See similar questions with these tags.
lang-js