The main purpose of this widget is to act as an API for GeoPrisma. It can be used as a single point of entry for external JavaScript libraries to interact with GeoPrisma and its widgets. It is done so using methods, which are described in details below.
Note
Each method receives a list of arguments and delegate them to an event they trigger. Widgets that need to interact with an event need to listen to it and then react accordingly.
Here’s the list of the currently supported methods, each defining their required arguments, an example of use and the widgets using them.
This method fires the ‘applyfilters’ event.
Arguments :
(Array): | An array of hash objects containing the following keys and values :
|
---|
Example :
GeoPrisma.applyFilters([{
resource: "R_Park",
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.LIKE,
property: "REG_CODE",
value: "24"
})
}]);
Widgets :
This method fires the ‘applyfilters’ event.
Arguments :
(Object): | A hash object containing the following keys and values :
|
---|
Example :
GeoPrisma.applyFilter({
resource: "R_Park",
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.LIKE,
property: "REG_CODE",
value: "24"
})
});
Widgets :
Note
This method fires the same event as the applyFilters one. Its used to apply a single filter to a single resource using the object as the argument instead of an array.
The following methods are available for use internally in GeoPrisma API and is destined for development use.
Returns :
(Array) of OpenLayers.Layer objects that match the specified search options.
Arguments :
(Object): | A hash option that can have any or all of the following search criteria :
|
---|
Example :
var matchLayers = GeoPrisma.getLayers({
resourceName: "R_Park",
serviceType: "wms"
});
See in code for more documentation.
N/A
read