Download jQuery 1.4.X or higher and jQuery UI 1.8.X or higher or use Googles or Microsofts CDN.
<script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js" type="text/javascript"></script> <script src="PATH_TO_MARKER_CLUSTERER_V_1.0/markerclusterer.js" type="text/javascript"></script> <script src="PATH_TO_PLUGIN/jquery.ui.map.js" type="text/javascript"></script>
<script type="text/javascript"> $(function() { $('#map_canvas').gmap({ 'center': new google.maps.LatLng(42.345573,-71.098326), 'callback': function() { for ( var i=1; i < 100; i++ ) { $('#map_canvas').gmap('addMarker', { position: new google.maps.LatLng(42.345573 + (i/100),-71.098326 - (2*(Math.random()))) } ); } }}); var markerCluster = new MarkerClusterer($('#map_canvas').gmap('getMap'), $('#map_canvas').gmap('getMarkers')); }); </script>