How to use the ngeo/map/module.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 / offline.js View on Github external
center: [352379, 5172733],
        zoom: 4
      })
    });

    ngeoFeatureOverlayMgr.init(this.map);

    ngeoOfflineServiceManager.setSaveService('offlineDownloader');
    ngeoOfflineServiceManager.setRestoreService('ngeoOfflineRestorer');
  }
}

/** @type {!angular.IModule} **/
MainController.module = angular.module('app', [
  'gettext',
  ngeoMapModule.name,
  ngeoOfflineModule.name,
  NgeoOfflineServiceManager.module.name,
]);

MainController.module.value('ngeoOfflineTestUrl', '../../src/offline/component.html');

// Define the offline download configuration service
ngeoOfflineModule.service('ngeoOfflineConfiguration', ngeoOfflineConfiguration);

MainController.module.controller('MainController', MainController);


export default MainController;
github camptocamp / ngeo / contribs / gmf / examples / lidarprofile.js View on Github external
import ngeoMapModule from 'ngeo/map/module.js';
import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerTile from 'ol/layer/Tile.js';
import olSourceOSM from 'ol/source/OSM.js';


/**
 * @type {!angular.IModule}
 * @hidden
 */
const module = angular.module('gmfapp', [
  'gettext',
  gmfMapComponent.name,
  gmfLidarprofileModule.name,
  ngeoMapModule.name, // for ngeo.map.FeatureOverlay, perhaps remove me
]);


module.value('pytreeLidarprofileJsonUrl', 'https://sitn.ne.ch/pytree');


/**
 * @param {angular.IScope} $scope Angular scope.
 * @constructor
 * @ngInject
 */
