ResultVectorLayer.js

Summary
ResultVectorLayer.js
Properties
APIProperty: drawMode{string}
singleResource{String} If ‘singleMode’ is set to true, when a query was made in ‘multiple’ mode, features of this resource only are added to the layer.
Functions
OpenLayers.ResultVectorLayerCreate a new ResultVectorLayer instance
resetPanelCalled by the query as soon as the user clicks the map.
showReultCalled by the query as soon as all responses were parses to features.
isValidFeatureA feature is valid if :
setSingleResourceSets the ‘singleResource’ property if in ‘singleMode’ and if ‘singleResource’ is not already set.
resetSingleResourceResets the ‘singleResource’ property to null.

Properties

APIProperty: drawMode

{string}

singleResource

{String} If ‘singleMode’ is set to true, when a query was made in ‘multiple’ mode, features of this resource only are added to the layer.  Automatically set when ‘singleMode’ is set to true.

Functions

OpenLayers.ResultVectorLayer

Create a new ResultVectorLayer instance

Parameters

options{Object} An optional object whose properties will be set on this instance.

resetPanel

resetPanel: function(options)

Called by the query as soon as the user clicks the map.  Remove all features binded to a resource (coming from a query widget) from the layer, thus keeping those coming from other widgets such as the redlining.

Also, reset the ‘singleResource’ property if query is not in ‘multiple’ mode.

options{<Object>} Hash of options.  Possible keys are :
  • modifiers : the query modifiers

showReult

Called by the query as soon as all responses were parses to features.  Add all valid features to the vector layer.

Parameters

features{Array of <OpenLayers.Feature.Vector>}
htmlResults{Array of <Object>} Objects returned by queries using ‘info_format’ equal to ‘text/html’.  Not supported by this wiget.

isValidFeature

isValidFeature: function(feature)

A feature is valid if :

  • it has geometry
  • if it’s binded to a resource, it must be binded to this widet resources as well
  • if it’s binded to a resource, if ‘singleResource’ is set, then the feature’s resource must be equal to the ‘singleResource’

Parameters

feature{<OpenLayers.Feature.Vector>}

Returns

{Boolean} Whether the feature is valid or not.

setSingleResource

setSingleResource: function(resource)

Sets the ‘singleResource’ property if in ‘singleMode’ and if ‘singleResource’ is not already set.  Also sets the query ‘multiQueryResource’ property.

Parameters

resource{Stirng} The name of the resource.

resetSingleResource

resetSingleResource: function()

Resets the ‘singleResource’ property to null.  Also reset the query ‘multiQueryResource’ property.

Parameters

resource{Stirng} The name of the resource.
resetPanel: function(options)
Called by the query as soon as the user clicks the map.
isValidFeature: function(feature)
A feature is valid if :
setSingleResource: function(resource)
Sets the ‘singleResource’ property if in ‘singleMode’ and if ‘singleResource’ is not already set.
resetSingleResource: function()
Resets the ‘singleResource’ property to null.
Close