Packagecom.google.maps.extras.markermanager
Classpublic class MarkerManager



Public Methods
 MethodDefined by
  
MarkerManager(map:IMap, opt_opts:Object)
Creates a new MarkerManager that will show/hide markers on a map.
MarkerManager
  
addMarker(marker:Marker, minZoom:Number, opt_maxZoom:Number):void
Add a single marker to the map.
MarkerManager
  
addMarkers(markers:Array, minZoom:Number, opt_maxZoom:Number):void
Add many markers at once.
MarkerManager
  
clearMarkers():void
Removes all currently displayed markers and calls resetManager to clear arrays
MarkerManager
  
getMarkerCount(zoom:Number):Number
Calculates the total number of markers potentially visible at a given zoom level.
MarkerManager
  
refresh():void
Call a function or evaluate an expression after a specified number of milliseconds.
MarkerManager
  
removeMarker(marker:Marker):void
Searches at every zoom level to find grid cell that marker would be in, removes from that array if found.
MarkerManager
Public Constants
 ConstantDefined by
  DEFAULT_BORDER_PADDING : Number = 100
[static]
MarkerManager
  DEFAULT_MAX_ZOOM : Number = 17
[static]
MarkerManager
  DEFAULT_TILE_SIZE : Number = 1024
[static]
MarkerManager
  MERCATOR_ZOOM_LEVEL_ZERO_RANGE : Number = 256
[static]
MarkerManager
Constructor detail
MarkerManager()constructor
public function MarkerManager(map:IMap, opt_opts:Object)

Creates a new MarkerManager that will show/hide markers on a map.

Parameters
map:IMap — The map to manage.
 
opt_opts:Object — A container for optional arguments: {Number} The maximum zoom level for which to create tiles. {Number} The width in pixels beyond the map border, where markers should be display. {Boolean} Whether or not this manager should track marker movements.
Method detail
addMarker()method
public function addMarker(marker:Marker, minZoom:Number, opt_maxZoom:Number):void

Add a single marker to the map.

Parameters
marker:Marker — The marker to add.
 
minZoom:Number — The minimum zoom level to display the marker.
 
opt_maxZoom:Number — The maximum zoom level to display the marker.
addMarkers()method 
public function addMarkers(markers:Array, minZoom:Number, opt_maxZoom:Number):void

Add many markers at once. Does not actually update the map, just the internal grid.

Parameters
markers:Array — The marker objects to add.
 
minZoom:Number — The minimum zoom level to display the markers.
 
opt_maxZoom:Number — The maximum zoom level to display the markers.
clearMarkers()method 
public function clearMarkers():void

Removes all currently displayed markers and calls resetManager to clear arrays

getMarkerCount()method 
public function getMarkerCount(zoom:Number):Number

Calculates the total number of markers potentially visible at a given zoom level.

Parameters
zoom:Number — The zoom level to check.

Returns
Number — {Number}
refresh()method 
public function refresh():void

Call a function or evaluate an expression after a specified number of milliseconds. Equivalent to the standard window.setTimeout function, but the given function executes as a method of this instance. So the function passed to objectSetTimeout can contain references to this. objectSetTimeout(this, function() { alert(this.x) }, 1000);

removeMarker()method 
public function removeMarker(marker:Marker):void

Searches at every zoom level to find grid cell that marker would be in, removes from that array if found. Also removes marker with removeOverlay if visible.

Parameters
marker:Marker — The marker to delete.
Constant detail
DEFAULT_BORDER_PADDINGconstant
public static const DEFAULT_BORDER_PADDING:Number = 100
DEFAULT_MAX_ZOOMconstant 
public static const DEFAULT_MAX_ZOOM:Number = 17
DEFAULT_TILE_SIZEconstant 
public static const DEFAULT_TILE_SIZE:Number = 1024
MERCATOR_ZOOM_LEVEL_ZERO_RANGEconstant 
public static const MERCATOR_ZOOM_LEVEL_ZERO_RANGE:Number = 256