How to use the ngeo/datasource/DataSources.js.name function in ngeo

To help you get started, we’ve selected a few ngeo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github camptocamp / ngeo / examples / bboxquery.js View on Github external
import ngeoMiscBtnComponent from 'ngeo/misc/btnComponent.js';

import ngeoQueryModule from 'ngeo/query/module.js';
import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerImage from 'ol/layer/Image.js';
import olLayerTile from 'ol/layer/Tile.js';
import olSourceImageWMS from 'ol/source/ImageWMS.js';
import olSourceOSM from 'ol/source/OSM.js';


/** @type {!angular.IModule} */
const module = angular.module('app', [
  'gettext',
  ngeoDatasourceDataSources.name,
  ngeoMapModule.name,
  ngeoMiscBtnComponent.name,
  ngeoQueryModule.name
]);


module.run(/* @ngInject */ ($templateCache) => {
  // @ts-ignore: webpack
  $templateCache.put('partials/queryresult', require('./partials/queryresult.html'));
});


module.value('ngeoQueryOptions', {
  'limit': 20
});
github camptocamp / ngeo / examples / query.js View on Github external
import ngeoQueryComponent from 'ngeo/query/component.js';
import ngeoQueryPanelComponent from 'ngeo/query/panelComponent.js';
import ngeoQueryModule from 'ngeo/query/module.js';

import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerImage from 'ol/layer/Image.js';
import olLayerTile from 'ol/layer/Tile.js';
import olSourceImageWMS from 'ol/source/ImageWMS.js';
import olSourceOSM from 'ol/source/OSM.js';


/** @type {angular.IModule} **/
const module = angular.module('app', [
  'gettext',
  ngeoDatasourceDataSources.name,
  ngeoMapModule.name,
  ngeoMiscBtnComponent.name,
  ngeoMiscToolActivateMgr.name,
  ngeoQueryComponent.name,
  ngeoQueryPanelComponent.name,
  ngeoQueryModule.name,
]);


module.run(
  /**
   * @ngInject
   * @param {angular.ITemplateCacheService} $templateCache
   */
  ($templateCache) => {
    // @ts-ignore: webpack
github camptocamp / ngeo / contribs / gmf / src / layertree / datasourceGroupTreeComponent.js View on Github external
import angular from 'angular';
import ngeoDatasourceDataSources from 'ngeo/datasource/DataSources.js';
import {getUid as olUtilGetUid} from 'ol/util.js';


/**
 * @type {!angular.IModule}
 * @hidden
 */
const module = angular.module('gmfLayertreeDatasourceGroupTreeComponent', [
  ngeoDatasourceDataSources.name,
]);


module.run(/* @ngInject */ ($templateCache) => {
  $templateCache.put(
    // @ts-ignore: webpack
    'gmf/layertree/datasourceGroupTreeComponent', require('./datasourceGroupTreeComponent.html')
  );
});


module.value('gmfLayertreeDatasourceGroupTreeTemplateUrl',
  /**
   * @param {!angular.IAttributes} $attrs Attributes.
   * @return {string} The template url.
   */
github camptocamp / ngeo / examples / mapquery.js View on Github external
import ngeoMiscToolActivateMgr from 'ngeo/misc/ToolActivateMgr.js';
import ngeoQueryMapQueryComponent from 'ngeo/query/mapQueryComponent.js';
import ngeoQueryModule from 'ngeo/query/module.js';

import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerImage from 'ol/layer/Image.js';
import olLayerTile from 'ol/layer/Tile.js';
import olSourceImageWMS from 'ol/source/ImageWMS.js';
import olSourceOSM from 'ol/source/OSM.js';


/** @type {!angular.IModule} **/
const module = angular.module('app', [
  'gettext',
  ngeoDatasourceDataSources.name,
  ngeoMapModule.name,
  ngeoMiscBtnComponent.name,
  ngeoMiscToolActivateMgr.name,
  ngeoQueryMapQueryComponent.name,
  ngeoQueryModule.name,
]);


module.run(/* @ngInject */ ($templateCache) => {
  // @ts-ignore: webpack
  $templateCache.put('partials/queryresult', require('./partials/queryresult.html'));
});


module.value('ngeoQueryOptions', {
  'limit': 20
github camptocamp / ngeo / contribs / gmf / examples / importdatasource.js View on Github external
import olSourceOSM from 'ol/source/OSM.js';


/**
 * @type {angular.IModule}
 * @hidden
 */
const module = angular.module('gmfapp', [
  'gettext',
  gmfDatasourceManager.name,
  gmfImportImportdatasourceComponent.name,
  gmfLayertreeComponent.name,
  gmfLayertreeTreeManager.name,
  gmfMapComponent.name,
  gmfThemeThemes.name,
  ngeoDatasourceDataSources.name,
  ngeoQueryBboxQueryComponent.name,
  ngeoQueryMapQueryComponent.name,
]);


module.value('gmfTreeUrl', appURL.GMF_THEMES);
module.value('gmfLayersUrl', appURL.GMF_LAYERS);


module.value('gmfExternalOGCServers', [{
  'name': 'Swiss Topo WMS',
  'type': 'WMS',
  'url': 'https://wms.geo.admin.ch/?lang=fr'
}, {
  'name': 'ASIT VD',
  'type': 'WMTS',
github camptocamp / ngeo / contribs / gmf / src / datasource / ExternalDataSourcesManager.js View on Github external
* @private
 * @hidden
 */
function getId(layer) {
  return Number(olUtilGetUid(layer)) + 1000000;
}


/**
 * @type {angular.IModule}
 * @hidden
 */
const module = angular.module('gmfExternalDataSourcesManager', [
  ngeoMapLayerHelper.name,
  ngeoMiscFile.name,
  ngeoDatasourceDataSources.name,
]);
module.service('gmfExternalDataSourcesManager', ExternalDatSourcesManager);


export default module;
github camptocamp / ngeo / src / datasource / Helper.js View on Github external
handleDataSourcesRemove_(evt) {
    if (evt instanceof CollectionEvent) {
      const dataSource = evt.element;
      this.unregisterDataSource_(dataSource);
    }
  }

}


/**
 * @type {angular.IModule}
 * @hidden
 */
const module = angular.module('ngeoDataSourcesHelper', [
  ngeoDatasourceDataSources.name,
  ngeoQueryQuerent.name,
]);
module.service('ngeoDataSourcesHelper', DatasourceHelper);


export default module;
github camptocamp / ngeo / src / datasource / module.js View on Github external
import angular from 'angular';
import ngeoDatasourceDataSources from 'ngeo/datasource/DataSources.js';
import ngeoDatasourceHelper from 'ngeo/datasource/Helper.js';

/**
 * @type {angular.IModule}
 */
export default angular.module('ngeoDatasourceModule', [
  ngeoDatasourceDataSources.name,
  ngeoDatasourceHelper.name,
]);