mapfish.Protocol.MapFish

MapFish Protocol class.  This class is a decorator class to OpenLayers.Protocol.HTTP

Inherits from

Summary
mapfish.Protocol.MapFishMapFish Protocol class.
Properties
wildcarded.{Boolean} If true percent signs are added around values read from LIKE filters, for example if the protocol read method is passed a LIKE filter whose property is “foo” and whose value is “bar” the string “foo__ilike=%bar%” will be sent in the query string; defaults to false.
Constructor
mapfish.Protocol.MapFish
Functions
createCreate features.
readConstruct a request for reading new features.
updateConstruct a request updating modified features.
deleteConstruct a request deleting a removed feature.
createShortcut to create MapFish Protocol decorated with TriggerEventDecorator and MergeFilterDecorator

Properties

wildcarded.

{Boolean} If true percent signs are added around values read from LIKE filters, for example if the protocol read method is passed a LIKE filter whose property is “foo” and whose value is “bar” the string “foo__ilike=%bar%” will be sent in the query string; defaults to false.

Constructor

mapfish.Protocol.MapFish

Parameters

options{Object}

Functions

create

"create": function(features,
options)

Create features.

Parameters

features{Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector}
options{Object} Optional object for configuring the request.  This object is modified and should not be reused.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, whose “priv” property references the HTTP request, this object is also passed to the callback function when the request completes, its “features” property is then populated with the the features received from the server.

read

"read": function(options)

Construct a request for reading new features.

Parameters

options{Object} Optional object for configuring the request.  This object is modified and should not be reused.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, whose “priv” property references the HTTP request, this object is also passed to the callback function when the request completes, its “features” property is then populated with the the features received from the server.

update

"update": function(features,
options)

Construct a request updating modified features.

Parameters

features{Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector}
options{Object} Optional object for configuring the request.  This object is modified and should not be reused.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, whose “priv” property references the HTTP request, this object is also passed to the callback function when the request completes, its “features” property is then populated with the the features received from the server.

delete

"delete": function(feature,
options)

Construct a request deleting a removed feature.

Parameters

feature{OpenLayers.Feature.Vector}
options{Object} Optional object for configuring the request.  This object is modified and should not be reused.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, whose “priv” property references the HTTP request, this object is also passed to the callback function when the request completes.

create

mapfish.Protocol.MapFish.create = function(config)

Shortcut to create MapFish Protocol decorated with TriggerEventDecorator and MergeFilterDecorator

Example of use

var protocol = mapfish.Protocol.MapFish.create({
    url: url,
});

Parameters

config{Object} The config of the decorated MapFish protocol

Returns

{mapfish.Protocol.MapFish} The resulting protocol.

"create": function(features,
options)
Create features.
"read": function(options)
Construct a request for reading new features.
"update": function(features,
options)
Construct a request updating modified features.
"delete": function(feature,
options)
Construct a request deleting a removed feature.
A basic HTTP protocol for vector layers.
Vector features use the OpenLayers.Geometry classes as geometry description.
Protocols return Response objects to their users.
Close