This class is used to manage visibility of hundreds of markers on a map,
based on the map's current viewport and zoom level.
Creates a new marker manager that controlls visibility of
markers for the specified map.
|addMarkers(markers, minZoom, maxZoom?)
Adds a batch of markers to this marker manager. The markers are not added
to the map, until the
refresh() method is called. Once
placed on a map, the markers are shown if they fall within the map's
current viewport and the map's zoom level is greater than or equal
to the specified
minZoom. If the
was given, the markers are automatically removed if the map's zoom
is greater than the one specified.
|addMarker(marker, minZoom, maxZoom?)
Adds a single marker to a collection of markers controlled by this
manager. If the marker's location falls within the map's current
viewport and the map's zoom level is within the specified zoom level
rage, the marker is immediately added to the map. Similar to the
addMarkers method, the
minZoom and the
maxZoom parameters specify the range of zoom
levels at which the marker is shown.
Removes marker from the MarkerManager by
searching at every zoom level to find grid cell
that marker would be in, removing from that array if found.
Also calls removeOverlay on marker if currently visible.
Removes all currently displayed markers and clears grid arrays.
Forces the manager to update markers shown on the map. This method must
be called if markers were added using the
Returns the total number of markers potentially visible at the given
zoom level. This may include markers at lower zoom levels.
||This event is fired when markers managed by a manager have been added
to or removed from the map. The event handler function should be
prepared to accept two arguments. The fist one is the rectangle
definining the bounds of the visible grid. The second one carries the
number of markers currently shown on the map.
This class represents optional arguments to the
MarkerManager constructor. It has no constructor, but is
instantiated as object literal.
Specifies, in pixels, the extra padding outside the map's current
viewport monitored by a manager. Markers that fall within this
padding are added to the map, even if they are not fully
Sets the maximum zoom level monitored by a marker manager. If not
given, the manager assumes the maximum map zoom level. This value is also
used when markers are added to the manager without the optional
Indicates whether or not a marker manager should track markers'
movements. If you wish to move managed markers using the
setPoint method, this option should be set to
true. The default value is