queries

experimental mobile
Available for:Map Panel

With queries interface it is possible to register and manage WFS and GeoPackage database queries in the app.

Methods

Name Summary
add

Adds a new query.

find

Finds query items.

remove

Removes query by id

removeAll

Removes all queries

Example

Basic instrumentation for registering new query:

gsp.queries.add({
      queryName: "QueryNo1",
      featureSourceDescriptionId: "A7C84429-7EFA-40EB-918F-6449DE6B33D5",
      filter: { operator: "propertyIsEqualTo", operands: [ { operator: "valueReference", value: "ANNULSNOW" }, { operator: "literal", value: "3" } ] }
   },
   function (result) {
      console.log("Placeholder for callback operation.");
   },
   function (result) {
      console.log("Placeholder for errback operation.");
   }
);

Methods • Details

add(config, callback, errback) → {void}(async)

experimental mobile async
Available for:Map Panel

Adds a new query.

Parameters

Name Type Description
config Object
{
 "featureSourceDescriptionId": String,
 "filter": Object,
 "filter.operator": String,
 "filter.operands": Array.<Operand>,
 "queryName": Object
}

Query configuration object

featureSourceDescriptionId

Feature source description id. FeatureSourceDescriptionId and filter must be provided

filter

Filter

filter.operator

Filter operator. Avaliable operators for WFS query: propertyIsLike, propertyIsEqualTo, propertyIsNotEqualTo, propertyIsGreaterThanOrEqualTo, propertyIsLessThanOrEqualTo, propertyIsGreaterThan, propertyIsLessThan, propertyIsBetween, or, and The GeoPackage database query supports all WFS query filter operators except: and and or

filter.operands

Array of filter operands

queryName

Display query name

callback

Callback executed on success

errback optional

Callback executed on failure

Returns

TypeDescription
void

find(config, callback, errback) → {void}(async)

experimental mobile async
Available for:Map Panel

Finds query items.

Parameters

Name Type Description
config Object
{
 "id": String,
 "name": String
}

Find queries configuration object

id optional

Query id

name optional

Query name

callback

Callback executed on success.

errback optional

Callback executed on failure.

Returns

TypeDescription
void

remove(id, callback, errback) → {void}(async)

experimental mobile async
Available for:Map Panel

Removes query by id

Parameters

Name Type Description
id String

Query id.

callback

Callback executed on success.

errback optional

Callback executed on failure.

Returns

TypeDescription
void

removeAll(callback, errback) → {void}(async)

experimental mobile async
Available for:Map Panel

Removes all queries

Parameters

Name Type Description
callback

Callback executed on success.

errback optional

Callback executed on failure.

Returns

TypeDescription
void