I have several thousand markers stored in a kmz file that I load into a Google Maps (v3 API).
I've looked around to find a way to cluster the overlay data, but to no avail.
MarkerClusterer looks nice, but it only seems to work with a marker array?
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(25,-20);
var myOptions = {
zoom: 2,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var ctaLayer = new google.maps.KmlLayer('thedata.kmz');
ctaLayer.setMap(map);
//cluster
var mcOptions = {gridSize: 50, maxZoom: 15};
var mc = new MarkerClusterer(map, ctaLayer, mcOptions);
}
How can I cluster the markers in the overlay, just like markerclusterer does it?