googlemaps / googlemaps/js-markerclusterer

The property 'setIcon' does not exist for the type 'Marker'.

Open
#804 3 comments 2 reactions 0 assignees View on GitHub
triage me type: bug
Dominant language
TypeScript
Stars
293
Forks
104
Avg merge
3m
Merged PRs (30d)
18

Description

#### Environment details

2. OS type and version: MacOS Ventura 13.4
3. Library version and other environment information : 2.5.0

#### Code example

```tsx
import { Cluster } from '@googlemaps/markerclusterer';

const disableActiveCluster = useCallback((cluster: Cluster) => {
cluster.marker?.setIcon(setClusterMarkerIcon(cluster.count));
}, []);
```

#### Stack trace
```
Property 'setIcon' does not exist for type 'Marker'.
Property 'setIcon' does not exist for type 'AdvancedMarkerElement'.
```

I see in index.d.ts that there is a setIcon in Marker.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.