function MainController($scope) {
  /**
   * @type {import("ol/geom/LineString.js").default}
   */
  this.profileLine = null;
github camptocamp / ngeo / examples / svg.js View on Github external
import Map from 'ol/Map.js';
import View from 'ol/View.js';
import LayerVector from 'ol/layer/Vector.js';
import SourceVector from 'ol/source/Vector.js';
import Feature from 'ol/Feature.js';
import Point from 'ol/geom/Point.js';
import Style from 'ol/style/Style.js';
import Icon from 'ol/style/Icon.js';

import MapModule from 'ngeo/map/module.js';


/** @type {!angular.IModule} **/
const appmodule = angular.module('app', [
  MapModule.name,
]);


/**
 * @constructor
 * @ngInject
 * @hidden
 */
function MainController() {
  const source = new SourceVector();
  const feature1 = new Feature({
    geometry: new Point([2599000, 1200000])
  });
  feature1.setStyle([new Style({
    image: new Icon({
      // @ts-ignore: For Webpack
github camptocamp / ngeo / examples / modifycircle.js View on Github external
import olView from 'ol/View.js';
import olLayerTile from 'ol/layer/Tile.js';
import olLayerVector from 'ol/layer/Vector.js';
import olSourceOSM from 'ol/source/OSM.js';
import olSourceVector from 'ol/source/Vector.js';
import olGeomCircle from 'ol/geom/Circle.js';
import {fromCircle} from 'ol/geom/Polygon.js';
import olCollection from 'ol/Collection.js';
import olFeature from 'ol/Feature.js';
import ngeoMapModule from 'ngeo/map/module.js';


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


/**
 * @constructor
 * @ngInject
 */
function MainController() {

  /**
   * @type {import("ol/Map.js").default}
   */
  this.map = new olMap({
    layers: [
      new olLayerTile({
        source: new olSourceOSM()
github camptocamp / ngeo / examples / drawfeature.js View on Github external
import ngeoMapModule from 'ngeo/map/module.js';
import ngeoMiscToolActivate from 'ngeo/misc/ToolActivate.js';
import ngeoMiscToolActivateMgr from 'ngeo/misc/ToolActivateMgr.js';
import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerTile from 'ol/layer/Tile.js';
import olLayerVector from 'ol/layer/Vector.js';
import olSourceOSM from 'ol/source/OSM.js';
import olSourceVector from 'ol/source/Vector.js';


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


/**
 * @param {!angular.IScope} $scope Angular scope.
 * @param {import("ol/Collection.js").default.} ngeoFeatures Collection
 *    of features.
 * @param {import("ngeo/misc/ToolActivateMgr.js").ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate
 *    manager service.
 * @ngInject
 * @constructor
 */
function MainController($scope, ngeoFeatures, ngeoToolActivateMgr) {

  /**
github camptocamp / ngeo / examples / importfeatures.js View on Github external
import ngeoMiscFilereaderComponent from 'ngeo/misc/filereaderComponent.js';

import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import * as olExtent from 'ol/extent.js';
import olFormatKML from 'ol/format/KML.js';
import olLayerTile from 'ol/layer/Tile.js';
import olLayerVector from 'ol/layer/Vector.js';
import olSourceOSM from 'ol/source/OSM.js';
import olSourceVector from 'ol/source/Vector.js';


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


/**
 * @constructor
 * @param {angular.IScope} $scope Scope.
 * @ngInject
 */
function MainController($scope) {

  /**
   * @private
   * @type {import("ol/format/KML.js").default}
   */
  this.kmlFormat_ = new olFormatKML({
github camptocamp / ngeo / examples / routing.js View on Github external
import 'ol/ol.css';
import 'bootstrap/dist/css/bootstrap.css';
import '@fortawesome/fontawesome-free/css/fontawesome.min.css';

import angular from 'angular';
import ngeoMapModule from 'ngeo/map/module.js';
import ngeoRoutingModule from 'ngeo/routing/module.js';
import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerTile from 'ol/layer/Tile.js';
import olSourceOSM from 'ol/source/OSM.js';

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


/**
 * The application's main directive.
 * @constructor
 * @ngInject
 */
function MainController() {

  /**
   * @type {import("ol/Map.js").default}
   */
  this.map = new olMap({
    layers: [
github camptocamp / ngeo / examples / asitvd.js View on Github external
import './asitvd.css';
import angular from 'angular';
import ngeoSourceAsitVD from 'ngeo/source/AsitVD.js';
import EPSG21781 from '@geoblocks/proj/src/EPSG_21781.js';

import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olLayerTile from 'ol/layer/Tile.js';
import ngeoMapModule from 'ngeo/map/module.js';


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


/**
 * @constructor
 * @ngInject
 */
function MainController() {
  /**
   * @type {import("ol/Map.js").default}
   */
  this.map = new olMap({
    layers: [
      new olLayerTile({
        source: new ngeoSourceAsitVD({
          layer: 'asitvd.fond_couleur'
github camptocamp / ngeo / examples / googlestreetview.js View on Github external
import olLayerTile from 'ol/layer/Tile.js';
import olSourceOSM from 'ol/source/OSM.js';
import olStyleFill from 'ol/style/Fill.js';
import olStyleStroke from 'ol/style/Stroke.js';
import olStyleStyle from 'ol/style/Style.js';
import olStyleText from 'ol/style/Text.js';
import ngeoGooglestreetviewModule from 'ngeo/googlestreetview/module.js';
import ngeoMapModule from 'ngeo/map/module.js';
import ngeoMiscToolActivate from 'ngeo/misc/ToolActivate.js';
import ngeoMiscToolActivateMgr from 'ngeo/misc/ToolActivateMgr.js';


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


/**
 * @param {import("ngeo/map/FeatureOverlayMgr.js").FeatureOverlayMgr} ngeoFeatureOverlayMgr
 *    Ngeo FeatureOverlay manager.
 * @param {import("ngeo/misc/ToolActivateMgr.js").ToolActivateMgr} ngeoToolActivateMgr
 *    Ngeo ToolActivate manager service.
 * @constructor
 * @ngInject
 */
function MainController(ngeoFeatureOverlayMgr, ngeoToolActivateMgr) {

  /**
github camptocamp / ngeo / examples / control.js View on Github external
import angular from 'angular';
import ngeoMapModule from 'ngeo/map/module.js';

import ngeoMiscControlComponent from 'ngeo/misc/controlComponent.js';

import olMap from 'ol/Map.js';
import olView from 'ol/View.js';
import olControlMousePosition from 'ol/control/MousePosition.js';
import olLayerTile from 'ol/layer/Tile.js';
import olSourceOSM from 'ol/source/OSM.js';


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


/**
 * @constructor
 * @ngInject
 */
function MainController() {

  /**
   * @type {import("ol/Map.js").default}
   */
  this.map = new olMap({
    layers: [
      new olLayerTile({