mapfish. widgets. editing. FeatureList

Use this class to create an editable grid of features.

Inherits from

  • {Ext.grid.EditorGridPanel}
Summary
mapfish. widgets. editing. FeatureListUse this class to create an editable grid of features.
Constructor
mapfish. widgets. editing. FeatureList
Properties
featureType{Ext.data.Record} Definition of a feature record, created by Ext.data.Record.create()
map{OpenLayers.Map} Where to display the selected geometries
layer{OpenLayers.Layer.Vector} The Vector layer to use to draw the selected geometries.
automaticMode{Boolean} If true, the geometry to edit can be selected on click.
autoFocusMode{Integer} If 0, don’t change the visible extent of the map.
displayNotEdited{Boolean} If “false”, display only the edited feature.
Functions
editGeometryVisualHow to represent a geometry in the grid.
editFirstGeometryStart to edit the first geometry of the given feature.
setAutomaticModeChange the mode.
setDisplayNotEditedChange the configuration of what should be displayed.
createRecordGenerate a Record constructor for a specific record layout and with support for the ‘geo’ type.

Constructor

mapfish. widgets. editing. FeatureList

Parameters

config{Object} The Grid config.

Properties

featureType

{Ext.data.Record} Definition of a feature record, created by Ext.data.Record.create()

map

{OpenLayers.Map} Where to display the selected geometries

layer

{OpenLayers.Layer.Vector} The Vector layer to use to draw the selected geometries.

automaticMode

{Boolean} If true, the geometry to edit can be selected on click.  Otherwise, the user has to click on the geometry in the list to put it in edit mode.

autoFocusMode

{Integer} If 0, don’t change the visible extent of the map.  If 1, change the map’s visible extent to match the selected geometry.  If 2, make sure the selected geometry is visible (default).

displayNotEdited

{Boolean} If “false”, display only the edited feature.  If “true”, shows the edited features and the others.  Only relevant when automaticMode is false.

Functions

editGeometryVisual

editGeometryVisual: function(geometry,
record,
edited)

How to represent a geometry in the grid.  It will be the thing the user will have to click in order to edit the geometry.

Parameters

geometry{OpenLayers.Geometry}
record{<Ext.data.Record>}
edited{Boolean} true if the geometry is being edited on the map.

editFirstGeometry

editFirstGeometry: function(record)

Start to edit the first geometry of the given feature.  Usefull only if not in automatic mode

Parameters

record{<Ext.data.Record>}

setAutomaticMode

setAutomaticMode: function(automatic)

Change the mode.

Parameters

automatic{Boolean}

setDisplayNotEdited

setDisplayNotEdited: function(value)

Change the configuration of what should be displayed.

Parameters

value{Boolean}

createRecord

mapfish.widgets.editing.FeatureList.createRecord = function(cols)

Generate a Record constructor for a specific record layout and with support for the ‘geo’ type.  This function wraps Ext.data.Record.create.

Parameters

cols{Array} An Array of field definition objects which specify field names, and optionally, data types, and a mapping for an Ext.data.Reader to extract the field’s value from a data object.  For further information see the Ext API reference (Ext.data.Record.create).

Returns {Function} - Record constructor

Instances of OpenLayers.Map are interactive maps embedded in a web page.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
editGeometryVisual: function(geometry,
record,
edited)
How to represent a geometry in the grid.
editFirstGeometry: function(record)
Start to edit the first geometry of the given feature.
setAutomaticMode: function(automatic)
Change the mode.
setDisplayNotEdited: function(value)
Change the configuration of what should be displayed.
mapfish.widgets.editing.FeatureList.createRecord = function(cols)
Generate a Record constructor for a specific record layout and with support for the ‘geo’ type.
A Geometry is a description of a geographic object.
Close