new module:Querent($http, $q, ngeoRuleHelper, ngeoWMSTime)
The ngeo Querent is a service that issues all sorts of queries using ngeo data sources. It does not store the result. Instead, it returns it using promises. Any component that inject this service can use it to make it issue its own queries and do whatever it wants with the result.
It supports sending OGC requests and parse the response, such as:
- WFS DescribeFeatureType
- WFS GetFeature
- WMS GetCapabilites
- WMS GetFeatureInfo
- WMTS GetCapabilities
Parameters:
Name | Type | Description |
---|---|---|
$http |
angular.$http | Angular $http service. |
$q |
angular.$q | The Angular $q service. |
ngeoRuleHelper |
!ngeo.filter.RuleHelper | Ngeo rule helper service. |
ngeoWMSTime |
!ngeo.misc.WMSTime | wms time service. |
Methods
getQueryableDataSources(dataSources, map)
Browse a given list of data sources. Return 2 lists of data sources that are queryable, the first one being those that support WFS and the other WMS only. This means that WFS is always favored first, then WMS.
The map view resolution determines if the inner ogc layers are in range.
Parameters:
Name | Type | Description |
---|---|---|
dataSources |
!Array. | Data sources |
map |
ol.Map | Map. |
Returns:
Queryable data sources.
issue(options)
Issue WMS GetFeatureInfo and/or WFS GetFeature requests using the given data sources, map and optional filters.
Parameters:
Name | Type | Description |
---|---|---|
options |
ngeox.IssueGetFeaturesOptions | Options. |
Returns:
Promise.
wfsDescribeFeatureType(dataSource)
Parameters:
Name | Type | Description |
---|---|---|
dataSource |
ngeo.datasource.OGC | Data source. |
Returns:
Promise.
wmsFindLayerCapability(layerCapabilities, layerName)
Parameters:
Name | Type | Description |
---|---|---|
layerCapabilities |
!Array. | List of WMS layer capabilities |
layerName |
string | Name of the WMS layer |
Returns:
Found WMS layer capability
wmsGetCapabilities(baseUrl, [opt_cache]opt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
baseUrl |
string | Base url of the WMS server. |
|
[opt_cache] |
boolean= |
<optional> |
Whether to use the cached capability, if
available. Enabling this will also store the capability when required
for the first time. Defaults to: |
Returns:
Promise.
wmtsFindLayerCapability(layerCapabilities, layerName)
Parameters:
Name | Type | Description |
---|---|---|
layerCapabilities |
!Array. | List of WMTS layer capabilities |
layerName |
string | Name of the WMTS layer, a.k.a. the identifier. |
Returns:
Found WTMS layer capability
wmtsGetCapabilities(url, [opt_cache]opt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | Url of the WMTS server. Note that it must contain all required arguments. |
|
[opt_cache] |
boolean= |
<optional> |
Whether to use the cached capability, if
available. Enabling this will also store the capability when required
for the first time. Defaults to: |
Returns:
Promise.