EMAPI.VectorLayer

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

Summary
EMAPI.VectorLayerAn additional layer of objects applied to the map.
Functions
EMAPI.VectorLayerThe constructor of a new instance of the EMAPI.VectorLayer class.
addObjectsAdds new objects to the layer.
bringToFrontBrings layer on the top of displayed layers.
removeObjectsRemoves objects from the layer.
clearObjectsRemoves all objects 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.VectorLayer.

Functions

EMAPI.VectorLayer

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

Parameters

name{String} Layer name.

addObjects

addObjects: function(objects)

Adds new objects to the layer.

Parameters

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

bringToFront

bringToFront: function ()

Brings layer on the top of displayed layers.

removeObjects

removeObjects: function(objects)

Removes objects from the layer.

Parameters

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

clearObjects

clearObjects: function()

Removes all objects from the layer.

setMap

setMap: function(map)

Sets the layer on the map.

Parameters

map{EMAPI.Map} he 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.VectorLayer.

addObjects: function(objects)
Adds new objects to the layer.
bringToFront: function ()
Brings layer on the top of displayed layers.
removeObjects: function(objects)
Removes objects from the layer.
clearObjects: function()
Removes all objects 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.VectorLayer.
The base class for all the objects placed on the maps in a layers of {EMAPI.VectorLayer}type.
EMAPI.Map instances are interactive maps embedded in web applications.
This class instances represent rectangles limiting a map.
Close