> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# esri:heatmap

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/app-studio/reference/tags/lightning.directive.esriHeatmap

[mintlify link]: https://doc.lucidworks.com/docs/4/app-studio/reference/tags/lightning.directive.esriHeatmap

[old doc.lw link]: https://doc.lucidworks.com/app-studio/4.2/1100

<LwTemplate />

## Description

The heatmap directive

## Usage

as element:

```xml wrap  theme={"dark"}
<esri:heatmap
       response="{string}"
       facet-name="{string}"
       [height="{string}"]
       [width="{string}"]
       [basemap="{string}"]>
</esri:heatmap>
```

### Directive info

* This directive creates new scope.

#### Parameters

| Param                 | Type       | Details                                                                                                                                                  |
| --------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| response              | **string** | Name of the response.                                                                                                                                    |
| facet-name            | **string** | Facet containing the data.                                                                                                                               |
| height  *(optional)*  | **string** | The height of the map container. Default is 400px.                                                                                                       |
| width  *(optional)*   | **string** | The width of the map container. Default is 100%.                                                                                                         |
| basemap  *(optional)* | **string** | The map to use to display the points on. Default: topo - [Esri options](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) |

## Example

#### Source

```xml wrap  theme={"dark"}
<h3 id="example_geo_loc_coordraw-facet">geo_loc_coord.raw Facet</h3>
<esri:heatmap response="response" facet-name="geo_loc_coord.raw" basemap="gray"></esri:heatmap>
```

```js wrap  expandable  theme={"dark"}
angular.module('lightning')
.controller('ExampleController', ['$scope','$timeout', function($scope,$timeout) {
            $scope.response = {
                page: 2,
                query: {
                    rpp: 50
                },
                facets: {
                    heat: {
                        filters: [
                            {
                                val: '37.770090, -122.408904',
                                count: 1,
                            },
                            {
                                val: '37.782745, -122.444586',
                                count: 1,
                            },
                            {
                                val: '37.782842, -122.443688',
                                count: 1,
                            },
                            {
                                val: '37.782919, -122.442815',
                                count: 1,
                            },
                            {
                                val: '37.782992, -122.442112',
                                count: 1,
                            },
                            {
                                val: '37.783100, -122.441461',
                                count: 1,
                            },
                            {
                                val: '37.783206, -122.440829',
                                count: 1,
                            },
                            {
                                val: '37.783273, -122.440324',
                                count: 1,
                            },
                            {
                                val: '37.783316, -122.440023',
                                count: 1,
                            },
                            {
                                val: '37.783357, -122.439794',
                                count: 1,
                            },
                            {
                                val: '37.783371, -122.439687',
                                count: 1,
                            },
                            {
                                val: '37.783368, -122.439666',
                                count: 1,
                            },
                        ]
                    },
                    "geo_loc_coord.raw": {
            "id": "geo_loc_coord.raw",
            "field": "geo_loc_coord.raw",
            "filters": [{
                "field": "geo_loc_coord.raw",
                "count": 39,
                "facts": {},
                "val": "51.4964,   -0.1224",
                "rel": []
            }, {
                "field": "geo_loc_coord.raw",
                "count": 3,
                "facts": {},
                "val": "52.2599,    0.2288",
                "rel": []
            }
            ],
            "params": {},
            "display": "geo_loc_coord.raw",
            "max-count": 39.0,
            "min-count": 0.0,
            "sum-of-counts": 42.0
        },
                },
                results: []
            }
        }]);
```

#### Result

<img src="https://mintcdn.com/lucidworks/_JCWsGwGCZxJia7w/assets/images/app-studio/as-examples/tags/esriHeatmap.png?fit=max&auto=format&n=_JCWsGwGCZxJia7w&q=85&s=6797b704152cb017f27692c51939a2d2" alt="Result" width="1024" height="560" data-path="assets/images/app-studio/as-examples/tags/esriHeatmap.png" />
