Class: module:ExternalDataSourcesManager service:gmfExternalDataSourcesManager

gmf.datasource.module:ExternalDataSourcesManager.gmf.datasource.module:ExternalDataSourcesManager

new module:ExternalDataSourcesManager(gettextCatalog, $injector, $q, $rootScope, ngeoDataSources, ngeoFile, ngeoLayerHelper)

External data sources come remote online resources, such as WMS/WMTS servers, and also files such as KML/GPX. This service is responsible of creating, storing and managing them.

Parameters:
Name Type Description
gettextCatalog !angularGettext.Catalog

service.

$injector !angular.$injector

Main injector.

$q !angular.$q

The Angular $q service.

$rootScope !angular.Scope

The rootScope provider.

ngeoDataSources !ngeo.datasource.DataSources

Ngeo data sources service.

ngeoFile !ngeo.misc.File

Ngeo file.

ngeoLayerHelper !ngeo.map.LayerHelper

Ngeo layer helper service

Members

fileGroup

layerGroup

map

wmsGroups

wmsGroupsCollection

wmtsGroups

wmtsGroupsCollection

Methods

createAndAddDataSourceFromFile(file, opt_callback)

Parameters:
Name Type Description
file !File

File.

opt_callback function(boolean):*?

Callback called with true if the file is loaded and added. Otherwise with false.

createAndAddDataSourceFromWMSCapability(layer, capabilities, url)

Parameters:
Name Type Description
layer !Object

WMS Capability Layer object.

capabilities !Object

WMS Capabilities definition

url string

The WMS service url.

createAndAddDataSourceFromWMTSCapability(layer, capabilities, wmtsUrl)

Parameters:
Name Type Description
layer !Object

WTMS Capability Layer object.

capabilities !Object

WMTS Capabilities definition

wmtsUrl string

The WMTS capabilities url

getWMSGroup(url)

Parameters:
Name Type Description
url string

Online resource url

Returns:

getWMTSGroup(url)

Parameters:
Name Type Description
url string

Online resource url

Returns:

isExternalDataSource(dataSource)

Parameters:
Name Type Description
dataSource !ngeo.datasource.DataSource

Data source

Returns:
boolean

Whether the given data source is external or not. To be considered external, it needs to be in the external data source hash (cache).