OpenLayers. | |
Properties | |
events | {<OpenLayers.Events>} Events instance for listeners and triggering specific events. |
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>. |
listenFeatures | {Boolean} internal use to optimize performance, true if eventListeners contains a “featureschanged” event. |
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 costructor argument in the FeaturePopups.mode have set OpenLayers.Control.FeaturePopups.SAFE_SELECTION. |
selection | {Object} Used if safeSelection is true. |
selectionObject | {Object} Used to store calculations associated with current selection. |
selectionHash | {String} String unique for the single features of the selected features of the layer regardless of the order or clustering of these, is based on its id or fid (if it exists) |
staticSelectionHash | {String} String unique for the single features of the static selected featuresof the layer regardless of the order or clustering of these, is based on its id or fid (if it exists) |
featuresHash | {String} String unique for the single features of the layer regardless of the order or clustering of these, is based on its id or fid (if it exists) |
layerListeners | {Object} layerListeners object will be registered with <OpenLayers.Events.on>, internal use only. |
active | {Boolean} The object is active (read-only) |
updatingSelection | {Boolean} The control set to true this property while being refreshed selection on a set of features to can ignore others acctions, internal use only. |
silentSelection | {Boolean} Suppress “selectionchanged” event triggering during a selection process, internal use only. |
refreshDelay | {Number} Number of accepted milliseconds of waiting between removing and re-add features (useful when using strategies such as BBOX), after this time has expired is forced a popup refresh. |
delayedRefresh | {Number} Timeout id of forced refresh. |
regExpI18n | {RegEx} Used to internationalize templates. |
regExpShow | {RegEx} Used to activate events in the html elements to show individual popup. |
regExpAttributes | {RegEx} Used to omit the name “attributes” as ${.myPropertyName} instead of ${attributes.myPropertyName} to show data on a popup using templates. |
Constructor | |
OpenLayers. | |
Functions and Properties | |
getFeatureId | Internal use!, see “featureContext” at FeaturePopups.addLayer to know how to use “id” or “fid” of features. |
renderTemplate | Given a string with tokens in the form ${token}, return a string with tokens replaced with properties from the given context object. |
applyTemplate | {Object} The object contains an applicator of the template for each template name. |
prepareTemplate | When the template is a string returns a prepared template, otherwise returns it as is. |
destroy | |
activate | |
deactivate | |
clear | Clear selection stored if safeSelection is true. |
isEmptyObject | |
highlightFeature | Internal use only. |
onFeatureselected | |
storeAsSelected | |
onFeatureunselected | Called when the select feature control unselects a feature. |
onBeforefeaturesremoved | Called before some features are removed, only used when mode contains OpenLayers.Control.FeaturePopups.SAFE_SELECTION. |
onFeaturesremoved | Called when some features are removed, only used when mode = OpenLayers.Control.FeaturePopups.CLOSE_ON_REMOVE |
onFeaturesadded | Called when some features are added, only used when value of mode conbtains OpenLayers.Control.FeaturePopups.SAFE_SELECTION. |
refreshFeatures | |
refreshSelection | |
getSingleHtml | |
addSelectionByIds | |
setSelectionByIds | |
applySelection | |
removeSelectionByIds | |
applyDeselection | |
showSingleFeatureById | See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features. |
getSelectionIds | |
getSingleFeatures |
{<OpenLayers.Events>} Events instance for listeners and triggering specific events.
Supported event types: see FeaturePopups.addLayer
Only required to use OpenLayers.Control.FeaturePopups with 2.11 or less
{Boolean} internal use to optimize performance, true if eventListeners contains a “featureschanged” event.
{Object} Set of templates, see FeaturePopups.addLayer
{Object} See FeaturePopups.addLayer
{Object} See FeaturePopups.addLayer
{Boolean} Read only, true if the control costructor argument in the FeaturePopups.mode have set OpenLayers.Control.FeaturePopups.SAFE_SELECTION.
{Object} Used if safeSelection is true. Set of the identifiers (id or fid if it exists) of the features that were selected, a feature remains on the object after being removed from the layer until occurs new selection.
this.getFeatureId = function( feature )
Internal use!, see “featureContext” at FeaturePopups.addLayer to know how to use “id” or “fid” of features.
feature | {OpenLayers.Feature.Vector} |
{String} A unique identifier of the feature within the layer.
var renderTemplate = function( template, context, extendedContext )
Given a string with tokens in the form ${token}, return a string with tokens replaced with properties from the given context object. Represent a literal “${“ by doubling it, e.g. “${${“.
template | {String || Function} If template is a string then template has the form “literal ${token}” where the token will be replaced by the value of context[“token”]. When is a function it will receive the context as a argument. |
context | {Object} Object with properties corresponding to the tokens in the template. |
extendedContext | {Object} Object with properties corresponding to the overlaid tokens, if a token is a function its scope is context. |
{String} A string with tokens replaced from the context object.
clear: function()
Clear selection stored if safeSelection is true.
onBeforefeaturesremoved: function( evt )
Called before some features are removed, only used when mode contains OpenLayers.Control.FeaturePopups.SAFE_SELECTION.
evt | {Object} |
onFeaturesremoved: function( evt )
Called when some features are removed, only used when mode = OpenLayers.Control.FeaturePopups.CLOSE_ON_REMOVE
evt | {Object} |
onFeaturesadded: function( evt )
Called when some features are added, only used when value of mode conbtains OpenLayers.Control.FeaturePopups.SAFE_SELECTION.
evt | {Object} |
showSingleFeatureById: function( featureId )
See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features.
featureId | {String} id of the feature. |
Add the layer to control and assigns it the templates, see options.
addLayer: function( layer, options )
Internal use!, see “featureContext” at FeaturePopups.addLayer to know how to use “id” or “fid” of features.
this.getFeatureId = function( feature )
Given a string with tokens in the form ${token}, return a string with tokens replaced with properties from the given context object.
var renderTemplate = function( template, context, extendedContext )
When the template is a string returns a prepared template, otherwise returns it as is.
prepareTemplate: function( template )
destroy: function()
activate: function()
deactivate: function()
Clear selection stored if safeSelection is true.
clear: function()
isEmptyObject: function( obj )
Internal use only.
highlightFeature: function( feature )
onFeatureselected: function( evt )
storeAsSelected: function( feature )
Called when the select feature control unselects a feature.
onFeatureunselected: function( evt )
Called before some features are removed, only used when mode contains OpenLayers.Control.FeaturePopups.SAFE_SELECTION.
onBeforefeaturesremoved: function( evt )
Called when some features are removed, only used when mode = OpenLayers.Control.FeaturePopups.CLOSE_ON_REMOVE
onFeaturesremoved: function( evt )
Called when some features are added, only used when value of mode conbtains OpenLayers.Control.FeaturePopups.SAFE_SELECTION.
onFeaturesadded: function( evt )
refreshFeatures: function()
refreshSelection: function()
getSingleHtml: function( feature )
addSelectionByIds: function( featureIds, silent )
setSelectionByIds: function( featureIds, silent )
applySelection: function( silent )
removeSelectionByIds: function( featureIds, silent )
applyDeselection: function( silent )
See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features.
showSingleFeatureById: function( featureId )
getSelectionIds: function()
getSingleFeatures: function( features )