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 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. |
popupObj | OpenLayers.Control.FeaturePopups.Popup Internal use. |
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 features of 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 | Returns the id of the feature used specifically for this layer. |
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 | |
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. |
unselectLayer | Unselect all selected features by `selControl` on the layer. |
refreshFeatures | |
refreshSelection | |
getSingleHtml | |
showSingleFeatureById | See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features. |
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 constructor argument in the FeaturePopups.mode have set OpenLayers.Control.FeaturePopups.SAFE_SELECTION.
{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.
popupClass | <OpenLayers.Popup.FramedCloud> |
panMapIfOutOfView | true |
unselectFunction | Depends on the FeaturePopups.mode (internal use) |
closeBox | Depends on the FeaturePopups.mode (internal use) |
observeItems | true (internal use) |
relatedToClear | [[“hover”, “hoverList”, “listItem”], [“single”]] (internal use) |
popupClass | <OpenLayers.Popup.FramedCloud> |
panMapIfOutOfView | true |
unselectFunction | Depends on the mode (internal use) |
closeBox | Depends on the mode (internal use) relatedToClear: [[“hover”, “hoverList”, “listItem”], [“list”]] (internal use) |
OpenLayers.Control.FeaturePopups.Popup Internal use.
{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 )
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.
feature | {OpenLayers.Feature.Vector} |
{String} A unique identifier of the feature within the layer according featureContext.
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.
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, origin )
See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features.
featureId | {String} id of the feature. |
origin | {<OpenLayers.Control.FeaturePopups.Popup>|null} |
Add the layer to control and assigns it the templates, see options.
addLayer: function( layer, options )
Returns the id of the feature used specifically for this layer.
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()
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 )
Unselect all selected features by `selControl` on the layer.
unselectLayer: function( selControl )
refreshFeatures: function()
refreshSelection: function()
getSingleHtml: function( feature )
See featureContext at FeaturePopups.addLayer to know how to use “id” or “fid” of features.
showSingleFeatureById: function( featureId, origin )
getSingleFeatures: function( features )