CustomForm.js

Summary
CustomForm.js
Properties
commiting{Boolean} Used to validate commits made from this FormPanel.
Functions
addOwnerCalled right after this FeaturePanel has been added to an owner.
getActiveOwnerReturn the current activated owner (OpenLayers.Control).
setSingleFeatureSet the singlefeature property.
showFeaturePanelCalled by an owner.
hideFeaturePanelCalled by an owner.
parseFormFieldsToFeatureAttributesCalled when the user click this form “Commit” button.

Properties

commiting

{Boolean} Used to validate commits made from this FormPanel.

Functions

addOwner

addOwner: function(owner)

Called right after this FeaturePanel has been added to an owner.  The owner is added to this.owners.

Parameters

Owner{<OpenLayers.Control.*>} Can be :
  • EditFeature_Create
  • EditFeature_Update

getActiveOwner

getActiveOwner: function()

Return the current activated owner (OpenLayers.Control).

Returns activeOwner - {<OpenLayers.Control.*>} Can be :

  • EditFeature_Create
  • EditFeature_Update

setSingleFeature

setSingleFeature: function(singlefeature)

Set the singlefeature property.  Can be true or false.  Set by owner.

Parameters

singlefeature{boolean}

showFeaturePanel

showFeaturePanel: function(features)

Called by an owner.  Displays this panel.  If it’s in a window, display it.

N.B. currently supports only ONE feature

Parameters

features{Array(<OpenLayers.Vector.Feature>)}

hideFeaturePanel

hideFeaturePanel: function()

Called by an owner.  Reset the form and hide this.window (if container is a window.

parseFormFieldsToFeatureAttributes

Called when the user click this form “Commit” button.  Get the current selected feature, apply the modified attribute values and call this.owner.commit function.

N.B. currently supports only ONE feature

addOwner: function(owner)
Called right after this FeaturePanel has been added to an owner.
getActiveOwner: function()
Return the current activated owner (OpenLayers.Control).
setSingleFeature: function(singlefeature)
Set the singlefeature property.
showFeaturePanel: function(features)
Called by an owner.
hideFeaturePanel: function()
Called by an owner.
Close