OpenLayers.Control.FeaturePopups.Layer

Summary
OpenLayers.Control.FeaturePopups.Layer
Properties
events{<OpenLayers.Events>} Events instance for listeners and triggering specific events.
Constants
EVENT_TYPESOnly required to use OpenLayers.Control.FeaturePopups with 2.11 or less
Properties
eventListeners{Object} If set on options at construction, the eventListeners object will be registered with <OpenLayers.Events.on>.
templates{Object} Set of templates, see FeaturePopups.addLayer
featureContext{Object} See FeaturePopups.addLayer
listContext{Object} See FeaturePopups.addLayer
safeSelection{Boolean} Read only, true if the control constructor argument in the FeaturePopups.mode have set OpenLayers.Control.FeaturePopups.SAFE_SELECTION.
popupOptions{Object} Options used to create a popup manager for selections only on this layer, set to {} to use default options, default is null.
active{Boolean} The object is active (read-only)
Constructor
OpenLayers.Control.FeaturePopups.Layer
Functions and Properties
getFeatureIdReturns the id of the feature used specifically for this layer.
applyTemplate{Object} The object contains an applicator of the template for each template name.
destroy
activate
deactivate
showSingleFeatureByIdSee featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features.

Properties

events

{<OpenLayers.Events>} Events instance for listeners and triggering specific events.

Supported event types: see FeaturePopups.addLayer

Constants

EVENT_TYPES

Only required to use OpenLayers.Control.FeaturePopups with 2.11 or less

Properties

eventListeners

{Object} If set on options at construction, the eventListeners object will be registered with <OpenLayers.Events.on>.  Object structure must be a listeners object as shown in the example for the events.on method.

templates

{Object} Set of templates, see FeaturePopups.addLayer

featureContext

listContext

safeSelection

{Boolean} Read only, true if the control constructor argument in the FeaturePopups.mode have set OpenLayers.Control.FeaturePopups.SAFE_SELECTION.

popupOptions

{Object} Options used to create a popup manager for selections only on this layer, set to {} to use default options, default is null.

May contain two keys: “list” and “single”.

For more details of valid options for any key see FeaturePopups.Popup.Constructor.

Default options for “list”

popupClass<OpenLayers.Popup.FramedCloud>
panMapIfOutOfViewtrue
unselectFunctionDepends on the FeaturePopups.mode (internal use)
closeBoxDepends on the FeaturePopups.mode (internal use)
observeItemstrue (internal use)
relatedToClear[[“hover”, “hoverList”, “listItem”], [“single”]] (internal use)

Default options for “single”

popupClass<OpenLayers.Popup.FramedCloud>
panMapIfOutOfViewtrue
unselectFunctionDepends on the mode (internal use)
closeBoxDepends on the mode (internal use) relatedToClear: [[“hover”, “hoverList”, “listItem”], [“list”]] (internal use)

active

{Boolean} The object is active (read-only)

Constructor

OpenLayers.Control.FeaturePopups.Layer

Functions and Properties

getFeatureId

this.getFeatureId = function(feature)

Returns the id of the feature used specifically for this layer.  Usually the id returned is the `fid` feature if it exists and otherwise is the `id`.

This function can not be overwritten, use featureContext to change this behavior.

Parameters

feature{OpenLayers.Feature.Vector}

Returns

{String} A unique identifier of the feature within the layer according featureContext.

applyTemplate

{Object} The object contains an applicator of the template for each template name.  Each applicator returns a {String} with tokens replaced from the context of feature (for names single, item, hover, hoverItem) or context of list (for names list and hoverList)

destroy

destroy: function()

activate

activate: function()

deactivate

deactivate: function()

showSingleFeatureById

showSingleFeatureById: function(featureId,
origin)

See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features.

Parameters

featureId{String} id of the feature.
origin{<OpenLayers.Control.FeaturePopups.Popup>|null}
Extend of FeaturePopups control
addLayer: function(layer,
options)
Add the layer to control and assigns it the templates, see options.
To enable or disable the various behaviors of the control.
{Integer} Used in mode indicates that the features will remain selected even have been removed from the layer.
this.getFeatureId = function(feature)
Returns the id of the feature used specifically for this layer.
destroy: function()
activate: function()
deactivate: function()
showSingleFeatureById: function(featureId,
origin)
See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features.
{Object} See FeaturePopups.addLayer
Close