How to use the @igo2/common.ToolComponent function in @igo2/common

To help you get started, we’ve selected a few @igo2/common 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 infra-geo-ouverte / igo2-lib / packages / integration / src / lib / filter / time-filter-tool / time-filter-tool.component.ts View on Github external
import { Component } from '@angular/core';

import { ToolComponent } from '@igo2/common';

@ToolComponent({
  name: 'timeFilter',
  title: 'igo.integration.tools.timeFilter',
  icon: 'history'
})
@Component({
  selector: 'igo-time-filter-tool',
  templateUrl: './time-filter-tool.component.html'
})
export class TimeFilterToolComponent {
  constructor() {}
}
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / map / map-tool / map-tool.component.ts View on Github external
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';

import { ToolComponent } from '@igo2/common';
import { LayerListControlsEnum } from '@igo2/geo';

import { LayerListControlsOptions } from '../shared/map-details-tool.interface';
/**
 * Tool to browse a map's layers or to choose a different map
 */
@ToolComponent({
  name: 'map',
  title: 'igo.integration.tools.map',
  icon: 'map'
})
@Component({
  selector: 'igo-map-tool',
  templateUrl: './map-tool.component.html',
  styleUrls: ['./map-tool.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class MapToolComponent {

  @Input() toggleLegendOnVisibilityChange: boolean = false;

  @Input() expandLegendOfVisibleLayers: boolean = false;
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / print / print-tool / print-tool.component.ts View on Github external
import { Component } from '@angular/core';

import { ToolComponent } from '@igo2/common';
import { IgoMap } from '@igo2/geo';

import { MapState } from '../../map/map.state';

@ToolComponent({
  name: 'print',
  title: 'igo.integration.tools.print',
  icon: 'printer'
})
@Component({
  selector: 'igo-print-tool',
  templateUrl: './print-tool.component.html'
})
export class PrintToolComponent {
  get map(): IgoMap {
    return this.mapState.map;
  }

  constructor(private mapState: MapState) {}
}
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / search / search-results-tool / search-results-tool.component.ts View on Github external
Feature,
  FeatureMotion,
  LAYER,
  SearchResult,
  IgoMap,
  moveToOlFeatures
} from '@igo2/geo';

import { MapState } from '../../map/map.state';

import { SearchState } from '../search.state';

/**
 * Tool to browse the search results
 */
@ToolComponent({
  name: 'searchResults',
  title: 'igo.integration.tools.searchResults',
  icon: 'magnify'
})
@Component({
  selector: 'igo-search-results-tool',
  templateUrl: './search-results-tool.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class SearchResultsToolComponent {
  /**
   * to show hide results icons
   */
  @Input() showIcons: boolean = true;

  /**
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / catalog / catalog-tool / catalog-tool.component.ts View on Github external
import { Component } from '@angular/core';

import { ToolComponent } from '@igo2/common';

import { ToolState } from '../../tool/tool.state';

@ToolComponent({
  name: 'catalog',
  title: 'igo.integration.tools.catalog',
  icon: 'photo_library'
})
@Component({
  selector: 'igo-catalog-tool',
  templateUrl: './catalog-tool.component.html'
})
export class CatalogToolComponent {

  constructor(private toolState: ToolState) {}

  onFeatureSelect() {
    this.toolState.toolbox.activateTool('catalogLayers');
  }
}
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / catalog / catalog-library-tool / catalog-library-tool.component.ts View on Github external
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';

import { ToolComponent } from '@igo2/common';

import { EntityStore } from '@igo2/common';
import { Catalog, CatalogService } from '@igo2/geo';

import { ToolState } from '../../tool/tool.state';
import { CatalogState } from '../catalog.state';

/**
 * Tool to browse the list of available catalogs.
 */
@ToolComponent({
  name: 'catalog',
  title: 'igo.integration.tools.catalog',
  icon: 'layers-plus'
})
@Component({
  selector: 'igo-catalog-library-tool',
  templateUrl: './catalog-library-tool.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class CatalogLibraryToolComponent implements OnInit {
  /**
   * Store that contains the catalogs
   * @internal
   */
  get store(): EntityStore {
    return this.catalogState.catalogStore;
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / catalog / catalog-browser-tool / catalog-browser-tool.component.ts View on Github external
import {
  IgoMap,
  Catalog,
  CatalogItem,
  CatalogItemState,
  CatalogService
} from '@igo2/geo';

import { MapState } from '../../map/map.state';
import { CatalogState } from '../catalog.state';

/**
 * Tool to browse a catalog's groups and layers and display them to a map.
 */
@ToolComponent({
  name: 'catalogBrowser',
  title: 'igo.integration.tools.catalog',
  icon: 'photo-browser',
  parent: 'catalog'
})
@Component({
  selector: 'igo-catalog-browser-tool',
  templateUrl: './catalog-browser-tool.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class CatalogBrowserToolComponent implements OnInit, OnDestroy {
  catalog: Catalog;

  /**
   * Store that contains the catalog items
   * @internal
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / context / context-editor-tool / context-editor-tool.component.ts View on Github external
import { Component } from '@angular/core';

import { ToolComponent } from '@igo2/common';

@ToolComponent({
  name: 'contextEditor',
  title: 'igo.integration.tools.contexts',
  icon: 'star',
  parent: 'contextManager'
})
@Component({
  selector: 'igo-context-editor-tool',
  templateUrl: './context-editor-tool.component.html'
})
export class ContextEditorToolComponent {}
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / context / context-permission-manager-tool / context-permission-manager-tool.component.ts View on Github external
import { Component } from '@angular/core';

import { ToolComponent } from '@igo2/common';

@ToolComponent({
  name: 'contextPermissionManager',
  title: 'igo.integration.tools.contexts',
  icon: 'star',
  parent: 'contextManager'
})
@Component({
  selector: 'igo-context-permission-manager-tool',
  templateUrl: './context-permission-manager-tool.component.html'
})
export class ContextPermissionManagerToolComponent {}
github infra-geo-ouverte / igo2-lib / packages / integration / src / lib / directions / directions-tool / directions-tool.component.ts View on Github external
import { Component } from '@angular/core';

import { ToolComponent } from '@igo2/common';
import { IgoMap } from '@igo2/geo';

import { MapState } from '../../map/map.state';

@ToolComponent({
  name: 'directions',
  title: 'igo.integration.tools.directions',
  icon: 'directions'
})
@Component({
  selector: 'igo-directions-tool',
  templateUrl: './directions-tool.component.html'
})
export class DirectionsToolComponent {
  get map(): IgoMap {
    return this.mapState.map;
  }

  constructor(private mapState: MapState) {}
}