MarkerCluster
Hierarchy
- MapObject
- MarkerCluster
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
options: { cellSize?: number; cellX: number; cellY: number; markers: Marker[]; svgPoint: SVGPoint; width?: number }
mapsvg: MapSVGMap
Returns MarkerCluster
Properties
cellSize
cellX
cellY
optionaldetails
elem
element
events
id
mapsvg
markers
max_x
max_y
min_x
min_y
name
optionalpopover
screenPoint
svgPoint
optionaltooltip
visible
width
Methods
addMarker
Adds marker to the cluster.
Parameters
marker: Marker
Returns void
adjustScreenPosition
Adjusts position of the cluster. Called on zoom and map container resize.
Returns void
attr
Sets attribute of an SVG object
Parameters
v1: any
attribute name or object:
{name: value, name: value}
v2: any = null
value
Returns string
canTakeMarker
Checks if provided marker should be added into this cluster.
Parameters
marker: Marker
Returns boolean
destroy
Destroys the cluster
Returns void
getBBox
Get SVG bounding box of the MarkersCluster
Returns ViewBox
- [x,y,width,height]
getCenter
Returns center of an object in pixel coordinates
Returns ScreenPoint
- [x,y]
getCenterLatLng
Returns center of an object in geo-coordinates
Parameters
yShift: any
Returns GeoPoint
getCenterSVG
Returns center of an object in SVG coordinates
Returns SVGPoint
getComputedStyle
Returns style of a given property of an SVG object
Parameters
prop: string
property name
optionalelem: HTMLElement | SVGElement
SVG object
Returns string
- style
getData
Returns Model[]
getGeoBounds
getStyle
Returns style of a property of the SVG object
Parameters
prop: string
property name
Returns string
inViewBox
Check if the cluster is inside of the viewBox
Returns boolean
boolean
moveSrceenPositionBy
Moves cluster by given numbers.
Parameters
deltaX: any
deltaY: any
Returns void
setId
Set ID of an object
Parameters
id: string
Returns void
setScreenPosition
Set cluster position.
Parameters
x: any
y: any
Returns void
updateVisibility
Set visibility of the marker
Returns boolean
staticgetComputedStyle
Parameters
prop: string
optionalelem: HTMLElement | SVGElement
Returns string
MarkerCluster class. Groups markers into a clickable circle with a number indicating how many markers it contains.