Tell us what you are trying to do?
Change the clustering of map icons so they can be a little closer together before they cluster
Is there any documentation that you are following?
I couldn't find much about this parameter here in the documentation but Google Maps API docs say grid size should control how many pixels between icons before they cluster. I tried changing the cluster_grid_size value in the maps shortcode to various numbers but I got the same result no matter what value I tried from 10 to 50.
Is there a similar example that we can see?
An example of the map I'd like to change is: hidden link
If you zoom in 1 level you'll see that with such small markers we don't really need clustering at the default zoom level for the 3 icons in the cluster.
What is the link to your site?
hidden link
Hi,
Welcome to Toolset support. Toolset Maps exposes Google’s “gridSize” parameter through the shortcode attribute cluster_grid_size.
You’ll find it in the official reference for [wpv-map-render] – section Arguments › cluster_grid_size:
"cluster_grid_size (pixels) – “When cluster is on, this sets the minimum distance in pixels between two markers to join them into the same cluster.”
Default: 60 px"
So lowering the value should delay clustering:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/
Alternatively, you can use JavaScript to control the value:
jQuery( document ).ready( function() {
WPViews.view_addon_maps.set_cluster_options(
{ gridSize: 25 }, // any MarkerClusterer option
'property-map' // your map_id
);
});
Thanks.
I tried changing the grid size to 20, 50, 10, and 60 and it had no apparent effect on whether the icons get clustered.
Hi,
Would you please create a simple version of the map on the installation below, which is a clean installation of WordPress and Toolset plugins?
hidden link
That way, replication of the issue can be reported to the development team for further investigation.
Thanks.
Sure. Have a look at: hidden link
Note that no matter what you set the cluster grid size to, the clusters are the same at default zoom. Also, cluster-min-size is set to 3 but there are clusters of 2 all over the map.
Thank you. I asked the second tier support to take a look into this.
It may take time, thank you for your patience.
Hi,
I have an answer from the second-tier support. The bug is confirmed and escalated to our development team.
There is no estimation for a fix. But if it is fixed on the upcoming version, I will inform.
Thanks.