Class: DataSourcesHelper service:ngeoDataSourcesHelper

ngeo.DataSourcesHelper

new DataSourcesHelper($q, ngeoDataSources, ngeoQuerent)

A service that provides utility methods to manipulate or get data sources.

Parameters:
Name Type Description
$q angular.$q

The Angular $q service.

ngeoDataSources ngeo.DataSources

Ngeo data source collection.

ngeoQuerent ngeo.Querent

Ngeo querent service.

Members

collection

Methods

getDataSource(id)

Return a data source using its id.

Parameters:
Name Type Description
id number

Data source id.

Returns:
?ngeo.DataSource

Data source.

getDataSourceAttributes(dataSource)

Get the attributes of a data source. If they are not set, they are obtained from the querent service using a WFS DescribeFeatureType request, then set in the data source.

Please, note that in order to be dynamically set, the data source must only have 1 ogcLayer set and be queryable.

Parameters:
Name Type Description
dataSource ngeo.DataSource

Filtrable data source.

Returns: