Thanks Teordor. I did find this article. It suggests to load options for clustering like so:
// Options to pass along to the marker clusterer
const clusterOptions = {
imagePath: "https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",
gridSize: 30,
zoomOnClick: false,
maxZoom: 10,
};
// Add a marker clusterer to manage the markers.
const markerClusterer = new MarkerClusterer(map, markers, clusterOptions);
And load clustering like so:
// Enable marker clustering for this map and these markers
const markerClusterer = new MarkerClusterer(map, markers, {imagePath: imagePath});
So I tried adding this to above mentioned code:
const clusterOptions = {
minimumClusterSize: 10,
maxZoom: 7
};
map.setOptions(opt, clusterOptions);
}
But, no results.
In the dmxGoogleMaps.js file there is some function for this MarkerClusterer.
function MarkerClusterer(e, t, r) { this.extend(MarkerClusterer, google.maps.OverlayView), this.map_ = e, this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1; var s = r || {}; this.gridSize_ = s.gridSize || 60, this.minClusterSize_ = s.minimumClusterSize || 2, this.maxZoom_ = s.maxZoom || 13,
It uses e, t, r as iput, I don’t understand how that works. According to the docs the third one should be the MarkerClusterer options, so that would be r. I don’t understand how to influence this r, other than your ealier suggestion.
Thanks for any input given in the right direction.