AnsweredAssumed Answered

Using a HeatMap renderer on a GraphicsLayer

Question asked by tsellste Champion on Apr 5, 2017
Latest reply on Apr 19, 2017 by tsellste



I have created an app that we use for public safety public disclosure requests.  The app uses a geoprocessing script that queries a database (not geodatabase) that returns rows that have lat/lon coordinates.  Points are then created with the attributes and added to a GraphicsLayer and drawing the layer with a SimpleRenderer to begin with.  I have added a couple of buttons that allow the user to change how the points are displayed.  This displays fine with a SimpleRenderer or UniqueValueRenderer, but won't work with a HeatmapRenderer.  There are no errors in the console, just a blank map.


I have read the documentation and there isn't anything that says a HeatmapRenderer won't work with GraphicsLayer.  I have seen some similar posts that don't actually answer this question.  The code for this seems pretty straightforward.  Here are some snippets for changing the renderers:


function displayBasicPoints() {

     var marker = new SimpleMarkerSymbol();
     marker.setColor(new Color([168, 0, 0, 0.25]));

     var resultsRenderer = new SimpleRenderer(marker);


function displayHeatmap() {
     resultsLayer.spatialReference = map.spatialReference;
     var hr = new HeatmapRenderer();


You can also view the app at:  DEX Queries 


Thanks very much for any help!