http://www.google.com/apis/maps/documentation/
To use a marker manager, create a GMarkerManager object. In the simplest case, just pass a map to it.
var map = new GMap2(document.getElementById("map"));
var mgr = new GMarkerManager(map);
You may also specify a number of options to fine-tune the marker manager's performance. These options are passed via a GMarkerManagerOptions object, which contains the following fields:
The GMarkerManagerOptions object is an object literal, so you simply declare the object without a constructor:
var map = new GMap2(document.getElementById("map"));
var mgrOptions = { borderPadding: 50, maxZoom: 15, trackMarkers: true };
var mgr = new GMarkerManager(map, mgrOptions);
Once you create a manager, you will want to add markers to it. GMarkerManager supports adding single markers one at a time using the addMarker() method or a collection passed as an array using the addMarkers() method. Single markers added using addMarker() will appear immediately on the map provided that they fall within the current view and specified zoom level constraints.
Adding markers collectively using addMarkers() is recommended as it is more efficient. Markers added using the addMarkers() method will not appear on the map until you explicitly call the GMarkerManager's refresh() method, which adds all markers within the current viewport and border padding region to the map. After this initial display, GMarkerManager takes care of all visual updates by monitoring the map's "moveend" events.