Skip To ContentArcGIS for DevelopersSign In Dashboard
require(["esri/renderers/smartMapping/symbology/heatmap"], function(heatmapSchemes) { /* code goes here */ });
Object: esri/renderers/smartMapping/symbology/heatmap
Since: ArcGIS API for JavaScript 4.11

Object containing helper methods for generating optimal symbols for heatmap visualizations. The getSchemes() method is used to get the heatmap color schemes best suited to the given basemap.

Method Overview

NameReturn TypeSummaryObject
HeatmapScheme

Clones a heatmap scheme object.

more details
more detailsheatmap
HeatmapScheme

Returns a heatmap scheme with the provided name.

more details
more detailsheatmap
HeatmapSchemes

Returns a primary scheme and secondary schemes defining properties for heatmap visualizations in a point Layer.

more details
more detailsheatmap
HeatmapScheme[]

Returns an array of heatmap schemes with the provided tags.

more details
more detailsheatmap
Theme[]

Returns metadata for the available themes.

more details
more detailsheatmap

Method Details

cloneScheme(scheme){HeatmapScheme}

Clones a heatmap scheme object.

Parameter:

The heatmap scheme object to clone.

Returns:
TypeDescription
HeatmapSchemeA clone of the given heatmap scheme object.
Example:
// clones the primary scheme returned from the getSchemes() method
var heatmapScheme = primaryScheme.clone();
getSchemeByName(params){HeatmapScheme}
Since: ArcGIS API for JavaScript 4.12

Returns a heatmap scheme with the provided name.

Parameters:
Specification:
params Object

See the table below for details of each parameter that may be passed to this function.

Specification:
name String

The name of the scheme to retrieve.

basemap String|Basemap
optional

The basemap to pair with the visualization. This value indicates the best colors for visualizing features against the given basemap.

basemapTheme String
optional

If you have a non-Esri basemap (e.g. a VectorTileLayer basemap with a custom style) or no basemap at all, use this parameter to indicate whether the background of the visualization is light or dark.

Possible Values: light | dark

Returns:
TypeDescription
HeatmapSchemeReturns the heatmap scheme with the given name.
Example:
// Returns the Heatmap 4 scheme
var heatmapScheme = heatmapSchemes.getSchemeByName({
  basemap: map.basemap,
  name: "Heatmap 4"
});
getSchemes(params){HeatmapSchemes}

Returns a primary scheme and secondary schemes defining properties for heatmap visualizations in a point Layer. The basemap parameter determines the color schemes of the heatmap.

Parameters:
Specification:
params Object

See the table below for details of each parameter that may be passed to this function.

Specification:
basemap String|Basemap
optional

The Esri basemap to pair with the visualization. This value indicates the best colors for visualizing features against the given basemap. If you have a non-Esri basemap (e.g. a VectorTileLayer basemap with a custom style) or no basemap at all, then use the basemapTheme parameter instead of this parameter.

basemapTheme String
optional

If you have a non-Esri basemap (e.g. a VectorTileLayer basemap with a custom style) or no basemap at all, use this parameter to indicate whether the background of the visualization is light or dark.

Possible Values: light | dark

Returns:
TypeDescription
HeatmapSchemesReturns an object containing the optimal heatmap scheme to use for the given basemap and secondary schemes that may also be used.
Example:
// gets the primary scheme for the basemap
var schemes = heatmapSchemes.getSchemes({
  basemap: map.basemap
});

// the best default scheme for the layer, basemap, and theme
var primaryScheme = schemes.primaryScheme;
getSchemesByTag(params){HeatmapScheme[]}
Since: ArcGIS API for JavaScript 4.12

Returns an array of heatmap schemes with the provided tags. These schemes define color stop properties for any layer that can be rendered with a HeatmapRenderer.

Parameters:
Specification:
params Object

See the table below for details of each parameter that may be passed to this function.

Specification:
includedTags String[]
optional

When provided, only schemes containing all the matching tags will be returned.

Known Tags: light | dark | reds | yellows | oranges | greens | blues | purples | pinks | browns | grays | bright | subdued | deuteranopia | protanopia | tritanopia | grayscale | types | dot-density

excludedTags String[]
optional

When provided, only schemes missing all the provided tags will be returned.

Known Tags: light | dark | reds | yellows | oranges | greens | blues | purples | pinks | browns | grays | bright | subdued | deuteranopia | protanopia | tritanopia | grayscale | types | dot-density

basemap String|Basemap
optional

The basemap to pair with the visualization. This value indicates the best symbol colors for visualizing features against the given basemap.

basemapTheme String
optional

If you have a non-Esri basemap (e.g. a VectorTileLayer basemap with a custom style) or no basemap at all, use this parameter to indicate whether the background of the visualization is light or dark.

Possible Values: light | dark

Returns:
TypeDescription
HeatmapScheme[]Returns an array of heatmap schemes either including or excluding the provided tags.
Example:
// Returns all the heatmap schemes that look good in grayscale
var grayscaleSchemes = heatmapSchemes.getSchemesByTag({
  basemap: map.basemap,
  includedTags: [ "heatmap", "grayscale" ]
});
getThemes(basemap){Theme[]}

Returns metadata for the available themes. If a basemap is provided, returns themes that work best with the given basemap.

Parameter:
basemap String|Basemap
optional

The Esri basemap string or object that will be used with the returned theme(s).

Returns:
TypeDescription
Theme[]Returns an object containing information about the available themes for the given basemap.

Type Definitions

HeatmapScheme

Properties defining the symbology scheme used to visualize point features as a heatmap.

Properties:
name String

The unique name of the scheme.

Tags associated with the scheme.

The unique id of the color scheme to usee in the visualization. The id is assigned based on the following template: <themeName>/<basemapName>/<schemeName>.

colors Color[]

A continuous color ramp used to construct a heatmap.

opacity Number

The opacity of the heatmap.

HeatmapSchemes

The return object of the getSchemes() method.

Properties:
primaryScheme HeatmapScheme

The heatmap color scheme best suited for the given basemap and geometry type.

secondarySchemes HeatmapScheme[]

Additional heatmap color schemes that may be used to visualize data overlaid on the given basemap.

basemapId String

The ID of the basemap associated with the given schemes.

basemapTheme String

Indicates whether the average basemap color is light or dark.

API Reference search results

NameTypeModule
Loading...