diff --git a/leaflet-markercluster/index.d.ts b/leaflet-markercluster/index.d.ts index ab8b6d9431..b1d4649b33 100644 --- a/leaflet-markercluster/index.d.ts +++ b/leaflet-markercluster/index.d.ts @@ -105,7 +105,7 @@ declare namespace L { /* * Function used to create the cluster icon */ - iconCreateFunction?: ((cluster: L.MarkerCluster) => L.Icon); + iconCreateFunction?: ((cluster: L.MarkerCluster) => L.BaseIcon); /* * Boolean to split the addLayers processing in to small intervals so that the page does not freeze. diff --git a/leaflet-markercluster/leaflet-markercluster-tests.ts b/leaflet-markercluster/leaflet-markercluster-tests.ts index 346239f836..ac607f1f5d 100644 --- a/leaflet-markercluster/leaflet-markercluster-tests.ts +++ b/leaflet-markercluster/leaflet-markercluster-tests.ts @@ -28,6 +28,10 @@ markerClusterGroupOptions = { chunkDelay: 100 } +markerClusterGroupOptions.iconCreateFunction = (cluster: L.MarkerCluster) => { + return L.divIcon(); +}; + let markerClusterGroup: L.MarkerClusterGroup; markerClusterGroup = L.markerClusterGroup(); markerClusterGroup = L.markerClusterGroup(markerClusterGroupOptions);