OpenLayersTools.Layer

Implements all the methods for working with layers of OpenLayers.

Summary
OpenLayersTools.LayerImplements all the methods for working with layers of OpenLayers.
Functions
LayerInitialize the object of Layer.
addMapCreates the map elements and adds them to OpenLayers.
addVectorLayerAdding a custom layer to OpenLayers.
getLayerByNameSeeking layer in OpenLayers and returns a single layer.
getLayersByNameSeeking layer in OpenLayers and returns array of layers.
getFeatureByIdTakes out the element layer and return it.
getFeaturesByIdTakes out the element layer and return array of OpenLayers.Feature.

Functions

Layer

function Layer(parent)

Initialize the object of Layer.

Parameters

parentObject that is the parent of this class.

Returns

Object of Layer.

addMap

addMap: function (maps)

Creates the map elements and adds them to OpenLayers.

Parameters

mapsObject which specifies a list of maps that are to be added to OpenLayers.

Returns

TRUE if function successful.

Usage

OpenLayersTools.Layer.addMap({
'Google Maps': 'Google Streets'
});

addVectorLayer

addVectorLayer: function (name,
config)

Adding a custom layer to OpenLayers.

Parameters

nameName of a custom layer.
configThe object with the parameters of the user layer.

Returns

TRUE if function successful.

Usage

OpenLayersTools.Layer.addVectorLayer('Транспортные средства', {
styleMap: {
default: {
display: '${display}',
label: '${label}',
externalGraphic: '${externalGraphic}',
graphicWidth: 32,
graphicHeight: 32,
graphicYOffset: -50
}
}
});

getLayerByName

getLayerByName: function (name)

Seeking layer in OpenLayers and returns a single layer.

Parameters

nameThe name of the layer.

Returns

OpenLayers.Layer.

Usage

OpenLayersTools.Layer.getLayerByName(layerName);

getLayersByName

getLayersByName: function (name)

Seeking layer in OpenLayers and returns array of layers.

Parameters

nameThe name of the layer.

Returns

Array of OpenLayers.Layer.

Usage

OpenLayersTools.Layer.getLayersByName(layerName);

getFeatureById

getFeatureById: function (layerName,
id)

Takes out the element layer and return it.

Parameters

layerNameLayer name from which to take the element layer.
idID of the control to be found.

Returns

OpenLayers.Feature.

Usage

OpenLayersTools.Layer.getFeatureById(layerName, id);

getFeaturesById

getFeaturesById: function (layerName,
id)

Takes out the element layer and return array of OpenLayers.Feature.

Parameters

layerNameLayer name from which to take the elements layer.
idID of the controls to be found.

Returns

Array of OpenLayers.Feature.

Usage

OpenLayersTools.Layer.getFeatureById(layerName, id);
function Layer(parent)
Initialize the object of Layer.
addMap: function (maps)
Creates the map elements and adds them to OpenLayers.
addVectorLayer: function (name,
config)
Adding a custom layer to OpenLayers.
getLayerByName: function (name)
Seeking layer in OpenLayers and returns a single layer.
getLayersByName: function (name)
Seeking layer in OpenLayers and returns array of layers.
getFeatureById: function (layerName,
id)
Takes out the element layer and return it.
getFeaturesById: function (layerName,
id)
Takes out the element layer and return array of OpenLayers.Feature.
Close