EMAPI.ClusterLayer

An additional layer of grouped objects applied on the map.  Objects placed in the layer are instances of classes derived from EMAPI.Object.PointObject class.

Summary
EMAPI.ClusterLayerAn additional layer of grouped objects applied on the map.
Functions
EMAPI.ClusterLayerThe constructor of a new instance of the EMAPI.ClusterLayer class.
addObjectsAdds new object to the layer
removeObjectsRemoves objects from the layer.
clearObjectsRemoves all object from the layer.
setMapSets the layer on the map.
setVisibilitySets layer visibility on the map.
countReturns an amount of objects in the layer.
getBoundsReturns the rectangle’s coordinates of the current map view which include all layer objects
destroyDestroys an object of EMAPI.ClusterLayer.

Functions

EMAPI.ClusterLayer

The constructor of a new instance of the EMAPI.ClusterLayer class.

Parameters

name{String} Layer name.
options{Object} The object with additional parameters of the class instance e. g. iconCreateFunction (name of the own function which generate grouping icons EMAPI.Icon class), showCoverageOnHover (selecting ranges of grouping icons).

addObjects

addObjects: function(a)

Adds new object to the layer

Parameters

objects{Array(EMAPI.Object.PointObject)} The list of objects which should be placed on a layer.

removeObjects

removeObjects: function(a)

Removes objects from the layer.

Parameters

objects{Array(EMAPI.Object.PointObject)} The list of objects which have to be removed from the layer.

clearObjects

clearObjects: function()

Removes all object from the layer.

setMap

setMap: function(map)

Sets the layer on the map.

Parameters

map{EMAPI.Map} The instance of the map, where the layer will be put on.

setVisibility

setVisibility: function(visibility)

Sets layer visibility on the map.

Parameters

visibility{Boolean} Layer visibility.

count

count:function()

Returns an amount of objects in the layer.

Result

{Integer} Amount of layer objects.

getBounds

getBounds: function ()

Returns the rectangle’s coordinates of the current map view which include all layer objects

Result

{EMAPI.Bounds} The EMAPI.Bounds object representing the range of the map.

destroy

destroy: function()

Destroys an object of EMAPI.ClusterLayer.

addObjects: function(a)
Adds new object to the layer
removeObjects: function(a)
Removes objects from the layer.
clearObjects: function()
Removes all object from the layer.
setMap: function(map)
Sets the layer on the map.
setVisibility: function(visibility)
Sets layer visibility on the map.
count:function()
Returns an amount of objects in the layer.
getBounds: function ()
Returns the rectangle’s coordinates of the current map view which include all layer objects
destroy: function()
Destroys an object of EMAPI.ClusterLayer.
The class of points objects placed on the maps in a layers of EMAPI.VectorLayer type.
Class of grouping icons placed on the map in the form of layers of type {EMAPI.ClusterLayer}.
EMAPI.Map instances are interactive maps embedded in web applications.
This class instances represent rectangles limiting a map.
Close