<?php
// Add to your (child) theme's functions.php
// For more examples and explanation, see:
// https://facetwp.com/help-center/facets/facet-types/map/#set-custom-marker-cluster-images
add_filter( 'facetwp_map_init_args', function( $settings ) {
$clustericonsizes = array( 53, 56, 66, 78, 90 ); // specify icon image sizes. These are the default values.
for ( $i = 1; $i <= 5; $i ++ ) {
$settings['config']['cluster']['styles'][] = [
'url' => FACETWP_MAP_URL . '/assets/img/m' . $i . '.png', // directory, required. This is the default directory.
'width' => $clustericonsizes[ $i - 1 ], // required
'height' => $clustericonsizes[ $i - 1 ], // required
'textColor' => '#ffffff', // white, optional
'textSize' => 16 // 16px, optional
];
}
return $settings;
} );