JavaScript library and image files for the MarkerClusterer are available in the Google Maps repo on GitHub.
The hell page specifies that these files can be copied to a “location accessible to your app”, but I have no clue where in Omeka’s folder structure this would fit…
It would be better to not edit core plugin files, but I did…
In GeolocationPlugin.php I added links to the JS files for both MarkerClusterer and Overlapping MarkerSpiderifier. Here’s a screenshot of my file:
In views/shared/javascripts/map.js (or your theme version of this file):
Update the fitMarkers function like so:
fitMarkers: function () {
if (this.markers.length == 1) {
this.map.setCenter(this.markers[0].getPosition());
} else {
var markeroptions = {
imagePath: "/plugins/Geolocation/views/shared/images/m",
maxZoom:15
};
if (this.markers.length > 10) {
var markerCluster = new MarkerClusterer(this.map, this.markers, markeroptions);
}
this.map.fitBounds(this.markerBounds);
}
}
Then you need to upload the colored circle images (used for clusters) [https://github.com/googlemaps/v3-utility-library/tree/master/markerclusterer/images] to an image directory. You only need images m1-m5.png. It would be best to upload these to your theme, but you can see here (in the markeroptions variable) that I uploaded them to an image directory in the Geolocation plugin.
Incorporating Spiderifier requires more editing. But this should get MarkerClusterer set up. I hope this helps!