Class: EditFeature

gmf.editing.EditFeature

new EditFeature($http, gmfLayersUrl)

Service that provides methods to get, insert, update and delete vector features with the use of a GeoMapFish Protocol as back-end.

The GeoJSON format is used when obtaining or sending features.

Parameters:
Name Type Description
$http angular.$http

Angular http service.

gmfLayersUrl string

Url to the GeoMapFish layers service.

Members

(static, non-null) module: angular.Module

Methods

deleteFeature(layerId, feature)

Parameters:
Name Type Description
layerId number

The layer id that contains the feature.

feature ol.Feature

The feature to delete.

Returns:

getFeaturesInExtent(layerIds, extent)

Build a query to the MapFish protocol to fetch features from a list of layer ids inside a specified extent.

Parameters:
Name Type Description
layerIds Array.

List of layer ids to get the features from.

extent ol.Extent

The extent where to get the features from.

Returns:

getFeaturesWithComparisonFilters(layerIds, filters)

Build a query to the MapFish protocol to fetch features from a list of layer ids and a list of comparison filters.

This method is called in the ObjectEditing service, which is injected in the permalink service, i.e. it's always called. Since we don't have to define the url to the GMF Protocol (layers) a dummy promise returns an empty array of features if the url is not defined.

Parameters:
Name Type Description
layerIds !Array.

List of layer ids to get the features from.

filters !Array.

List of comparison filters

Returns:

insertFeatures(layerId, features)

Parameters:
Name Type Description
layerId number

The layer id that contains the feature.

features Array.

List of features to insert.

Returns:

updateFeature(layerId, feature)

Parameters:
Name Type Description
layerId number

The layer id that contains the feature.

feature ol.Feature

The feature to update.

Returns: