@igo2/geo 19.0.0-next.28 → 19.0.0-next.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Inject, Injectable, Input, Optional, Component, EventEmitter, Output, ChangeDetectionStrategy, HostBinding, ViewChildren, Self, Directive, TemplateRef, ContentChild, HostListener, signal, effect, NgModule, Pipe, ViewChild, ViewEncapsulation, Injector, InjectionToken, provideAppInitializer, inject, ChangeDetectorRef, makeEnvironmentProviders, APP_INITIALIZER } from '@angular/core';
2
+ import { Inject, Injectable, Optional, Input, Component, EventEmitter, Output, ChangeDetectionStrategy, HostBinding, ViewChildren, Self, Directive, TemplateRef, ContentChild, HostListener, signal, effect, NgModule, Pipe, ViewChild, ViewEncapsulation, Injector, InjectionToken, provideAppInitializer, inject, ChangeDetectorRef, makeEnvironmentProviders, APP_INITIALIZER } from '@angular/core';
3
3
  import * as i1$2 from '@angular/cdk/clipboard';
4
4
  import * as i2$2 from '@angular/material/button';
5
5
  import { MatButtonModule } from '@angular/material/button';
@@ -10,9 +10,9 @@ import { MatTooltipModule } from '@angular/material/tooltip';
10
10
  import * as i1$1 from '@igo2/core/language';
11
11
  import { IgoLanguageModule, LanguageService } from '@igo2/core/language';
12
12
  import * as i2 from '@igo2/core/message';
13
- import { IgoMessageModule } from '@igo2/core/message';
13
+ import { MessageService, IgoMessageModule } from '@igo2/core/message';
14
14
  import * as i4 from '@igo2/core/route';
15
- import { Subject, Observable, forkJoin, map as map$1, catchError, of, combineLatest, BehaviorSubject, interval, tap, from, switchMap, first, concatMap as concatMap$1, mergeMap, zip, merge, fromEvent, ReplaySubject, EMPTY, timer, debounceTime as debounceTime$1, filter, pairwise, Subscription, throwError, lastValueFrom, take } from 'rxjs';
15
+ import { Subject, Observable, forkJoin, map as map$1, catchError, of, combineLatest, BehaviorSubject, interval, tap, from, switchMap, first, concatMap as concatMap$1, mergeMap, zip, merge, fromEvent, debounceTime as debounceTime$1, ReplaySubject, EMPTY, timer, filter, pairwise, Subscription, throwError, lastValueFrom, take } from 'rxjs';
16
16
  import { NumberUtils, strEnum, SubjectStatus, uuid, ObjectUtils, Compression, Watcher, Tree, TREE_SEPERATOR, isValidJSON, ChangeUtils, downloadContent, createExcelWorkBook, addExcelSheetToWorkBook, writeExcelFile, isIsoDate, downloadBlob, customCacheHasher } from '@igo2/utils';
17
17
  import { MAC } from 'ol/has';
18
18
  import * as olproj from 'ol/proj';
@@ -53,6 +53,7 @@ import olFormatGML2 from 'ol/format/GML2';
53
53
  import olFormatGML3 from 'ol/format/GML3';
54
54
  import olFormatGML32 from 'ol/format/GML32';
55
55
  import olFormatOSMXML from 'ol/format/OSMXML';
56
+ import { __decorate, __param, __metadata } from 'tslib';
56
57
  import olSourceImageWMS from 'ol/source/ImageWMS';
57
58
  import olSourceWMTS from 'ol/source/WMTS';
58
59
  import { getWidth, getTopLeft } from 'ol/extent.js';
@@ -74,6 +75,8 @@ import { easeOut } from 'ol/easing';
74
75
  import OlVectorLayer from 'ol/layer/Vector';
75
76
  import { getVectorContext, getRenderPixel } from 'ol/render';
76
77
  import { openDB } from 'idb';
78
+ import * as i7$1 from '@igo2/auth';
79
+ import { AuthInterceptor, AuthService } from '@igo2/auth';
77
80
  import { getUid } from 'ol/util';
78
81
  import LayerGroup$1 from 'ol/layer/Group';
79
82
  import { EntityStoreStrategy, getEntityId, getEntityTitle, getEntityProperty, getEntityRevision, getEntityIcon, EntityStore, EntityStoreWatcher, EntityTableColumnRenderer, EntityTableComponent, EntityStoreFilterSelectionStrategy, getEntityTitleHtml, EntityStoreFilterCustomFuncStrategy } from '@igo2/common/entity';
@@ -120,7 +123,6 @@ import { IgoIconComponent, VECTOR_SQUARE_ICON, KEYBOARD_ESC_ICON, ENGINE_ICON }
120
123
  import * as i1$3 from '@igo2/core/network';
121
124
  import { CollapseDirective, CollapsibleComponent } from '@igo2/common/collapsible';
122
125
  import { SanitizeHtmlPipe, CustomHtmlComponent } from '@igo2/common/custom-html';
123
- import { __decorate, __metadata } from 'tslib';
124
126
  import { optionsFromCapabilities } from 'ol/source/WMTS.js';
125
127
  import { Cacheable } from 'ts-cacheable';
126
128
  import olLayerImage from 'ol/layer/Image';
@@ -128,20 +130,18 @@ import olLayerTile from 'ol/layer/Tile';
128
130
  import olLayerVectorTile from 'ol/layer/VectorTile';
129
131
  import { Group } from 'ol/layer.js';
130
132
  import { ListComponent, ListItemDirective } from '@igo2/common/list';
133
+ import { stylefunction } from 'ol-mapbox-style';
134
+ import { SelectionModel } from '@angular/cdk/collections';
131
135
  import * as i8 from '@angular/material/menu';
132
136
  import { MatMenuModule } from '@angular/material/menu';
133
137
  import * as i1$4 from '@igo2/common/form';
134
138
  import { FormDialogService, FormComponent, IgoFormDialogModule, FormFieldComponent, IgoFormFieldComponent } from '@igo2/common/form';
135
- import * as i7$1 from '@igo2/auth';
136
- import { AuthService } from '@igo2/auth';
137
- import { stylefunction } from 'ol-mapbox-style';
138
139
  import { FlatTreeControl, NestedTreeControl } from '@angular/cdk/tree';
139
140
  import * as i7$2 from '@angular/material/slider';
140
141
  import { MatSliderModule, MatSlider } from '@angular/material/slider';
141
142
  import * as i12 from '@angular/material/tree';
142
143
  import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule, MatTreeNestedDataSource } from '@angular/material/tree';
143
144
  import { TreeDragDropDirective, DragAndDropDirective } from '@igo2/common/drag-drop';
144
- import { SelectionModel } from '@angular/cdk/collections';
145
145
  import { PanelComponent } from '@igo2/common/panel';
146
146
  import olGeolocation from 'ol/Geolocation';
147
147
  import OlCircle from 'ol/geom/Circle';
@@ -2106,7 +2106,6 @@ class DataSource {
2106
2106
  generateId() {
2107
2107
  return generateIdFromSourceOptions(this.options);
2108
2108
  }
2109
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2110
2109
  getLegend(_style, _view) {
2111
2110
  return this.legend ? this.legend : [];
2112
2111
  }
@@ -3696,6 +3695,70 @@ function isDateOrRangeInRange(dateOrRange, [min, max]) {
3696
3695
  return isValidAndWithinRange(dateOrRange, [min, max]);
3697
3696
  }
3698
3697
 
3698
+ class OGCFilterService {
3699
+ filterByOgc(wmsDatasource, filterString) {
3700
+ const appliedFilter = new OgcFilterWriter().formatProcessedOgcFilter(filterString, wmsDatasource.options.params.LAYERS);
3701
+ wmsDatasource.ol.updateParams({ FILTER: appliedFilter });
3702
+ }
3703
+ setOgcWFSFiltersOptions(options) {
3704
+ const ogcFilterWriter = new OgcFilterWriter();
3705
+ if (options.ogcFilters.enabled && options.ogcFilters.filters) {
3706
+ options.ogcFilters.filters = ogcFilterWriter.checkIgoFiltersProperties(options.ogcFilters.filters, options.paramsWFS.fieldNameGeometry, new olProjection({ code: options.paramsWFS.srsName }), true);
3707
+ if (!options.ogcFilters.interfaceOgcFilters) {
3708
+ options.ogcFilters.interfaceOgcFilters =
3709
+ ogcFilterWriter.defineInterfaceFilterSequence(options.ogcFilters.filters, options.paramsWFS.fieldNameGeometry);
3710
+ }
3711
+ else {
3712
+ const mergedInterfaceOgcFilters = this.mergeInterfaceFilters(options.ogcFilters.filters, options.ogcFilters.interfaceOgcFilters);
3713
+ options.ogcFilters.interfaceOgcFilters =
3714
+ ogcFilterWriter.defineInterfaceFilterSequence(mergedInterfaceOgcFilters, options.paramsWFS.fieldNameGeometry);
3715
+ }
3716
+ }
3717
+ }
3718
+ setOgcWMSFiltersOptions(wmsDatasource) {
3719
+ const options = wmsDatasource.options;
3720
+ const ogcFilterWriter = new OgcFilterWriter();
3721
+ if (options.ogcFilters.enabled && options.ogcFilters.filters) {
3722
+ options.ogcFilters.filters = ogcFilterWriter.checkIgoFiltersProperties(options.ogcFilters.filters, options.fieldNameGeometry, undefined, true);
3723
+ if (!options.ogcFilters.interfaceOgcFilters) {
3724
+ options.ogcFilters.interfaceOgcFilters =
3725
+ ogcFilterWriter.defineInterfaceFilterSequence(
3726
+ // With some wms server, this param must be set to make spatials call.
3727
+ options.ogcFilters.filters, options.fieldNameGeometry);
3728
+ }
3729
+ else {
3730
+ const mergedInterfaceOgcFilters = this.mergeInterfaceFilters(options.ogcFilters.filters, options.ogcFilters.interfaceOgcFilters);
3731
+ options.ogcFilters.interfaceOgcFilters =
3732
+ ogcFilterWriter.defineInterfaceFilterSequence(mergedInterfaceOgcFilters, options.fieldNameGeometry);
3733
+ }
3734
+ this.filterByOgc(wmsDatasource, ogcFilterWriter.buildFilter(options.ogcFilters.filters, undefined, undefined, undefined, wmsDatasource.options));
3735
+ options.filtered = true;
3736
+ }
3737
+ else {
3738
+ options.ogcFilters.filters = undefined;
3739
+ options.ogcFilters.interfaceOgcFilters = [];
3740
+ options.filtered = false;
3741
+ }
3742
+ }
3743
+ mergeInterfaceFilters(filters, interfaceOgcFilters) {
3744
+ return interfaceOgcFilters.map((interfaceOgc) => {
3745
+ const filter = searchFilter(filters, 'propertyName', interfaceOgc.propertyName);
3746
+ if (filter) {
3747
+ return { ...interfaceOgc, filterid: filter.filterid };
3748
+ }
3749
+ return interfaceOgc;
3750
+ });
3751
+ }
3752
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OGCFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3753
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OGCFilterService, providedIn: 'platform' });
3754
+ }
3755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OGCFilterService, decorators: [{
3756
+ type: Injectable,
3757
+ args: [{
3758
+ providedIn: 'platform'
3759
+ }]
3760
+ }] });
3761
+
3699
3762
  var QueryFormat;
3700
3763
  (function (QueryFormat) {
3701
3764
  QueryFormat["GML2"] = "gml2";
@@ -3728,7 +3791,7 @@ var QueryHtmlTarget;
3728
3791
  QueryHtmlTarget["BLANK"] = "_blank";
3729
3792
  })(QueryHtmlTarget || (QueryHtmlTarget = {}));
3730
3793
 
3731
- class WMSDataSource extends DataSource {
3794
+ let WMSDataSource = class WMSDataSource extends DataSource {
3732
3795
  options;
3733
3796
  wfsService;
3734
3797
  ogcFilterService;
@@ -3872,10 +3935,10 @@ class WMSDataSource extends DataSource {
3872
3935
  initOgcFilters.enabled &&
3873
3936
  initOgcFilters.editable &&
3874
3937
  (options.sourceFields || []).filter((sf) => !sf.values).length > 0) {
3875
- this.wfsService.getSourceFieldsFromWFS(options);
3938
+ this.wfsService?.getSourceFieldsFromWFS(options);
3876
3939
  }
3877
3940
  if (options.ogcFilters?.enabled && options.ogcFilters?.filters) {
3878
- this.ogcFilterService.setOgcWMSFiltersOptions(this);
3941
+ this.ogcFilterService?.setOgcWMSFiltersOptions(this);
3879
3942
  }
3880
3943
  const filterQueryString = ogcFilterWriter.handleOgcFiltersAppliedValue(options, fieldNameGeometry);
3881
3944
  sourceParams.FILTER = filterQueryString;
@@ -4004,7 +4067,13 @@ class WMSDataSource extends DataSource {
4004
4067
  const downloadUrl = queryStringValues.find((f) => f.name === 'getfeature').value;
4005
4068
  return downloadUrl;
4006
4069
  }
4007
- }
4070
+ };
4071
+ WMSDataSource = __decorate([
4072
+ __param(1, Optional()),
4073
+ __param(2, Optional()),
4074
+ __metadata("design:paramtypes", [Object, WFSService,
4075
+ OGCFilterService])
4076
+ ], WMSDataSource);
4008
4077
 
4009
4078
  function createDefaultTileGrid(epsg) {
4010
4079
  const projection = epsg ? olproj.get(epsg) : olproj.get('EPSG:3857');
@@ -5006,7 +5075,7 @@ class LayerBase {
5006
5075
  return String(this.options.id);
5007
5076
  }
5008
5077
  get parentId() {
5009
- return this.options.parentId;
5078
+ return this.parent?.id ?? this.options.parentId;
5010
5079
  }
5011
5080
  get alias() {
5012
5081
  return this.options.alias;
@@ -5785,7 +5854,7 @@ class Linked {
5785
5854
  }
5786
5855
  }
5787
5856
 
5788
- class Layer extends LayerBase {
5857
+ let Layer = class Layer extends LayerBase {
5789
5858
  options;
5790
5859
  messageService;
5791
5860
  authInterceptor;
@@ -5934,10 +6003,7 @@ class Layer extends LayerBase {
5934
6003
  });
5935
6004
  }
5936
6005
  showMessage(message) {
5937
- if (!this.messageService) {
5938
- return;
5939
- }
5940
- this.messageService.message(message);
6006
+ this.messageService?.message(message);
5941
6007
  }
5942
6008
  observeResolution() {
5943
6009
  this.resolution$$ = this.map.viewController.resolution$.subscribe(() => this.updateInResolutionsRange());
@@ -5960,7 +6026,13 @@ class Layer extends LayerBase {
5960
6026
  this.isInResolutionsRange = false;
5961
6027
  }
5962
6028
  }
5963
- }
6029
+ };
6030
+ Layer = __decorate([
6031
+ __param(1, Optional()),
6032
+ __param(2, Optional()),
6033
+ __metadata("design:paramtypes", [Object, MessageService,
6034
+ AuthInterceptor])
6035
+ ], Layer);
5964
6036
 
5965
6037
  class VectorLayer extends Layer {
5966
6038
  messageService;
@@ -10065,17 +10137,17 @@ var TooltipType;
10065
10137
  TooltipType["CUSTOM"] = "custom";
10066
10138
  })(TooltipType || (TooltipType = {}));
10067
10139
 
10068
- class ImageWatcher extends Watcher {
10140
+ let ImageWatcher = class ImageWatcher extends Watcher {
10141
+ messageService;
10069
10142
  id;
10070
10143
  loaded = 0;
10071
10144
  loading = 0;
10072
10145
  source;
10073
- messageService;
10074
10146
  constructor(layer, messageService) {
10075
10147
  super();
10148
+ this.messageService = messageService;
10076
10149
  this.source = layer.options.source.ol;
10077
10150
  this.id = uuid();
10078
- this.messageService = messageService;
10079
10151
  }
10080
10152
  watch() {
10081
10153
  this.source.on(`imageloadstart`, (e) => this.handleLoadStart(e));
@@ -10119,14 +10191,18 @@ class ImageWatcher extends Watcher {
10119
10191
  if (!event.image.__watchers__) {
10120
10192
  return;
10121
10193
  }
10122
- this.messageService.error('igo.geo.dataSource.unavailable', 'igo.geo.dataSource.unavailableTitle', undefined, { value: event.target.params_.LAYERS });
10194
+ this.messageService?.error('igo.geo.dataSource.unavailable', 'igo.geo.dataSource.unavailableTitle', undefined, { value: event.target.params_.LAYERS });
10123
10195
  this.loaded = -1;
10124
10196
  this.loading = 0;
10125
10197
  this.status = SubjectStatus.Error;
10126
10198
  }
10127
- }
10199
+ };
10200
+ ImageWatcher = __decorate([
10201
+ __param(1, Optional()),
10202
+ __metadata("design:paramtypes", [Function, MessageService])
10203
+ ], ImageWatcher);
10128
10204
 
10129
- class ImageLayer extends Layer {
10205
+ let ImageLayer = class ImageLayer extends Layer {
10130
10206
  messageService;
10131
10207
  authInterceptor;
10132
10208
  type = 'raster';
@@ -10170,13 +10246,13 @@ class ImageLayer extends Layer {
10170
10246
  }
10171
10247
  customLoader(tile, src, interceptor, messageService) {
10172
10248
  const xhr = new XMLHttpRequest();
10173
- const alteredUrlWithKeyAuth = interceptor.alterUrlWithKeyAuth(src);
10249
+ const alteredUrlWithKeyAuth = interceptor?.alterUrlWithKeyAuth(src);
10174
10250
  let url = src;
10175
10251
  if (alteredUrlWithKeyAuth) {
10176
10252
  url = alteredUrlWithKeyAuth;
10177
10253
  }
10178
10254
  xhr.open('GET', url);
10179
- const intercepted = interceptor.interceptXhr(xhr, url);
10255
+ const intercepted = interceptor?.interceptXhr(xhr, url);
10180
10256
  if (!intercepted) {
10181
10257
  xhr.abort();
10182
10258
  tile.getImage().src = url;
@@ -10187,7 +10263,7 @@ class ImageLayer extends Layer {
10187
10263
  const arrayBufferView = new Uint8Array(this.response);
10188
10264
  const responseString = new TextDecoder().decode(arrayBufferView);
10189
10265
  if (responseString.includes('ServiceExceptionReport')) {
10190
- messageService.error('igo.geo.dataSource.optionsApiUnavailable', 'igo.geo.dataSource.unavailableTitle');
10266
+ messageService?.error('igo.geo.dataSource.optionsApiUnavailable', 'igo.geo.dataSource.unavailableTitle');
10191
10267
  }
10192
10268
  const blob = new Blob([arrayBufferView], { type: 'image/png' });
10193
10269
  const urlCreator = window.URL;
@@ -10196,7 +10272,13 @@ class ImageLayer extends Layer {
10196
10272
  };
10197
10273
  xhr.send();
10198
10274
  }
10199
- }
10275
+ };
10276
+ ImageLayer = __decorate([
10277
+ __param(1, Optional()),
10278
+ __param(2, Optional()),
10279
+ __metadata("design:paramtypes", [Object, MessageService,
10280
+ AuthInterceptor])
10281
+ ], ImageLayer);
10200
10282
 
10201
10283
  class TileWatcher extends Watcher {
10202
10284
  id;
@@ -10412,7 +10494,7 @@ class VectorTileLayer extends Layer {
10412
10494
  }
10413
10495
  }
10414
10496
 
10415
- const ID_PREFIX = 'local-group_';
10497
+ const ID_GROUP_PREFIX = 'local-group_';
10416
10498
  class LayerGroup extends LayerGroupBase {
10417
10499
  children;
10418
10500
  options;
@@ -10423,7 +10505,9 @@ class LayerGroup extends LayerGroupBase {
10423
10505
  get saveableOptions() {
10424
10506
  return {
10425
10507
  ...super.saveableOptions,
10426
- id: String(this.options.id).includes(ID_PREFIX) ? null : this.options.id,
10508
+ id: String(this.options.id).includes(ID_GROUP_PREFIX)
10509
+ ? null
10510
+ : this.options.id,
10427
10511
  type: this.options.type,
10428
10512
  children: [...this.children]
10429
10513
  .map((layer) => layer.saveableOptions)
@@ -10444,7 +10528,7 @@ class LayerGroup extends LayerGroupBase {
10444
10528
  this.children = children ?? [];
10445
10529
  this.expanded = options.expanded === undefined ? false : options.expanded;
10446
10530
  if (!options.id) {
10447
- options.id = ID_PREFIX + uuid();
10531
+ options.id = ID_GROUP_PREFIX + uuid();
10448
10532
  }
10449
10533
  this.ol = this.createOlLayer();
10450
10534
  super.afterCreated();
@@ -11029,250 +11113,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
11029
11113
  type: Input
11030
11114
  }] } });
11031
11115
 
11032
- class LayerLegendListComponent {
11033
- orderable = true;
11034
- hasVisibleOrInRangeLayers$ = new BehaviorSubject(true);
11035
- hasVisibleAndNotInRangeLayers$ = new BehaviorSubject(true);
11036
- layersInUi$ = new BehaviorSubject([]);
11037
- layers$ = new BehaviorSubject([]);
11038
- showAllLegend = false;
11039
- change$ = new ReplaySubject(1);
11040
- change$$;
11041
- layers;
11042
- excludeBaseLayers = false;
11043
- updateLegendOnResolutionChange = false;
11044
- allowShowAllLegends = false;
11045
- showAllLegendsValue = false;
11046
- allLegendsShown = new EventEmitter(false);
11047
- isLayerItem = isLayerItem;
11048
- ngOnInit() {
11049
- this.change$$ = this.change$
11050
- .pipe(debounce(() => {
11051
- return this.layers.length === 0 ? EMPTY : timer(50);
11052
- }))
11053
- .subscribe(() => {
11054
- const layers = this.computeShownLayers(this.layers.slice(0));
11055
- this.layers$.next(layers);
11056
- this.hasVisibleOrInRangeLayers$.next(this.layers
11057
- .slice(0)
11058
- .filter((layer) => !isBaseLayer(layer))
11059
- .filter((layer) => layer.displayed).length > 0);
11060
- this.hasVisibleAndNotInRangeLayers$.next(this.layers
11061
- .slice(0)
11062
- .filter((layer) => !isBaseLayer(layer))
11063
- .filter((layer) => layer.visible && !layer.isInResolutionsRange)
11064
- .length > 0);
11065
- this.layersInUi$.next(this.layers
11066
- .slice(0)
11067
- .filter((layer) => layer.showInLayerList !== false &&
11068
- (!this.excludeBaseLayers || !isBaseLayer(layer))));
11069
- });
11070
- }
11071
- ngOnDestroy() {
11072
- this.change$$.unsubscribe();
11073
- }
11074
- next() {
11075
- this.change$.next();
11076
- }
11077
- computeShownLayers(layers) {
11078
- let shownLayers = layers.filter((layer) => layer.displayed);
11079
- if (this.showAllLegendsValue) {
11080
- shownLayers = layers;
11081
- }
11082
- return sortLayersByZindex(shownLayers, 'desc');
11083
- }
11084
- toggleShowAllLegends(toggle) {
11085
- this.showAllLegendsValue = toggle;
11086
- this.next();
11087
- this.allLegendsShown.emit(toggle);
11088
- }
11089
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11090
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LayerLegendListComponent, isStandalone: true, selector: "igo-layer-legend-list", inputs: { layers: "layers", excludeBaseLayers: "excludeBaseLayers", updateLegendOnResolutionChange: "updateLegendOnResolutionChange", allowShowAllLegends: "allowShowAllLegends", showAllLegendsValue: "showAllLegendsValue" }, outputs: { allLegendsShown: "allLegendsShown" }, ngImport: i0, template: "<div class=\"layer-legend-list-container\">\n <mat-slide-toggle\n tooltip-position=\"above\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.layer.legend.showAll' | translate\"\n [checked]=\"showAllLegendsValue\"\n class=\"mat-typography\"\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n [labelPosition]=\"'before'\"\n (change)=\"toggleShowAllLegends($event.checked)\"\n >\n {{ 'igo.geo.layer.legend.showAll' | translate }}\n </mat-slide-toggle>\n <mat-divider\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n ></mat-divider>\n <igo-list [navigation]=\"false\" [selection]=\"false\">\n <ng-template ngFor let-layer let-i=\"index\" [ngForOf]=\"layers$ | async\">\n <igo-layer-legend-item\n *ngIf=\"!(excludeBaseLayers && isLayerItem(layer) && layer.baseLayer)\"\n igoListItem\n [layer]=\"$any(layer)\"\n [updateLegendOnResolutionChange]=\"updateLegendOnResolutionChange\"\n >\n </igo-layer-legend-item>\n </ng-template>\n </igo-list>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleWithShowAllButton' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n allowShowAllLegends\n \"\n >\n {{\n 'igo.geo.layer.legend.noLayersVisibleWithShowAllButtonButZoom' | translate\n }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisible' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleButZoom' | translate }}\n </p>\n</div>\n", styles: [":host mat-slide-toggle{width:100%;padding:10px}:host mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}:host mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;width:calc(100% - 60px)}:host igo-list{display:contents}:host .layers-empty{text-align:justify;margin:10px}:host .layer-legend-list-container{max-height:100%;overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i5$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: LayerLegendItemComponent, selector: "igo-layer-legend-item", inputs: ["layer", "updateLegendOnResolutionChange"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11091
- }
11092
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListComponent, decorators: [{
11093
- type: Component,
11094
- args: [{ selector: 'igo-layer-legend-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
11095
- NgIf,
11096
- MatSlideToggleModule,
11097
- MatTooltipModule,
11098
- MatDividerModule,
11099
- ListComponent,
11100
- NgFor,
11101
- LayerLegendItemComponent,
11102
- ListItemDirective,
11103
- AsyncPipe,
11104
- IgoLanguageModule
11105
- ], template: "<div class=\"layer-legend-list-container\">\n <mat-slide-toggle\n tooltip-position=\"above\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.layer.legend.showAll' | translate\"\n [checked]=\"showAllLegendsValue\"\n class=\"mat-typography\"\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n [labelPosition]=\"'before'\"\n (change)=\"toggleShowAllLegends($event.checked)\"\n >\n {{ 'igo.geo.layer.legend.showAll' | translate }}\n </mat-slide-toggle>\n <mat-divider\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n ></mat-divider>\n <igo-list [navigation]=\"false\" [selection]=\"false\">\n <ng-template ngFor let-layer let-i=\"index\" [ngForOf]=\"layers$ | async\">\n <igo-layer-legend-item\n *ngIf=\"!(excludeBaseLayers && isLayerItem(layer) && layer.baseLayer)\"\n igoListItem\n [layer]=\"$any(layer)\"\n [updateLegendOnResolutionChange]=\"updateLegendOnResolutionChange\"\n >\n </igo-layer-legend-item>\n </ng-template>\n </igo-list>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleWithShowAllButton' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n allowShowAllLegends\n \"\n >\n {{\n 'igo.geo.layer.legend.noLayersVisibleWithShowAllButtonButZoom' | translate\n }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisible' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleButZoom' | translate }}\n </p>\n</div>\n", styles: [":host mat-slide-toggle{width:100%;padding:10px}:host mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}:host mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;width:calc(100% - 60px)}:host igo-list{display:contents}:host .layers-empty{text-align:justify;margin:10px}:host .layer-legend-list-container{max-height:100%;overflow:auto}\n"] }]
11106
- }], propDecorators: { layers: [{
11107
- type: Input
11108
- }], excludeBaseLayers: [{
11109
- type: Input
11110
- }], updateLegendOnResolutionChange: [{
11111
- type: Input
11112
- }], allowShowAllLegends: [{
11113
- type: Input
11114
- }], showAllLegendsValue: [{
11115
- type: Input
11116
- }], allLegendsShown: [{
11117
- type: Output
11118
- }] } });
11119
-
11120
- class LayerLegendListBindingDirective {
11121
- mapService;
11122
- component;
11123
- layersOrResolutionChange$$;
11124
- layersVisibility$$;
11125
- constructor(component, mapService) {
11126
- this.mapService = mapService;
11127
- this.component = component;
11128
- }
11129
- ngOnInit() {
11130
- // Override input layers
11131
- this.component.layers = [];
11132
- this.layersOrResolutionChange$$ = combineLatest([
11133
- this.mapService.getMap().layerController.all$,
11134
- this.mapService.getMap().viewController.resolution$
11135
- ])
11136
- .pipe(debounceTime(10))
11137
- .subscribe((bunch) => {
11138
- const shownLayers = bunch[0].filter((layer) => {
11139
- return isLayerItem(layer) && layer.showInLayerList === true;
11140
- });
11141
- this.component.layers = shownLayers;
11142
- this.layersVisibility$$ = combineLatest(shownLayers.map((layer) => layer.visible$)).subscribe(() => this.component.change$.next());
11143
- });
11144
- }
11145
- ngOnDestroy() {
11146
- this.layersOrResolutionChange$$.unsubscribe();
11147
- if (this.layersVisibility$$ !== undefined) {
11148
- this.layersVisibility$$.unsubscribe();
11149
- this.layersVisibility$$ = undefined;
11150
- }
11151
- }
11152
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListBindingDirective, deps: [{ token: LayerLegendListComponent, self: true }, { token: MapService }], target: i0.ɵɵFactoryTarget.Directive });
11153
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: LayerLegendListBindingDirective, isStandalone: true, selector: "[igoLayerLegendListBinding]", ngImport: i0 });
11154
- }
11155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListBindingDirective, decorators: [{
11156
- type: Directive,
11157
- args: [{
11158
- selector: '[igoLayerLegendListBinding]',
11159
- standalone: true
11160
- }]
11161
- }], ctorParameters: () => [{ type: LayerLegendListComponent, decorators: [{
11162
- type: Self
11163
- }] }, { type: MapService }] });
11164
-
11165
- class LayerSearchComponent {
11166
- control = new FormControl();
11167
- initialValue;
11168
- floatLabel;
11169
- placeholder;
11170
- tooltip;
11171
- searchChange = new EventEmitter();
11172
- ngOnInit() {
11173
- if (this.initialValue) {
11174
- this.control.setValue(this.initialValue, {
11175
- emitEvent: false
11176
- });
11177
- }
11178
- this.control.valueChanges.pipe(debounceTime$1(300)).subscribe((value) => {
11179
- this.searchChange.emit(value);
11180
- });
11181
- }
11182
- clearTerm() {
11183
- this.control.reset();
11184
- }
11185
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11186
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LayerSearchComponent, isStandalone: true, selector: "igo-layer-search", inputs: { initialValue: "initialValue", floatLabel: "floatLabel", placeholder: "placeholder", tooltip: "tooltip" }, outputs: { searchChange: "searchChange" }, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <input\n matInput\n [placeholder]=\"placeholder | translate\"\n [matTooltip]=\"tooltip | translate\"\n [matTooltipDisabled]=\"!tooltip\"\n matTooltipShowDelay=\"500\"\n type=\"text\"\n [formControl]=\"control\"\n />\n <button\n *ngIf=\"control.value\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearTerm()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n", styles: [":host{flex:1}mat-form-field{width:100%}mat-form-field ::ng-deep .mat-mdc-form-field-infix{width:auto!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
11187
- }
11188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerSearchComponent, decorators: [{
11189
- type: Component,
11190
- args: [{ selector: 'igo-layer-search', imports: [
11191
- NgIf,
11192
- ReactiveFormsModule,
11193
- MatFormFieldModule,
11194
- MatButtonModule,
11195
- MatInputModule,
11196
- MatTooltipModule,
11197
- MatIconModule,
11198
- IgoLanguageModule
11199
- ], template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <input\n matInput\n [placeholder]=\"placeholder | translate\"\n [matTooltip]=\"tooltip | translate\"\n [matTooltipDisabled]=\"!tooltip\"\n matTooltipShowDelay=\"500\"\n type=\"text\"\n [formControl]=\"control\"\n />\n <button\n *ngIf=\"control.value\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearTerm()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n", styles: [":host{flex:1}mat-form-field{width:100%}mat-form-field ::ng-deep .mat-mdc-form-field-infix{width:auto!important}\n"] }]
11200
- }], propDecorators: { initialValue: [{
11201
- type: Input
11202
- }], floatLabel: [{
11203
- type: Input
11204
- }], placeholder: [{
11205
- type: Input
11206
- }], tooltip: [{
11207
- type: Input
11208
- }], searchChange: [{
11209
- type: Output
11210
- }] } });
11211
-
11212
- class OGCFilterService {
11213
- filterByOgc(wmsDatasource, filterString) {
11214
- const appliedFilter = new OgcFilterWriter().formatProcessedOgcFilter(filterString, wmsDatasource.options.params.LAYERS);
11215
- wmsDatasource.ol.updateParams({ FILTER: appliedFilter });
11216
- }
11217
- setOgcWFSFiltersOptions(options) {
11218
- const ogcFilterWriter = new OgcFilterWriter();
11219
- if (options.ogcFilters.enabled && options.ogcFilters.filters) {
11220
- options.ogcFilters.filters = ogcFilterWriter.checkIgoFiltersProperties(options.ogcFilters.filters, options.paramsWFS.fieldNameGeometry, new olProjection({ code: options.paramsWFS.srsName }), true);
11221
- if (!options.ogcFilters.interfaceOgcFilters) {
11222
- options.ogcFilters.interfaceOgcFilters =
11223
- ogcFilterWriter.defineInterfaceFilterSequence(options.ogcFilters.filters, options.paramsWFS.fieldNameGeometry);
11224
- }
11225
- else {
11226
- const mergedInterfaceOgcFilters = this.mergeInterfaceFilters(options.ogcFilters.filters, options.ogcFilters.interfaceOgcFilters);
11227
- options.ogcFilters.interfaceOgcFilters =
11228
- ogcFilterWriter.defineInterfaceFilterSequence(mergedInterfaceOgcFilters, options.paramsWFS.fieldNameGeometry);
11229
- }
11230
- }
11231
- }
11232
- setOgcWMSFiltersOptions(wmsDatasource) {
11233
- const options = wmsDatasource.options;
11234
- const ogcFilterWriter = new OgcFilterWriter();
11235
- if (options.ogcFilters.enabled && options.ogcFilters.filters) {
11236
- options.ogcFilters.filters = ogcFilterWriter.checkIgoFiltersProperties(options.ogcFilters.filters, options.fieldNameGeometry, undefined, true);
11237
- if (!options.ogcFilters.interfaceOgcFilters) {
11238
- options.ogcFilters.interfaceOgcFilters =
11239
- ogcFilterWriter.defineInterfaceFilterSequence(
11240
- // With some wms server, this param must be set to make spatials call.
11241
- options.ogcFilters.filters, options.fieldNameGeometry);
11242
- }
11243
- else {
11244
- const mergedInterfaceOgcFilters = this.mergeInterfaceFilters(options.ogcFilters.filters, options.ogcFilters.interfaceOgcFilters);
11245
- options.ogcFilters.interfaceOgcFilters =
11246
- ogcFilterWriter.defineInterfaceFilterSequence(mergedInterfaceOgcFilters, options.fieldNameGeometry);
11247
- }
11248
- this.filterByOgc(wmsDatasource, ogcFilterWriter.buildFilter(options.ogcFilters.filters, undefined, undefined, undefined, wmsDatasource.options));
11249
- options.filtered = true;
11250
- }
11251
- else {
11252
- options.ogcFilters.filters = undefined;
11253
- options.ogcFilters.interfaceOgcFilters = [];
11254
- options.filtered = false;
11255
- }
11256
- }
11257
- mergeInterfaceFilters(filters, interfaceOgcFilters) {
11258
- return interfaceOgcFilters.map((interfaceOgc) => {
11259
- const filter = searchFilter(filters, 'propertyName', interfaceOgc.propertyName);
11260
- if (filter) {
11261
- return { ...interfaceOgc, filterid: filter.filterid };
11262
- }
11263
- return interfaceOgc;
11264
- });
11265
- }
11266
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OGCFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11267
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OGCFilterService, providedIn: 'platform' });
11268
- }
11269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OGCFilterService, decorators: [{
11270
- type: Injectable,
11271
- args: [{
11272
- providedIn: 'platform'
11273
- }]
11274
- }] });
11275
-
11276
11116
  class OptionsService {
11277
11117
  }
11278
11118
 
@@ -12389,6 +12229,727 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
12389
12229
  type: Optional
12390
12230
  }] }] });
12391
12231
 
12232
+ const LAYER = 'Layer';
12233
+
12234
+ class LayerSelectionModel {
12235
+ selection = new SelectionModel(true);
12236
+ descendantSelection = new SelectionModel(true);
12237
+ get selected() {
12238
+ return this.selection.selected;
12239
+ }
12240
+ get hasSelection() {
12241
+ return this.selection.hasValue();
12242
+ }
12243
+ get isSelectionEmpty() {
12244
+ return this.selection.isEmpty();
12245
+ }
12246
+ clearSelection() {
12247
+ this.selection.clear();
12248
+ this.descendantSelection.clear();
12249
+ }
12250
+ select(...layers) {
12251
+ this.selection.select(...layers);
12252
+ this.descendantSelection.select(...this.getDescendants(...layers));
12253
+ }
12254
+ deselect(...layers) {
12255
+ this.selection.deselect(...layers);
12256
+ this.descendantSelection.deselect(...this.getDescendants(...layers));
12257
+ }
12258
+ isSelected = (layer) => this.selection.isSelected(layer);
12259
+ isDescendantSelection = (layer) => this.descendantSelection.isSelected(layer);
12260
+ getDescendants(...layers) {
12261
+ return layers.reduce((descendants, layer) => {
12262
+ if (isLayerGroup(layer)) {
12263
+ return descendants.concat(layer.descendants);
12264
+ }
12265
+ return descendants;
12266
+ }, []);
12267
+ }
12268
+ }
12269
+
12270
+ // Below 10 is reserved for BaseLayer
12271
+ const ZINDEX_MIN = 10;
12272
+ /**
12273
+ * We got four kind of layers
12274
+ * TreeLayer: all layers to show in the layer manager
12275
+ * Baselayer: Layer dedicated for the basemap
12276
+ * SystemLayer: Every layer dedicated to good function of the map (Selection, hovering)
12277
+ * OtherLayer: all remaining layer that is linked to another layer or simply not a systemLayer that need to be cleaned on map reset
12278
+ */
12279
+ class LayerController extends LayerSelectionModel {
12280
+ _map;
12281
+ tree;
12282
+ /** Selection, Hovering, every internalLayer not in the tree is here */
12283
+ _systemLayers = [];
12284
+ /** LinkedLayer and other layer that are not in the previous category and not visible in tree */
12285
+ _otherLayers = [];
12286
+ layersFlattened = [];
12287
+ _layers$ = new BehaviorSubject(undefined);
12288
+ layers$ = this._layers$.asObservable();
12289
+ layersFlattened$ = this._layers$
12290
+ .asObservable()
12291
+ .pipe(map$1(() => this.layersFlattened));
12292
+ _baseLayers = [];
12293
+ _baseLayers$ = new BehaviorSubject(undefined);
12294
+ baseLayers$ = this._baseLayers$.asObservable();
12295
+ baseLayerSelection;
12296
+ /** All layers with the tree flattened */
12297
+ all$;
12298
+ constructor(_map, layers) {
12299
+ super();
12300
+ this._map = _map;
12301
+ this.all$ = combineLatest([this.layersFlattened$, this.baseLayers$]).pipe(debounceTime$1(10), map$1(() => this.all));
12302
+ this.tree = new Tree(layers, {
12303
+ getChildren: (node) => isLayerGroup(node) && node.children,
12304
+ getId: (node) => node.id,
12305
+ getLevel: (node) => node.zIndex,
12306
+ reverse: true
12307
+ });
12308
+ }
12309
+ get all() {
12310
+ return [
12311
+ ...this.baseLayers,
12312
+ ...this.layersFlattened,
12313
+ ...this._systemLayers,
12314
+ ...this._otherLayers
12315
+ ];
12316
+ }
12317
+ get baseLayers() {
12318
+ return this._baseLayers;
12319
+ }
12320
+ get baseLayer() {
12321
+ return this.baseLayers.find((layer) => layer.visible);
12322
+ }
12323
+ get treeLayers() {
12324
+ return this.tree.data;
12325
+ }
12326
+ add(...layers) {
12327
+ const offset = 0;
12328
+ const addedLayers = layers
12329
+ .map((layer) => this.handleAdd(layer, offset))
12330
+ .filter(Boolean);
12331
+ if (!addedLayers.length) {
12332
+ this.notify();
12333
+ return;
12334
+ }
12335
+ this.tree.add(...addedLayers);
12336
+ // Notify the layers change before the iteration on the addedLayer
12337
+ // Because the Layer may have have LinkedLayer who need to find the parent.
12338
+ this.layersFlattened = [...this.tree.flattened];
12339
+ addedLayers.forEach((layer) => layer.add());
12340
+ this.recalculateZindex();
12341
+ this.notify();
12342
+ }
12343
+ selectBaseLayer(layer) {
12344
+ if (!isBaseLayer(layer)) {
12345
+ return;
12346
+ }
12347
+ if (this.baseLayerSelection) {
12348
+ this.baseLayerSelection.visible = false;
12349
+ }
12350
+ layer.visible = true;
12351
+ this.baseLayerSelection = layer;
12352
+ this._map.viewController.olView.setMinZoom(layer.dataSource.options.minZoom || (this._map.options.view || {}).minZoom);
12353
+ this._map.viewController.olView.setMaxZoom(layer.dataSource.options.maxZoom || (this._map.options.view || {}).maxZoom);
12354
+ }
12355
+ remove(...layers) {
12356
+ const list = layers.reduce((list, layer) => {
12357
+ if (this.isSelected(layer)) {
12358
+ this.deselect(layer);
12359
+ }
12360
+ const result = this._remove(layer);
12361
+ Array.isArray(result) ? list.push(...result) : list.push(result);
12362
+ return list;
12363
+ }, []);
12364
+ this.tree.remove(...list);
12365
+ this.notify();
12366
+ }
12367
+ /**
12368
+ * Move a layer into the tree
12369
+ * @param layer Layer to move
12370
+ * @param beforeTo The index position to move inside a tree
12371
+ */
12372
+ moveTo(beforeTo, ...layers) {
12373
+ const movedLayers = this.tree.moveTo(beforeTo, ...layers);
12374
+ if (!movedLayers?.length) {
12375
+ return;
12376
+ }
12377
+ return movedLayers;
12378
+ }
12379
+ moveBelow(layerRef, ...layers) {
12380
+ const position = this.getPosition(layerRef, 'below');
12381
+ const movedLayers = this.moveTo(position, ...layers);
12382
+ this.handleMove(movedLayers, layerRef.parent);
12383
+ }
12384
+ moveAbove(layerRef, ...layers) {
12385
+ const position = this.getPosition(layerRef);
12386
+ const movedLayers = this.moveTo(position, ...layers);
12387
+ this.handleMove(movedLayers, layerRef.parent);
12388
+ }
12389
+ moveInside(layerRef, ...layers) {
12390
+ const position = this.getPosition(layerRef);
12391
+ const movedLayers = this.moveTo(position.concat(0), ...layers);
12392
+ this.handleMove(movedLayers, layerRef);
12393
+ }
12394
+ raise(...layers) {
12395
+ const position = this.getPosition(layers[0]);
12396
+ const nextPosition = this.findLowestVisiblePostion(position, -1);
12397
+ this.moveTo(nextPosition, ...layers);
12398
+ this.handleMove(layers, null, true);
12399
+ }
12400
+ lower(...layers) {
12401
+ const position = this.getPosition(layers[layers.length - 1]);
12402
+ const nextPosition = this.findLowestVisiblePostion(position, 2); // +2 because we use moveBefore
12403
+ this.moveTo(nextPosition, ...layers);
12404
+ this.handleMove(layers, null, true);
12405
+ }
12406
+ /** Reset all except SystemLayer */
12407
+ reset() {
12408
+ this.clearBaselayers();
12409
+ this.clearTree();
12410
+ this.clearOther();
12411
+ this.clearSelection();
12412
+ this.notify();
12413
+ }
12414
+ getById(id) {
12415
+ return this.all.find((layer) => layer.id && layer.id === id);
12416
+ }
12417
+ getBySourceId(id) {
12418
+ return this.all.find((layer) => layer.dataSource?.id && layer.dataSource.id === id);
12419
+ }
12420
+ getPosition(layer, type = 'above') {
12421
+ const position = this.tree.getPosition(layer);
12422
+ if (type === 'below') {
12423
+ let index = position.pop();
12424
+ return position.concat(++index);
12425
+ }
12426
+ return position;
12427
+ }
12428
+ getLayerRecipient(layer) {
12429
+ return layer.parent
12430
+ ? this.tree.getChildren(layer.parent)
12431
+ : [...this.treeLayers];
12432
+ }
12433
+ /**
12434
+ * We got non visible layer in the tree like LinkedLayer. We want the next visible layer in tree
12435
+ */
12436
+ findLowestVisiblePostion(position, increment) {
12437
+ const index = position.pop();
12438
+ const nextPosition = position.concat(index + increment);
12439
+ const layer = this.tree.getNodeByPosition(nextPosition);
12440
+ if (layer && !layer.showInLayerList) {
12441
+ const nextIndex = increment > 1 ? 1 : increment;
12442
+ return this.findLowestVisiblePostion(nextPosition, nextIndex);
12443
+ }
12444
+ return nextPosition;
12445
+ }
12446
+ handleMove(layers, parent, keepCurrentParent) {
12447
+ if (!layers?.length) {
12448
+ return;
12449
+ }
12450
+ layers.forEach((layer) => {
12451
+ layer.moveTo(keepCurrentParent ? layer.parent : parent);
12452
+ });
12453
+ this._internalMove();
12454
+ }
12455
+ _internalMove() {
12456
+ this.recalculateZindex();
12457
+ this.notify();
12458
+ }
12459
+ getBefore(layer) {
12460
+ return this.treeLayers.find((layerTree) => layerTree.zIndex <= layer.zIndex);
12461
+ }
12462
+ /** Recursive */
12463
+ recalculateZindex(minIndex = this.baseLayers.length, layers = this.treeLayers) {
12464
+ return [...layers].reverse().reduce((previousZindex, layer) => {
12465
+ let zIndex = ++previousZindex;
12466
+ layer.zIndex = zIndex;
12467
+ if (isLayerGroup(layer)) {
12468
+ zIndex = this.recalculateZindex(zIndex, layer.children);
12469
+ }
12470
+ return zIndex;
12471
+ }, minIndex);
12472
+ }
12473
+ handleAdd(layer, offset) {
12474
+ const existingLayer = this.getById(layer.id);
12475
+ if (existingLayer !== undefined) {
12476
+ existingLayer.visible = true;
12477
+ return;
12478
+ }
12479
+ const zIndex = this.getZindexOffset(layer, offset);
12480
+ this.setZindex(layer, zIndex);
12481
+ layer.init(this._map);
12482
+ if (isBaseLayer(layer)) {
12483
+ if (layer.visible) {
12484
+ this.selectBaseLayer(layer);
12485
+ }
12486
+ this._baseLayers.push(layer);
12487
+ }
12488
+ else if (this.isOtherLayer(layer)) {
12489
+ this._otherLayers.push(layer);
12490
+ }
12491
+ else if (this.isSystemLayer(layer) && !layer.showInLayerList) {
12492
+ this._systemLayers.push(layer);
12493
+ }
12494
+ else if (layer.showInLayerList) {
12495
+ return layer;
12496
+ }
12497
+ else {
12498
+ this._otherLayers.push(layer);
12499
+ }
12500
+ const parent = layer.parentId
12501
+ ? this.getById(layer.parentId.split(TREE_SEPERATOR).pop())
12502
+ : undefined;
12503
+ layer.add(parent);
12504
+ return;
12505
+ }
12506
+ _remove(layer) {
12507
+ if (isBaseLayer(layer)) {
12508
+ this.removeBaselayer(layer);
12509
+ }
12510
+ else if (this.isOtherLayer(layer)) {
12511
+ this.removeOtherLayer(layer);
12512
+ }
12513
+ else if (this.isSystemLayer(layer)) {
12514
+ this.removeSystemLayer(layer);
12515
+ }
12516
+ layer.remove();
12517
+ return layer;
12518
+ }
12519
+ removeBaselayer(layer) {
12520
+ this.removeIn(layer, this._baseLayers);
12521
+ }
12522
+ removeSystemLayer(layer) {
12523
+ this.removeIn(layer, this._systemLayers);
12524
+ }
12525
+ removeOtherLayer(layer) {
12526
+ this.removeIn(layer, this._otherLayers);
12527
+ }
12528
+ removeIn(layer, store) {
12529
+ const index = store.findIndex((sysLayer) => sysLayer.id === layer.id);
12530
+ if (index === -1) {
12531
+ return;
12532
+ }
12533
+ store.splice(index, 1);
12534
+ }
12535
+ isSystemLayer(layer) {
12536
+ return isLayerItem(layer) && layer.isIgoInternalLayer;
12537
+ }
12538
+ isOtherLayer(layer) {
12539
+ return isLayerLinked(layer) && !layer.showInLayerList;
12540
+ }
12541
+ clearBaselayers() {
12542
+ this.baseLayers.forEach((layer) => this._remove(layer));
12543
+ this._baseLayers = [];
12544
+ }
12545
+ clearTree() {
12546
+ this.treeLayers.forEach((layer) => this._remove(layer));
12547
+ this.tree.clear();
12548
+ }
12549
+ clearSystems() {
12550
+ this._systemLayers.forEach((layer) => this._remove(layer));
12551
+ this._systemLayers = [];
12552
+ }
12553
+ clearOther() {
12554
+ this._otherLayers.forEach((layer) => this._remove(layer));
12555
+ this._otherLayers = [];
12556
+ }
12557
+ getZindexOffset(layer, previousOffset = 0) {
12558
+ return layer.zIndex ? 0 : previousOffset++;
12559
+ }
12560
+ setZindex(layer, offset) {
12561
+ if (isBaseLayer(layer)) {
12562
+ return this.handleBaselayerZIndex(layer, offset);
12563
+ }
12564
+ if (layer.zIndex === undefined || layer.zIndex === 0) {
12565
+ const maxZIndex = Math.max(ZINDEX_MIN, ...this.treeLayers.map((l) => l.zIndex));
12566
+ layer.zIndex = maxZIndex + 1 + (offset ?? 0);
12567
+ }
12568
+ }
12569
+ handleBaselayerZIndex(layer, offset) {
12570
+ const maxZIndex = Math.max(0, ...this.baseLayers.map((l) => l.zIndex));
12571
+ const zIndex = maxZIndex + 1 + (offset ?? 0);
12572
+ layer.zIndex = zIndex > ZINDEX_MIN ? ZINDEX_MIN : zIndex;
12573
+ }
12574
+ notify() {
12575
+ this.layersFlattened = [...this.tree.flattened];
12576
+ this._layers$.next([...this.treeLayers]);
12577
+ this._baseLayers$.next([...this.baseLayers]);
12578
+ }
12579
+ }
12580
+
12581
+ function mergeLayersOptions(layersOptionsTree, layersOptions) {
12582
+ const tree = [...layersOptionsTree];
12583
+ layersOptions.forEach((options) => {
12584
+ const identifier = getLayerOptionIdentifier(options);
12585
+ if (!identifier)
12586
+ return;
12587
+ const currentNode = _getNodeById(identifier, tree) ?? _getNodeByTitle(options.title, tree);
12588
+ if (currentNode) {
12589
+ // if we get layer options by title, we update the id of current layer.
12590
+ if (isLayerGroupOptions(currentNode) &&
12591
+ currentNode.id.toString().includes(ID_GROUP_PREFIX)) {
12592
+ currentNode.id = identifier;
12593
+ }
12594
+ const currentNodeParentID = currentNode.parentId ?? findParentId(tree, currentNode);
12595
+ const mergedOptions = ObjectUtils.mergeDeep(currentNode, options);
12596
+ if (currentNodeParentID === options.parentId) {
12597
+ moveOptions(tree, identifier, mergedOptions);
12598
+ }
12599
+ else {
12600
+ // if we have no parent id it means that we are in the root of the tree.
12601
+ if (!options.parentId)
12602
+ mergedOptions.parentId = undefined;
12603
+ const initialIdentifier = getLayerOptionIdentifier(currentNode);
12604
+ moveOptions(tree, initialIdentifier, mergedOptions);
12605
+ }
12606
+ }
12607
+ else {
12608
+ // Some layers in local context doesn't have an id, if this is the case we
12609
+ // check if the layer is already in the tree by its title
12610
+ // and if it is we don't add it again. The changes is ignored
12611
+ if (isLayerGroupOptions(options)) {
12612
+ const currentNode = _getNodeByTitle(options.title, tree);
12613
+ if (currentNode) {
12614
+ return;
12615
+ }
12616
+ }
12617
+ // handel external Data source options
12618
+ if (isLayerItemOptions(options)) {
12619
+ handleExternalDataSource(options);
12620
+ }
12621
+ insertOptions(tree, options);
12622
+ }
12623
+ });
12624
+ return tree;
12625
+ }
12626
+ function handleExternalDataSource(options) {
12627
+ options.sourceOptions = {
12628
+ ...options.sourceOptions,
12629
+ optionsFromCapabilities: true,
12630
+ optionsFromApi: true,
12631
+ crossOrigin: 'anonymous'
12632
+ };
12633
+ }
12634
+ function getLayerOptionIdentifier(layerOptions) {
12635
+ return isLayerGroupOptions(layerOptions)
12636
+ ? String(layerOptions.id)
12637
+ : (getLayerParam(layerOptions) ??
12638
+ (layerOptions.id !== undefined
12639
+ ? layerOptions.id.toString()
12640
+ : undefined));
12641
+ }
12642
+ function moveOptions(tree, initialIdentifier, options) {
12643
+ removeNode(tree, initialIdentifier);
12644
+ insertOptions(tree, options);
12645
+ }
12646
+ function insertOptions(tree, options) {
12647
+ const parentId = options.parentId;
12648
+ if (!parentId) {
12649
+ tree.push(options);
12650
+ }
12651
+ else {
12652
+ const parent = _getNodeById(parentId, tree);
12653
+ if (parent) {
12654
+ (parent.children ??= []).push(options);
12655
+ sortLayersOptionsByZIndex(parent.children);
12656
+ }
12657
+ }
12658
+ }
12659
+ /** Recursive */
12660
+ function _getNodeById(id, data) {
12661
+ let node;
12662
+ data.some((item) => {
12663
+ const identifier = getLayerOptionIdentifier(item);
12664
+ if (identifier === id) {
12665
+ node = item;
12666
+ return true;
12667
+ }
12668
+ const children = isLayerGroupOptions(item) ? item.children : undefined;
12669
+ if (children) {
12670
+ node = _getNodeById(id, children);
12671
+ if (node)
12672
+ return true;
12673
+ }
12674
+ return false;
12675
+ });
12676
+ return node;
12677
+ }
12678
+ /** Recursive */
12679
+ function _getNodeByTitle(title, data) {
12680
+ if (!title)
12681
+ return;
12682
+ let node;
12683
+ data.some((item) => {
12684
+ const itemTitle = item.title;
12685
+ if (itemTitle === title) {
12686
+ node = item;
12687
+ return true;
12688
+ }
12689
+ const children = isLayerGroupOptions(item) ? item.children : undefined;
12690
+ if (children) {
12691
+ node = _getNodeByTitle(title, children);
12692
+ if (node)
12693
+ return true;
12694
+ }
12695
+ return false;
12696
+ });
12697
+ return node;
12698
+ }
12699
+ function removeNode(tree, nodeId) {
12700
+ for (let i = 0; i < tree.length; i++) {
12701
+ const node = tree[i];
12702
+ const currentId = getLayerOptionIdentifier(node);
12703
+ if (currentId === nodeId) {
12704
+ tree.splice(i, 1);
12705
+ return true;
12706
+ }
12707
+ if (isLayerGroupOptions(node) && node.children?.length) {
12708
+ const removed = removeNode(node.children, nodeId);
12709
+ if (removed && node.children.length === 0) {
12710
+ delete node.children;
12711
+ }
12712
+ if (removed)
12713
+ return true;
12714
+ }
12715
+ }
12716
+ return false;
12717
+ }
12718
+ function sortLayersOptionsByZIndex(layers) {
12719
+ layers.sort((a, b) => (a.zIndex ?? 0) - (b.zIndex ?? 0));
12720
+ }
12721
+ function getLayerParam(layerOptions) {
12722
+ const { sourceOptions } = layerOptions;
12723
+ if (!sourceOptions)
12724
+ return;
12725
+ const { type } = sourceOptions;
12726
+ switch (type) {
12727
+ case 'wms':
12728
+ return (sourceOptions.params.LAYERS ??
12729
+ sourceOptions.params['layers']);
12730
+ case 'wmts':
12731
+ case 'arcgisrest':
12732
+ return sourceOptions.layer;
12733
+ case 'imagearcgisrest':
12734
+ case 'tilearcgisrest': {
12735
+ const { layer, params } = sourceOptions;
12736
+ return layer ?? params?.layer;
12737
+ }
12738
+ default:
12739
+ return undefined;
12740
+ }
12741
+ }
12742
+ /**
12743
+ * Recursively finds the parent ID of a target layer option within a tree structure.
12744
+ *
12745
+ * @param tree - The array of layer options representing the tree structure.
12746
+ * @param target - The target layer option whose parent ID is to be found.
12747
+ * @param path - The current path of IDs traversed during the search (used internally).
12748
+ * @returns The parent ID as a dot-separated string, or undefined if no parent is found.
12749
+ */
12750
+ function findParentId(tree, target, path = []) {
12751
+ const targetId = getLayerOptionIdentifier(target);
12752
+ for (const node of tree) {
12753
+ const currentPath = node.id ? [...path, node.id.toString()] : [...path];
12754
+ if (isLayerGroupOptions(node) && node.children) {
12755
+ for (const child of node.children) {
12756
+ // Check if the current child node matches the target node by comparing their IDs
12757
+ if (getLayerOptionIdentifier(child) === targetId) {
12758
+ const targetPath = currentPath?.join('.');
12759
+ return targetPath === undefined || targetPath === ''
12760
+ ? undefined
12761
+ : targetPath;
12762
+ }
12763
+ }
12764
+ const result = findParentId(node.children, target, currentPath);
12765
+ if (result) {
12766
+ return result;
12767
+ }
12768
+ }
12769
+ }
12770
+ return undefined;
12771
+ }
12772
+
12773
+ class LayerLegendListComponent {
12774
+ orderable = true;
12775
+ hasVisibleOrInRangeLayers$ = new BehaviorSubject(true);
12776
+ hasVisibleAndNotInRangeLayers$ = new BehaviorSubject(true);
12777
+ layersInUi$ = new BehaviorSubject([]);
12778
+ layers$ = new BehaviorSubject([]);
12779
+ showAllLegend = false;
12780
+ change$ = new ReplaySubject(1);
12781
+ change$$;
12782
+ layers;
12783
+ excludeBaseLayers = false;
12784
+ updateLegendOnResolutionChange = false;
12785
+ allowShowAllLegends = false;
12786
+ showAllLegendsValue = false;
12787
+ allLegendsShown = new EventEmitter(false);
12788
+ isLayerItem = isLayerItem;
12789
+ ngOnInit() {
12790
+ this.change$$ = this.change$
12791
+ .pipe(debounce(() => {
12792
+ return this.layers.length === 0 ? EMPTY : timer(50);
12793
+ }))
12794
+ .subscribe(() => {
12795
+ const layers = this.computeShownLayers(this.layers.slice(0));
12796
+ this.layers$.next(layers);
12797
+ this.hasVisibleOrInRangeLayers$.next(this.layers
12798
+ .slice(0)
12799
+ .filter((layer) => !isBaseLayer(layer))
12800
+ .filter((layer) => layer.displayed).length > 0);
12801
+ this.hasVisibleAndNotInRangeLayers$.next(this.layers
12802
+ .slice(0)
12803
+ .filter((layer) => !isBaseLayer(layer))
12804
+ .filter((layer) => layer.visible && !layer.isInResolutionsRange)
12805
+ .length > 0);
12806
+ this.layersInUi$.next(this.layers
12807
+ .slice(0)
12808
+ .filter((layer) => layer.showInLayerList !== false &&
12809
+ (!this.excludeBaseLayers || !isBaseLayer(layer))));
12810
+ });
12811
+ }
12812
+ ngOnDestroy() {
12813
+ this.change$$.unsubscribe();
12814
+ }
12815
+ next() {
12816
+ this.change$.next();
12817
+ }
12818
+ computeShownLayers(layers) {
12819
+ let shownLayers = layers.filter((layer) => layer.displayed);
12820
+ if (this.showAllLegendsValue) {
12821
+ shownLayers = layers;
12822
+ }
12823
+ return sortLayersByZindex(shownLayers, 'desc');
12824
+ }
12825
+ toggleShowAllLegends(toggle) {
12826
+ this.showAllLegendsValue = toggle;
12827
+ this.next();
12828
+ this.allLegendsShown.emit(toggle);
12829
+ }
12830
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12831
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LayerLegendListComponent, isStandalone: true, selector: "igo-layer-legend-list", inputs: { layers: "layers", excludeBaseLayers: "excludeBaseLayers", updateLegendOnResolutionChange: "updateLegendOnResolutionChange", allowShowAllLegends: "allowShowAllLegends", showAllLegendsValue: "showAllLegendsValue" }, outputs: { allLegendsShown: "allLegendsShown" }, ngImport: i0, template: "<div class=\"layer-legend-list-container\">\n <mat-slide-toggle\n tooltip-position=\"above\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.layer.legend.showAll' | translate\"\n [checked]=\"showAllLegendsValue\"\n class=\"mat-typography\"\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n [labelPosition]=\"'before'\"\n (change)=\"toggleShowAllLegends($event.checked)\"\n >\n {{ 'igo.geo.layer.legend.showAll' | translate }}\n </mat-slide-toggle>\n <mat-divider\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n ></mat-divider>\n <igo-list [navigation]=\"false\" [selection]=\"false\">\n <ng-template ngFor let-layer let-i=\"index\" [ngForOf]=\"layers$ | async\">\n <igo-layer-legend-item\n *ngIf=\"!(excludeBaseLayers && isLayerItem(layer) && layer.baseLayer)\"\n igoListItem\n [layer]=\"$any(layer)\"\n [updateLegendOnResolutionChange]=\"updateLegendOnResolutionChange\"\n >\n </igo-layer-legend-item>\n </ng-template>\n </igo-list>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleWithShowAllButton' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n allowShowAllLegends\n \"\n >\n {{\n 'igo.geo.layer.legend.noLayersVisibleWithShowAllButtonButZoom' | translate\n }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisible' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleButZoom' | translate }}\n </p>\n</div>\n", styles: [":host mat-slide-toggle{width:100%;padding:10px}:host mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}:host mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;width:calc(100% - 60px)}:host igo-list{display:contents}:host .layers-empty{text-align:justify;margin:10px}:host .layer-legend-list-container{max-height:100%;overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i5$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: LayerLegendItemComponent, selector: "igo-layer-legend-item", inputs: ["layer", "updateLegendOnResolutionChange"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12832
+ }
12833
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListComponent, decorators: [{
12834
+ type: Component,
12835
+ args: [{ selector: 'igo-layer-legend-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
12836
+ NgIf,
12837
+ MatSlideToggleModule,
12838
+ MatTooltipModule,
12839
+ MatDividerModule,
12840
+ ListComponent,
12841
+ NgFor,
12842
+ LayerLegendItemComponent,
12843
+ ListItemDirective,
12844
+ AsyncPipe,
12845
+ IgoLanguageModule
12846
+ ], template: "<div class=\"layer-legend-list-container\">\n <mat-slide-toggle\n tooltip-position=\"above\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.layer.legend.showAll' | translate\"\n [checked]=\"showAllLegendsValue\"\n class=\"mat-typography\"\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n [labelPosition]=\"'before'\"\n (change)=\"toggleShowAllLegends($event.checked)\"\n >\n {{ 'igo.geo.layer.legend.showAll' | translate }}\n </mat-slide-toggle>\n <mat-divider\n *ngIf=\"(layersInUi$ | async).length && allowShowAllLegends\"\n ></mat-divider>\n <igo-list [navigation]=\"false\" [selection]=\"false\">\n <ng-template ngFor let-layer let-i=\"index\" [ngForOf]=\"layers$ | async\">\n <igo-layer-legend-item\n *ngIf=\"!(excludeBaseLayers && isLayerItem(layer) && layer.baseLayer)\"\n igoListItem\n [layer]=\"$any(layer)\"\n [updateLegendOnResolutionChange]=\"updateLegendOnResolutionChange\"\n >\n </igo-layer-legend-item>\n </ng-template>\n </igo-list>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleWithShowAllButton' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n !showAllLegendsValue &&\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n allowShowAllLegends\n \"\n >\n {{\n 'igo.geo.layer.legend.noLayersVisibleWithShowAllButtonButZoom' | translate\n }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) === false &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisible' | translate }}\n </p>\n <p\n class=\"layers-empty mat-typography\"\n *ngIf=\"\n (layersInUi$ | async).length &&\n (hasVisibleOrInRangeLayers$ | async) === false &&\n (hasVisibleAndNotInRangeLayers$ | async) &&\n !allowShowAllLegends\n \"\n >\n {{ 'igo.geo.layer.legend.noLayersVisibleButZoom' | translate }}\n </p>\n</div>\n", styles: [":host mat-slide-toggle{width:100%;padding:10px}:host mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}:host mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;width:calc(100% - 60px)}:host igo-list{display:contents}:host .layers-empty{text-align:justify;margin:10px}:host .layer-legend-list-container{max-height:100%;overflow:auto}\n"] }]
12847
+ }], propDecorators: { layers: [{
12848
+ type: Input
12849
+ }], excludeBaseLayers: [{
12850
+ type: Input
12851
+ }], updateLegendOnResolutionChange: [{
12852
+ type: Input
12853
+ }], allowShowAllLegends: [{
12854
+ type: Input
12855
+ }], showAllLegendsValue: [{
12856
+ type: Input
12857
+ }], allLegendsShown: [{
12858
+ type: Output
12859
+ }] } });
12860
+
12861
+ class LayerLegendListBindingDirective {
12862
+ mapService;
12863
+ component;
12864
+ layersOrResolutionChange$$;
12865
+ layersVisibility$$;
12866
+ constructor(component, mapService) {
12867
+ this.mapService = mapService;
12868
+ this.component = component;
12869
+ }
12870
+ ngOnInit() {
12871
+ // Override input layers
12872
+ this.component.layers = [];
12873
+ this.layersOrResolutionChange$$ = combineLatest([
12874
+ this.mapService.getMap().layerController.all$,
12875
+ this.mapService.getMap().viewController.resolution$
12876
+ ])
12877
+ .pipe(debounceTime(10))
12878
+ .subscribe((bunch) => {
12879
+ const shownLayers = bunch[0].filter((layer) => {
12880
+ return isLayerItem(layer) && layer.showInLayerList === true;
12881
+ });
12882
+ this.component.layers = shownLayers;
12883
+ this.layersVisibility$$ = combineLatest(shownLayers.map((layer) => layer.visible$)).subscribe(() => this.component.change$.next());
12884
+ });
12885
+ }
12886
+ ngOnDestroy() {
12887
+ this.layersOrResolutionChange$$.unsubscribe();
12888
+ if (this.layersVisibility$$ !== undefined) {
12889
+ this.layersVisibility$$.unsubscribe();
12890
+ this.layersVisibility$$ = undefined;
12891
+ }
12892
+ }
12893
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListBindingDirective, deps: [{ token: LayerLegendListComponent, self: true }, { token: MapService }], target: i0.ɵɵFactoryTarget.Directive });
12894
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: LayerLegendListBindingDirective, isStandalone: true, selector: "[igoLayerLegendListBinding]", ngImport: i0 });
12895
+ }
12896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerLegendListBindingDirective, decorators: [{
12897
+ type: Directive,
12898
+ args: [{
12899
+ selector: '[igoLayerLegendListBinding]',
12900
+ standalone: true
12901
+ }]
12902
+ }], ctorParameters: () => [{ type: LayerLegendListComponent, decorators: [{
12903
+ type: Self
12904
+ }] }, { type: MapService }] });
12905
+
12906
+ class LayerSearchComponent {
12907
+ control = new FormControl();
12908
+ initialValue;
12909
+ floatLabel;
12910
+ placeholder;
12911
+ tooltip;
12912
+ searchChange = new EventEmitter();
12913
+ ngOnInit() {
12914
+ if (this.initialValue) {
12915
+ this.control.setValue(this.initialValue, {
12916
+ emitEvent: false
12917
+ });
12918
+ }
12919
+ this.control.valueChanges.pipe(debounceTime$1(300)).subscribe((value) => {
12920
+ this.searchChange.emit(value);
12921
+ });
12922
+ }
12923
+ clearTerm() {
12924
+ this.control.reset();
12925
+ }
12926
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12927
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LayerSearchComponent, isStandalone: true, selector: "igo-layer-search", inputs: { initialValue: "initialValue", floatLabel: "floatLabel", placeholder: "placeholder", tooltip: "tooltip" }, outputs: { searchChange: "searchChange" }, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <input\n matInput\n [placeholder]=\"placeholder | translate\"\n [matTooltip]=\"tooltip | translate\"\n [matTooltipDisabled]=\"!tooltip\"\n matTooltipShowDelay=\"500\"\n type=\"text\"\n [formControl]=\"control\"\n />\n <button\n *ngIf=\"control.value\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearTerm()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n", styles: [":host{flex:1}mat-form-field{width:100%}mat-form-field ::ng-deep .mat-mdc-form-field-infix{width:auto!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
12928
+ }
12929
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayerSearchComponent, decorators: [{
12930
+ type: Component,
12931
+ args: [{ selector: 'igo-layer-search', imports: [
12932
+ NgIf,
12933
+ ReactiveFormsModule,
12934
+ MatFormFieldModule,
12935
+ MatButtonModule,
12936
+ MatInputModule,
12937
+ MatTooltipModule,
12938
+ MatIconModule,
12939
+ IgoLanguageModule
12940
+ ], template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <input\n matInput\n [placeholder]=\"placeholder | translate\"\n [matTooltip]=\"tooltip | translate\"\n [matTooltipDisabled]=\"!tooltip\"\n matTooltipShowDelay=\"500\"\n type=\"text\"\n [formControl]=\"control\"\n />\n <button\n *ngIf=\"control.value\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearTerm()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n", styles: [":host{flex:1}mat-form-field{width:100%}mat-form-field ::ng-deep .mat-mdc-form-field-infix{width:auto!important}\n"] }]
12941
+ }], propDecorators: { initialValue: [{
12942
+ type: Input
12943
+ }], floatLabel: [{
12944
+ type: Input
12945
+ }], placeholder: [{
12946
+ type: Input
12947
+ }], tooltip: [{
12948
+ type: Input
12949
+ }], searchChange: [{
12950
+ type: Output
12951
+ }] } });
12952
+
12392
12953
  const FORM_GROUP_CONFIG = {
12393
12954
  formFieldConfigs: [
12394
12955
  {
@@ -12739,355 +13300,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
12739
13300
  type: Output
12740
13301
  }] } });
12741
13302
 
12742
- const LAYER = 'Layer';
12743
-
12744
- class LayerSelectionModel {
12745
- selection = new SelectionModel(true);
12746
- descendantSelection = new SelectionModel(true);
12747
- get selected() {
12748
- return this.selection.selected;
12749
- }
12750
- get hasSelection() {
12751
- return this.selection.hasValue();
12752
- }
12753
- get isSelectionEmpty() {
12754
- return this.selection.isEmpty();
12755
- }
12756
- clearSelection() {
12757
- this.selection.clear();
12758
- this.descendantSelection.clear();
12759
- }
12760
- select(...layers) {
12761
- this.selection.select(...layers);
12762
- this.descendantSelection.select(...this.getDescendants(...layers));
12763
- }
12764
- deselect(...layers) {
12765
- this.selection.deselect(...layers);
12766
- this.descendantSelection.deselect(...this.getDescendants(...layers));
12767
- }
12768
- isSelected = (layer) => this.selection.isSelected(layer);
12769
- isDescendantSelection = (layer) => this.descendantSelection.isSelected(layer);
12770
- getDescendants(...layers) {
12771
- return layers.reduce((descendants, layer) => {
12772
- if (isLayerGroup(layer)) {
12773
- return descendants.concat(layer.descendants);
12774
- }
12775
- return descendants;
12776
- }, []);
12777
- }
12778
- }
12779
-
12780
- // Below 10 is reserved for BaseLayer
12781
- const ZINDEX_MIN = 10;
12782
- /**
12783
- * We got four kind of layers
12784
- * TreeLayer: all layers to show in the layer manager
12785
- * Baselayer: Layer dedicated for the basemap
12786
- * SystemLayer: Every layer dedicated to good function of the map (Selection, hovering)
12787
- * OtherLayer: all remaining layer that is linked to another layer or simply not a systemLayer that need to be cleaned on map reset
12788
- */
12789
- class LayerController extends LayerSelectionModel {
12790
- _map;
12791
- tree;
12792
- /** Selection, Hovering, every internalLayer not in the tree is here */
12793
- _systemLayers = [];
12794
- /** LinkedLayer and other layer that are not in the previous category and not visible in tree */
12795
- _otherLayers = [];
12796
- layersFlattened = [];
12797
- _layers$ = new BehaviorSubject(undefined);
12798
- layers$ = this._layers$.asObservable();
12799
- layersFlattened$ = this._layers$
12800
- .asObservable()
12801
- .pipe(map$1(() => this.layersFlattened));
12802
- _baseLayers = [];
12803
- _baseLayers$ = new BehaviorSubject(undefined);
12804
- baseLayers$ = this._baseLayers$.asObservable();
12805
- baseLayerSelection;
12806
- /** All layers with the tree flattened */
12807
- all$;
12808
- constructor(_map, layers) {
12809
- super();
12810
- this._map = _map;
12811
- this.all$ = combineLatest([this.layersFlattened$, this.baseLayers$]).pipe(debounceTime$1(10), map$1(() => this.all));
12812
- this.tree = new Tree(layers, {
12813
- getChildren: (node) => isLayerGroup(node) && node.children,
12814
- getId: (node) => node.id,
12815
- getLevel: (node) => node.zIndex,
12816
- reverse: true
12817
- });
12818
- }
12819
- get all() {
12820
- return [
12821
- ...this.baseLayers,
12822
- ...this.layersFlattened,
12823
- ...this._systemLayers,
12824
- ...this._otherLayers
12825
- ];
12826
- }
12827
- get baseLayers() {
12828
- return this._baseLayers;
12829
- }
12830
- get baseLayer() {
12831
- return this.baseLayers.find((layer) => layer.visible);
12832
- }
12833
- get treeLayers() {
12834
- return this.tree.data;
12835
- }
12836
- add(...layers) {
12837
- const offset = 0;
12838
- const addedLayers = layers
12839
- .map((layer) => this.handleAdd(layer, offset))
12840
- .filter(Boolean);
12841
- if (!addedLayers.length) {
12842
- this.notify();
12843
- return;
12844
- }
12845
- this.tree.add(...addedLayers);
12846
- // Notify the layers change before the iteration on the addedLayer
12847
- // Because the Layer may have have LinkedLayer who need to find the parent.
12848
- this.layersFlattened = [...this.tree.flattened];
12849
- addedLayers.forEach((layer) => layer.add());
12850
- this.recalculateZindex();
12851
- this.notify();
12852
- }
12853
- selectBaseLayer(layer) {
12854
- if (!isBaseLayer(layer)) {
12855
- return;
12856
- }
12857
- if (this.baseLayerSelection) {
12858
- this.baseLayerSelection.visible = false;
12859
- }
12860
- layer.visible = true;
12861
- this.baseLayerSelection = layer;
12862
- this._map.viewController.olView.setMinZoom(layer.dataSource.options.minZoom || (this._map.options.view || {}).minZoom);
12863
- this._map.viewController.olView.setMaxZoom(layer.dataSource.options.maxZoom || (this._map.options.view || {}).maxZoom);
12864
- }
12865
- remove(...layers) {
12866
- const list = layers.reduce((list, layer) => {
12867
- if (this.isSelected(layer)) {
12868
- this.deselect(layer);
12869
- }
12870
- const result = this._remove(layer);
12871
- Array.isArray(result) ? list.push(...result) : list.push(result);
12872
- return list;
12873
- }, []);
12874
- this.tree.remove(...list);
12875
- this.notify();
12876
- }
12877
- /**
12878
- * Move a layer into the tree
12879
- * @param layer Layer to move
12880
- * @param beforeTo The index position to move inside a tree
12881
- */
12882
- moveTo(beforeTo, ...layers) {
12883
- const movedLayers = this.tree.moveTo(beforeTo, ...layers);
12884
- if (!movedLayers?.length) {
12885
- return;
12886
- }
12887
- return movedLayers;
12888
- }
12889
- moveBelow(layerRef, ...layers) {
12890
- const position = this.getPosition(layerRef, 'below');
12891
- const movedLayers = this.moveTo(position, ...layers);
12892
- this.handleMove(movedLayers, layerRef.parent);
12893
- }
12894
- moveAbove(layerRef, ...layers) {
12895
- const position = this.getPosition(layerRef);
12896
- const movedLayers = this.moveTo(position, ...layers);
12897
- this.handleMove(movedLayers, layerRef.parent);
12898
- }
12899
- moveInside(layerRef, ...layers) {
12900
- const position = this.getPosition(layerRef);
12901
- const movedLayers = this.moveTo(position.concat(0), ...layers);
12902
- this.handleMove(movedLayers, layerRef);
12903
- }
12904
- raise(...layers) {
12905
- const position = this.getPosition(layers[0]);
12906
- const nextPosition = this.findLowestVisiblePostion(position, -1);
12907
- this.moveTo(nextPosition, ...layers);
12908
- this.handleMove(layers, null, true);
12909
- }
12910
- lower(...layers) {
12911
- const position = this.getPosition(layers[layers.length - 1]);
12912
- const nextPosition = this.findLowestVisiblePostion(position, 2); // +2 because we use moveBefore
12913
- this.moveTo(nextPosition, ...layers);
12914
- this.handleMove(layers, null, true);
12915
- }
12916
- /** Reset all except SystemLayer */
12917
- reset() {
12918
- this.clearBaselayers();
12919
- this.clearTree();
12920
- this.clearOther();
12921
- this.clearSelection();
12922
- this.notify();
12923
- }
12924
- getById(id) {
12925
- return this.all.find((layer) => layer.id && layer.id === id);
12926
- }
12927
- getBySourceId(id) {
12928
- return this.all.find((layer) => layer.dataSource?.id && layer.dataSource.id === id);
12929
- }
12930
- getPosition(layer, type = 'above') {
12931
- const position = this.tree.getPosition(layer);
12932
- if (type === 'below') {
12933
- let index = position.pop();
12934
- return position.concat(++index);
12935
- }
12936
- return position;
12937
- }
12938
- getLayerRecipient(layer) {
12939
- return layer.parent
12940
- ? this.tree.getChildren(layer.parent)
12941
- : [...this.treeLayers];
12942
- }
12943
- /**
12944
- * We got non visible layer in the tree like LinkedLayer. We want the next visible layer in tree
12945
- */
12946
- findLowestVisiblePostion(position, increment) {
12947
- const index = position.pop();
12948
- const nextPosition = position.concat(index + increment);
12949
- const layer = this.tree.getNodeByPosition(nextPosition);
12950
- if (layer && !layer.showInLayerList) {
12951
- const nextIndex = increment > 1 ? 1 : increment;
12952
- return this.findLowestVisiblePostion(nextPosition, nextIndex);
12953
- }
12954
- return nextPosition;
12955
- }
12956
- handleMove(layers, parent, keepCurrentParent) {
12957
- if (!layers?.length) {
12958
- return;
12959
- }
12960
- layers.forEach((layer) => {
12961
- layer.moveTo(keepCurrentParent ? layer.parent : parent);
12962
- });
12963
- this._internalMove();
12964
- }
12965
- _internalMove() {
12966
- this.recalculateZindex();
12967
- this.notify();
12968
- }
12969
- getBefore(layer) {
12970
- return this.treeLayers.find((layerTree) => layerTree.zIndex <= layer.zIndex);
12971
- }
12972
- /** Recursive */
12973
- recalculateZindex(minIndex = this.baseLayers.length, layers = this.treeLayers) {
12974
- return [...layers].reverse().reduce((previousZindex, layer) => {
12975
- let zIndex = ++previousZindex;
12976
- layer.zIndex = zIndex;
12977
- if (isLayerGroup(layer)) {
12978
- zIndex = this.recalculateZindex(zIndex, layer.children);
12979
- }
12980
- return zIndex;
12981
- }, minIndex);
12982
- }
12983
- handleAdd(layer, offset) {
12984
- const existingLayer = this.getById(layer.id);
12985
- if (existingLayer !== undefined) {
12986
- existingLayer.visible = true;
12987
- return;
12988
- }
12989
- const zIndex = this.getZindexOffset(layer, offset);
12990
- this.setZindex(layer, zIndex);
12991
- layer.init(this._map);
12992
- if (isBaseLayer(layer)) {
12993
- if (layer.visible) {
12994
- this.selectBaseLayer(layer);
12995
- }
12996
- this._baseLayers.push(layer);
12997
- }
12998
- else if (this.isOtherLayer(layer)) {
12999
- this._otherLayers.push(layer);
13000
- }
13001
- else if (this.isSystemLayer(layer) && !layer.showInLayerList) {
13002
- this._systemLayers.push(layer);
13003
- }
13004
- else if (layer.showInLayerList) {
13005
- return layer;
13006
- }
13007
- else {
13008
- this._otherLayers.push(layer);
13009
- }
13010
- const parent = layer.parentId
13011
- ? this.getById(layer.parentId.split(TREE_SEPERATOR).pop())
13012
- : undefined;
13013
- layer.add(parent);
13014
- return;
13015
- }
13016
- _remove(layer) {
13017
- if (isBaseLayer(layer)) {
13018
- this.removeBaselayer(layer);
13019
- }
13020
- else if (this.isOtherLayer(layer)) {
13021
- this.removeOtherLayer(layer);
13022
- }
13023
- else if (this.isSystemLayer(layer)) {
13024
- this.removeSystemLayer(layer);
13025
- }
13026
- layer.remove();
13027
- return layer;
13028
- }
13029
- removeBaselayer(layer) {
13030
- this.removeIn(layer, this._baseLayers);
13031
- }
13032
- removeSystemLayer(layer) {
13033
- this.removeIn(layer, this._systemLayers);
13034
- }
13035
- removeOtherLayer(layer) {
13036
- this.removeIn(layer, this._otherLayers);
13037
- }
13038
- removeIn(layer, store) {
13039
- const index = store.findIndex((sysLayer) => sysLayer.id === layer.id);
13040
- if (index === -1) {
13041
- return;
13042
- }
13043
- store.splice(index, 1);
13044
- }
13045
- isSystemLayer(layer) {
13046
- return isLayerItem(layer) && layer.isIgoInternalLayer;
13047
- }
13048
- isOtherLayer(layer) {
13049
- return isLayerLinked(layer) && !layer.showInLayerList;
13050
- }
13051
- clearBaselayers() {
13052
- this.baseLayers.forEach((layer) => this._remove(layer));
13053
- this._baseLayers = [];
13054
- }
13055
- clearTree() {
13056
- this.treeLayers.forEach((layer) => this._remove(layer));
13057
- this.tree.clear();
13058
- }
13059
- clearSystems() {
13060
- this._systemLayers.forEach((layer) => this._remove(layer));
13061
- this._systemLayers = [];
13062
- }
13063
- clearOther() {
13064
- this._otherLayers.forEach((layer) => this._remove(layer));
13065
- this._otherLayers = [];
13066
- }
13067
- getZindexOffset(layer, previousOffset = 0) {
13068
- return layer.zIndex ? 0 : previousOffset++;
13069
- }
13070
- setZindex(layer, offset) {
13071
- if (isBaseLayer(layer)) {
13072
- return this.handleBaselayerZIndex(layer, offset);
13073
- }
13074
- if (layer.zIndex === undefined || layer.zIndex === 0) {
13075
- const maxZIndex = Math.max(ZINDEX_MIN, ...this.treeLayers.map((l) => l.zIndex));
13076
- layer.zIndex = maxZIndex + 1 + (offset ?? 0);
13077
- }
13078
- }
13079
- handleBaselayerZIndex(layer, offset) {
13080
- const maxZIndex = Math.max(0, ...this.baseLayers.map((l) => l.zIndex));
13081
- const zIndex = maxZIndex + 1 + (offset ?? 0);
13082
- layer.zIndex = zIndex > ZINDEX_MIN ? ZINDEX_MIN : zIndex;
13083
- }
13084
- notify() {
13085
- this.layersFlattened = [...this.tree.flattened];
13086
- this._layers$.next([...this.treeLayers]);
13087
- this._baseLayers$.next([...this.baseLayers]);
13088
- }
13089
- }
13090
-
13091
13303
  class LayerUnavailableListComponent {
13092
13304
  layerService;
13093
13305
  layersOptions;
@@ -43277,5 +43489,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
43277
43489
  * Generated bundle index. Do not edit.
43278
43490
  */
43279
43491
 
43280
- export { AddCatalogDialogComponent, ArcGISRestCapabilitiesLayerTypes, ArcGISRestDataSource, BaseLayersSwitcherComponent, CATALOG_DIRECTIVES, CATALOG_LIBRARY_DIRECTIVES, CadastreSearchSource, CapabilitiesService, CartoDataSource, Catalog, CatalogBrowserComponent, CatalogItemType, CatalogLibraryComponent, CatalogService, ClusterDataSource, ConfigFileToGeoDBService, ConfirmationPopupComponent, CoordinatesReverseSearchSource, CoordinatesReverseSearchSourceFactory, CoordinatesSearchResultFormatter, CoordinatesUnit, CsvSeparator, DDtoDMS, DataService, DataSource, DataSourceService, DirectionRelativePositionType, DirectionSourceKind, DirectionsButtonsComponent, DirectionsComponent, DirectionsFormat, DirectionsInputsComponent, DirectionsResultsComponent, DirectionsService, DirectionsSource, DirectionsType, DownloadButtonComponent, DownloadService, DrawComponent, DrawControl, DrawIconService, DrawStyleService, DropGeoFileDirective, EditionWorkspace, EditionWorkspaceService, EsriStyleGenerator, EventRefresh, ExportButtonComponent, ExportError, ExportFormat, ExportFormatLegacy, ExportInvalidFileError, ExportNothingToExportError, ExportService, FEATURE, FEATURE_DETAILS_DIRECTIVES, FEATURE_DIRECTIVES, FILTER_DIRECTIVES, FeatureDataSource, FeatureDetailsComponent, FeatureDetailsDirective, FeatureFormComponent, FeatureMotion, FeatureStore, FeatureStoreInMapExtentStrategy, FeatureStoreInMapResolutionStrategy, FeatureStoreLoadingLayerStrategy, FeatureStoreLoadingStrategy, FeatureStoreSearchIndexStrategy, FeatureStoreSelectionStrategy, FeatureWorkspace, FeatureWorkspaceService, FilterableDataSourcePipe, GEOMETRY_FORM_FIELD_DIRECTIVES, GeoDB, GeoNetworkService, GeoPropertiesStrategy, GeolocateButtonComponent, GeolocationOverlayType, GeometryFormFieldComponent, GeometryFormFieldInputComponent, GeometrySliceError, GeometrySliceLineStringError, GeometrySliceMultiPolygonError, GeometrySliceTooManyIntersectionError, GeometryType, GoogleLinks, HomeExtentButtonComponent, HoverFeatureDirective, IChercheReverseSearchSource, IChercheSearchResultFormatter, IChercheSearchSource, ILayerSearchResultFormatter, ILayerSearchSource, IMPORT_EXPORT_DIRECTIVES, IgoCatalogBrowserModule, IgoCatalogLibraryModule, IgoCatalogModule, IgoConfirmationPopupModule, IgoDirectionsModule, IgoDownloadModule, IgoDrawModule, IgoDrawingToolModule, IgoFeatureDetailsModule, IgoFeatureFormModule, IgoFeatureModule, IgoFilterModule, IgoGeoModule, IgoGeoWorkspaceModule, IgoGeometryFormFieldModule, IgoGeometryModule, IgoHttpParameterCodec, IgoImportExportModule, IgoLayerModule, IgoMap, IgoMapModule, IgoMeasureModule, IgoMeasurerModule, IgoMetadataModule, IgoOgcFilterModule, IgoPrintModule, IgoQueryModule, IgoSearchBarModule, IgoSearchModule, IgoSearchResultsModule, IgoSearchSelectorModule, IgoSearchSettingsModule, IgoStyleListModule, IgoStyleModule, IgoToastModule, IgoWktModule, IgoWorkspaceSelectorModule, IgoWorkspaceUpdatorModule, ImageArcGISRestDataSource, ImageLayer, ImageWatcher, ImportError, ImportExportComponent, ImportInvalidFileError, ImportNothingToImportError, ImportOgreServerError, ImportSRSError, ImportService, ImportSizeError, ImportUnreadableFileError, InfoSectionComponent, InsertSourceInsertDBEnum, InteractiveSelectionFormWidget, LAYER, LAYER_DIRECTIVES, LabelType, LaneType, Layer, LayerBase, LayerController, LayerDB, LayerGroup, LayerGroupBase, LayerGroupComponent, LayerItemComponent, LayerLegendComponent, LayerLegendItemComponent, LayerLegendListBindingDirective, LayerLegendListComponent, LayerListComponent, LayerListControlsEnum, LayerListToolComponent, LayerListToolService, LayerSearchComponent, LayerService, LayerUnavailableComponent, LayerUnavailableListComponent, LayerViewerBottomActionsComponent, LayerViewerComponent, LayerVisibilityButtonComponent, Linked, LinkedProperties, MAP_DIRECTIVES, MEASURER_DIRECTIVES, MEASURE_UNIT_AUTO, METADATA_DIRECTIVES, MVTDataSource, ManeuverModifier, ManeuverType, MapBase, MapBrowserComponent, MapCenterComponent, MapController, MapGeolocationController, MapOfflineDirective, MapService, MapViewAction, MapViewController, MeasureAreaUnit, MeasureAreaUnitAbbreviation, MeasureFormatPipe, MeasureLengthUnit, MeasureLengthUnitAbbreviation, MeasureType, MeasurerComponent, MenuButtonComponent, MetadataAbstractComponent, MetadataButtonComponent, MetadataService, MiniBaseMapComponent, ModifyControl, NominatimSearchSource, OGCFilterService, OSMDataSource, OfflineButtonComponent, OgcFilterButtonComponent, OgcFilterComponent, OgcFilterFormComponent, OgcFilterOperator, OgcFilterOperatorType, OgcFilterSelectionComponent, OgcFilterTimeComponent, OgcFilterTimeSliderComponent, OgcFilterWidget, OgcFilterWriter, OgcFilterableFormComponent, OgcFilterableItemComponent, OgcFilterableListBindingDirective, OgcFilterableListComponent, OgcSelectorFields, OlDragSelectInteraction, OptionsApiService, OptionsService, OsmLinks, OsrmDirectionsSource, Overlay, OverlayAction, PointerPositionDirective, PrintComponent, PrintFormComponent, PrintLegendPosition, PrintOrientation, PrintOutputFormat, PrintPaperFormat, PrintResolution, PrintSaveImageFormat, PrintService, ProjectionService, PropertyTypeDetectorService, ProposalType, QueryDirective, QueryFormat, QueryFormatMimeType, QueryHtmlTarget, QuerySearchSource, QueryService, ResponseType, RotationButtonComponent, RoutesFeatureStore, SEARCH_DIRECTIVES, SEARCH_RESULTS_DIRECTIVES, SEARCH_TYPES, STYLELIST_OPTIONS, SearchBarComponent, SearchPointerSummaryDirective, SearchResultAddButtonComponent, SearchResultMode, SearchResultsComponent, SearchSelectorComponent, SearchService, SearchSettingsComponent, SearchSource, SearchSourceKind, SearchSourceService, SliceControl, SourceDirectionsType, SpatialFilterItemComponent, SpatialFilterItemType, SpatialFilterListComponent, SpatialFilterQueryType, SpatialFilterService, SpatialFilterType, SpatialFilterTypeComponent, StepsFeatureStore, StopsFeatureStore, StopsStore, StoredQueriesReverseSearchSource, StoredQueriesSearchSource, StyleListService, StyleModalDrawingComponent, StyleModalLayerButtonComponent, StyleModalLayerComponent, StyleService, SwipeControlComponent, TileArcGISRestDataSource, TileDebugDataSource, TileLayer, TileWatcher, TimeFilterButtonComponent, TimeFilterFormComponent, TimeFilterItemComponent, TimeFilterListBindingDirective, TimeFilterListComponent, TimeFilterService, TimeFilterStyle, TimeFilterType, ToastComponent, TooltipType, TrackFeatureButtonComponent, TypeCapabilities, TypeCatalog, VectorLayer, VectorTileLayer, VectorWatcher, WFSDataSource, WFSService, WMSDataSource, WMTSDataSource, WakeLockButtonComponent, WebSocketDataSource, WfsWorkspace, WfsWorkspaceService, WktService, WorkspaceSearchSource, WorkspaceSelectorDirective, WorkspaceUpdatorDirective, XYZDataSource, ZoomButtonComponent, addLayerAndFeaturesStyledToMap, addLayerAndFeaturesToMap, addLinearRingToOlPolygon, addOrRemoveLayer, addRouteToRoutesFeatureStore, addStopToStopsFeatureStore, addStopToStore, bufferOlGeometry, buildUrl, cadastreSearchSourceFactory, checkWfsParams, clearOlGeometryMidpoints, computeBestAreaUnit, computeBestLengthUnit, computeLayerTitleFromFile, computeMVTOptionsOnHover, computeOlFeatureExtent, computeOlFeaturesDiff, computeOlFeaturesExtent, computeProjectionsConstraints, computeRelativePosition, computeStopsPosition, computeTermSimilarity, convertDDToDMS, createDefaultTileGrid, createDrawHoleInteractionStyle, createDrawInteractionStyle, createFilterInMapExtentOrResolutionStrategy, createInteractionStyle, createMeasureInteractionStyle, createMeasureLayerStyle, createOlTooltipAtPoint, createOlTooltipDrawAtPoint, createOverlayDefaultStyle, createOverlayLayer, createOverlayLayerStyle, createOverlayMarkerStyle, createTableTemplate, ctrlKeyDown, defaultCoordinatesSearchResultFormatterFactory, defaultEpsg, defaultFieldNameGeometry, defaultIChercheSearchResultFormatterFactory, defaultMaxFeatures, defaultWfsVersion, detectFileEPSG, directionsStyle, doesOlGeometryIntersects, entitiesToRowData, exportToCSV, featureFromOl, featureRandomStyle, featureRandomStyleFunction, featureToOl, featureToSearchResult, featuresAreOutOfView, featuresAreTooDeepInView, findDiff, findLayerByLinkId, formatDistance, formatDuration, formatMeasure, formatScale, formatStep, formatWFSQueryString, generateArcgisRestIdFromSourceOptions, generateFeatureIdFromSourceOptions, generateId, generateIdFromSourceOptions, generateWMSIdFromSourceOptions, generateWMTSIdFromSourceOptions, generateWfsIdFromSourceOptions, generateXYZIdFromSourceOptions, getAllChildLayersByDeletion, getAllChildLayersByProperty, getCommonVectorSelectedStyle, getCommonVectorStyle, getFileExtension, getFormatFromOptions, getGeoServiceAction, getLayersByDeletion, getLayersLegends, getLinkedLayersOptions, getMousePositionFromOlGeometryEvent, getOlTooltipAtCenter, getOlTooltipsAtMidpoints, getResolutionFromScale, getRootParentByDeletion, getRootParentByProperty, getRowsInMapExtent, getSaveableOgcParams, getScaleFromResolution, getSelectedOnly, getTooltipsOfOlGeometry, gmlRegex, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleLayerPropertyChange, handleNothingToExportError, handleNothingToImportError, handleOgreServerImportError, handleSRSImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hideOlFeature, hoverFeatureMarkerStyle, ichercheReverseSearchSourceFactory, ichercheSearchSourceFactory, ilayerSearchResultFormatterFactory, ilayerSearchSourceFactory, initRoutesFeatureStore, initStepsFeatureStore, initStopsFeatureStore, interactiveSelectionFormWidgetFactory, isBaseLayer, isBaseLayerLinked, isCsvExport, isLayerGroup, isLayerGroupOptions, isLayerItem, isLayerItemOptions, isLayerLinked, isLayerLinkedOptions, isLayerLinkedTogether, isLinkMaster, isSaveableLayer, jsonRegex, layerFeatureIsQueryable, layerIsQueryable, lonLatConversion, mapExtentStrategyActiveToolTip, measureOlGeometry, measureOlGeometryArea, measureOlGeometryLength, metersToFeet, metersToKilometers, metersToMiles, metersToUnit, moveToOlFeatures, mtmZoneFromLonLat, noElementSelected, nominatimSearchSourceFactory, ogcFilterWidgetFactory, olLayerFeatureIsQueryable, olLayerIsQueryable, olStyleToBasicIgoStyle, optionsApiFactory, osrmDirectionsSourcesFactory, pointerPositionSummaryMarkerStyle, provideCadastreSearchSource, provideCoordinatesReverseSearchSource, provideDefaultCoordinatesSearchResultFormatter, provideDefaultIChercheSearchResultFormatter, provideDirection, provideIChercheReverseSearchSource, provideIChercheSearchSource, provideILayerSearchResultFormatter, provideILayerSearchSource, provideInteractiveSelectionFormWidget, provideNominatimSearchSource, provideOffline, provideOgcFilterWidget, provideOptionsApi, provideOsrmDirectionsSource, provideQuerySearchSource, provideSearch, provideSearchSourceService, provideStoredQueriesReverseSearchSource, provideStoredQueriesSearchSource, provideStyleListLoader, provideStyleListOptions, provideWorkspaceSearchSource, querySearchSourceFactory, removeStopFromStore, renderFeatureFromOl, roundCoordTo, roundCoordToString, scaleExtent, searchSourceServiceFactory, setRowsInMapExtent, setSelectedOnly, sliceOlGeometry, sliceOlPolygon, sortLayersByZindex, sourceCanReverseSearch, sourceCanReverseSearchAsSummary, sourceCanSearch, squareMetersToAcres, squareMetersToHectares, squareMetersToSquareFeet, squareMetersToSquareKilometers, squareMetersToSquareMiles, squareMetersToUnit, standardizeUrl, storedqueriesReverseSearchSourceFactory, storedqueriesSearchSourceFactory, stringToLonLat, translateManeuverBearing, translateManeuverModifier, tryAddLoadingStrategy, tryAddSelectionStrategy, tryBindStoreLayer, updateOlGeometryCenter, updateOlGeometryMidpoints, updateOlTooltipAtCenter, updateOlTooltipDrawAtCenter, updateOlTooltipsAtMidpoints, updateOlTooltipsDrawAtMidpoints, updateStoreSorting, utmZoneFromLonLat, viewStatesAreEqual, withCadastreSource, withCoordinatesReverseSource, withIChercheReverseSource, withIChercheSource, withILayerSource, withNominatimSource, withOsrmSource, withStoredQueriesReverseSource, withStoredQueriesSource, withWorkspaceSource, workspaceSearchSourceFactory, zoneMtm, zoneUtm };
43492
+ export { AddCatalogDialogComponent, ArcGISRestCapabilitiesLayerTypes, ArcGISRestDataSource, BaseLayersSwitcherComponent, CATALOG_DIRECTIVES, CATALOG_LIBRARY_DIRECTIVES, CadastreSearchSource, CapabilitiesService, CartoDataSource, Catalog, CatalogBrowserComponent, CatalogItemType, CatalogLibraryComponent, CatalogService, ClusterDataSource, ConfigFileToGeoDBService, ConfirmationPopupComponent, CoordinatesReverseSearchSource, CoordinatesReverseSearchSourceFactory, CoordinatesSearchResultFormatter, CoordinatesUnit, CsvSeparator, DDtoDMS, DataService, DataSource, DataSourceService, DirectionRelativePositionType, DirectionSourceKind, DirectionsButtonsComponent, DirectionsComponent, DirectionsFormat, DirectionsInputsComponent, DirectionsResultsComponent, DirectionsService, DirectionsSource, DirectionsType, DownloadButtonComponent, DownloadService, DrawComponent, DrawControl, DrawIconService, DrawStyleService, DropGeoFileDirective, EditionWorkspace, EditionWorkspaceService, EsriStyleGenerator, EventRefresh, ExportButtonComponent, ExportError, ExportFormat, ExportFormatLegacy, ExportInvalidFileError, ExportNothingToExportError, ExportService, FEATURE, FEATURE_DETAILS_DIRECTIVES, FEATURE_DIRECTIVES, FILTER_DIRECTIVES, FeatureDataSource, FeatureDetailsComponent, FeatureDetailsDirective, FeatureFormComponent, FeatureMotion, FeatureStore, FeatureStoreInMapExtentStrategy, FeatureStoreInMapResolutionStrategy, FeatureStoreLoadingLayerStrategy, FeatureStoreLoadingStrategy, FeatureStoreSearchIndexStrategy, FeatureStoreSelectionStrategy, FeatureWorkspace, FeatureWorkspaceService, FilterableDataSourcePipe, GEOMETRY_FORM_FIELD_DIRECTIVES, GeoDB, GeoNetworkService, GeoPropertiesStrategy, GeolocateButtonComponent, GeolocationOverlayType, GeometryFormFieldComponent, GeometryFormFieldInputComponent, GeometrySliceError, GeometrySliceLineStringError, GeometrySliceMultiPolygonError, GeometrySliceTooManyIntersectionError, GeometryType, GoogleLinks, HomeExtentButtonComponent, HoverFeatureDirective, IChercheReverseSearchSource, IChercheSearchResultFormatter, IChercheSearchSource, ID_GROUP_PREFIX, ILayerSearchResultFormatter, ILayerSearchSource, IMPORT_EXPORT_DIRECTIVES, IgoCatalogBrowserModule, IgoCatalogLibraryModule, IgoCatalogModule, IgoConfirmationPopupModule, IgoDirectionsModule, IgoDownloadModule, IgoDrawModule, IgoDrawingToolModule, IgoFeatureDetailsModule, IgoFeatureFormModule, IgoFeatureModule, IgoFilterModule, IgoGeoModule, IgoGeoWorkspaceModule, IgoGeometryFormFieldModule, IgoGeometryModule, IgoHttpParameterCodec, IgoImportExportModule, IgoLayerModule, IgoMap, IgoMapModule, IgoMeasureModule, IgoMeasurerModule, IgoMetadataModule, IgoOgcFilterModule, IgoPrintModule, IgoQueryModule, IgoSearchBarModule, IgoSearchModule, IgoSearchResultsModule, IgoSearchSelectorModule, IgoSearchSettingsModule, IgoStyleListModule, IgoStyleModule, IgoToastModule, IgoWktModule, IgoWorkspaceSelectorModule, IgoWorkspaceUpdatorModule, ImageArcGISRestDataSource, ImageLayer, ImageWatcher, ImportError, ImportExportComponent, ImportInvalidFileError, ImportNothingToImportError, ImportOgreServerError, ImportSRSError, ImportService, ImportSizeError, ImportUnreadableFileError, InfoSectionComponent, InsertSourceInsertDBEnum, InteractiveSelectionFormWidget, LAYER, LAYER_DIRECTIVES, LabelType, LaneType, Layer, LayerBase, LayerController, LayerDB, LayerGroup, LayerGroupBase, LayerGroupComponent, LayerItemComponent, LayerLegendComponent, LayerLegendItemComponent, LayerLegendListBindingDirective, LayerLegendListComponent, LayerListComponent, LayerListControlsEnum, LayerListToolComponent, LayerListToolService, LayerSearchComponent, LayerService, LayerUnavailableComponent, LayerUnavailableListComponent, LayerViewerBottomActionsComponent, LayerViewerComponent, LayerVisibilityButtonComponent, Linked, LinkedProperties, MAP_DIRECTIVES, MEASURER_DIRECTIVES, MEASURE_UNIT_AUTO, METADATA_DIRECTIVES, MVTDataSource, ManeuverModifier, ManeuverType, MapBase, MapBrowserComponent, MapCenterComponent, MapController, MapGeolocationController, MapOfflineDirective, MapService, MapViewAction, MapViewController, MeasureAreaUnit, MeasureAreaUnitAbbreviation, MeasureFormatPipe, MeasureLengthUnit, MeasureLengthUnitAbbreviation, MeasureType, MeasurerComponent, MenuButtonComponent, MetadataAbstractComponent, MetadataButtonComponent, MetadataService, MiniBaseMapComponent, ModifyControl, NominatimSearchSource, OGCFilterService, OSMDataSource, OfflineButtonComponent, OgcFilterButtonComponent, OgcFilterComponent, OgcFilterFormComponent, OgcFilterOperator, OgcFilterOperatorType, OgcFilterSelectionComponent, OgcFilterTimeComponent, OgcFilterTimeSliderComponent, OgcFilterWidget, OgcFilterWriter, OgcFilterableFormComponent, OgcFilterableItemComponent, OgcFilterableListBindingDirective, OgcFilterableListComponent, OgcSelectorFields, OlDragSelectInteraction, OptionsApiService, OptionsService, OsmLinks, OsrmDirectionsSource, Overlay, OverlayAction, PointerPositionDirective, PrintComponent, PrintFormComponent, PrintLegendPosition, PrintOrientation, PrintOutputFormat, PrintPaperFormat, PrintResolution, PrintSaveImageFormat, PrintService, ProjectionService, PropertyTypeDetectorService, ProposalType, QueryDirective, QueryFormat, QueryFormatMimeType, QueryHtmlTarget, QuerySearchSource, QueryService, ResponseType, RotationButtonComponent, RoutesFeatureStore, SEARCH_DIRECTIVES, SEARCH_RESULTS_DIRECTIVES, SEARCH_TYPES, STYLELIST_OPTIONS, SearchBarComponent, SearchPointerSummaryDirective, SearchResultAddButtonComponent, SearchResultMode, SearchResultsComponent, SearchSelectorComponent, SearchService, SearchSettingsComponent, SearchSource, SearchSourceKind, SearchSourceService, SliceControl, SourceDirectionsType, SpatialFilterItemComponent, SpatialFilterItemType, SpatialFilterListComponent, SpatialFilterQueryType, SpatialFilterService, SpatialFilterType, SpatialFilterTypeComponent, StepsFeatureStore, StopsFeatureStore, StopsStore, StoredQueriesReverseSearchSource, StoredQueriesSearchSource, StyleListService, StyleModalDrawingComponent, StyleModalLayerButtonComponent, StyleModalLayerComponent, StyleService, SwipeControlComponent, TileArcGISRestDataSource, TileDebugDataSource, TileLayer, TileWatcher, TimeFilterButtonComponent, TimeFilterFormComponent, TimeFilterItemComponent, TimeFilterListBindingDirective, TimeFilterListComponent, TimeFilterService, TimeFilterStyle, TimeFilterType, ToastComponent, TooltipType, TrackFeatureButtonComponent, TypeCapabilities, TypeCatalog, VectorLayer, VectorTileLayer, VectorWatcher, WFSDataSource, WFSService, WMSDataSource, WMTSDataSource, WakeLockButtonComponent, WebSocketDataSource, WfsWorkspace, WfsWorkspaceService, WktService, WorkspaceSearchSource, WorkspaceSelectorDirective, WorkspaceUpdatorDirective, XYZDataSource, ZoomButtonComponent, addLayerAndFeaturesStyledToMap, addLayerAndFeaturesToMap, addLinearRingToOlPolygon, addOrRemoveLayer, addRouteToRoutesFeatureStore, addStopToStopsFeatureStore, addStopToStore, bufferOlGeometry, buildUrl, cadastreSearchSourceFactory, checkWfsParams, clearOlGeometryMidpoints, computeBestAreaUnit, computeBestLengthUnit, computeLayerTitleFromFile, computeMVTOptionsOnHover, computeOlFeatureExtent, computeOlFeaturesDiff, computeOlFeaturesExtent, computeProjectionsConstraints, computeRelativePosition, computeStopsPosition, computeTermSimilarity, convertDDToDMS, createDefaultTileGrid, createDrawHoleInteractionStyle, createDrawInteractionStyle, createFilterInMapExtentOrResolutionStrategy, createInteractionStyle, createMeasureInteractionStyle, createMeasureLayerStyle, createOlTooltipAtPoint, createOlTooltipDrawAtPoint, createOverlayDefaultStyle, createOverlayLayer, createOverlayLayerStyle, createOverlayMarkerStyle, createTableTemplate, ctrlKeyDown, defaultCoordinatesSearchResultFormatterFactory, defaultEpsg, defaultFieldNameGeometry, defaultIChercheSearchResultFormatterFactory, defaultMaxFeatures, defaultWfsVersion, detectFileEPSG, directionsStyle, doesOlGeometryIntersects, entitiesToRowData, exportToCSV, featureFromOl, featureRandomStyle, featureRandomStyleFunction, featureToOl, featureToSearchResult, featuresAreOutOfView, featuresAreTooDeepInView, findDiff, findLayerByLinkId, findParentId, formatDistance, formatDuration, formatMeasure, formatScale, formatStep, formatWFSQueryString, generateArcgisRestIdFromSourceOptions, generateFeatureIdFromSourceOptions, generateId, generateIdFromSourceOptions, generateWMSIdFromSourceOptions, generateWMTSIdFromSourceOptions, generateWfsIdFromSourceOptions, generateXYZIdFromSourceOptions, getAllChildLayersByDeletion, getAllChildLayersByProperty, getCommonVectorSelectedStyle, getCommonVectorStyle, getFileExtension, getFormatFromOptions, getGeoServiceAction, getLayerOptionIdentifier, getLayersByDeletion, getLayersLegends, getLinkedLayersOptions, getMousePositionFromOlGeometryEvent, getOlTooltipAtCenter, getOlTooltipsAtMidpoints, getResolutionFromScale, getRootParentByDeletion, getRootParentByProperty, getRowsInMapExtent, getSaveableOgcParams, getScaleFromResolution, getSelectedOnly, getTooltipsOfOlGeometry, gmlRegex, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleLayerPropertyChange, handleNothingToExportError, handleNothingToImportError, handleOgreServerImportError, handleSRSImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hideOlFeature, hoverFeatureMarkerStyle, ichercheReverseSearchSourceFactory, ichercheSearchSourceFactory, ilayerSearchResultFormatterFactory, ilayerSearchSourceFactory, initRoutesFeatureStore, initStepsFeatureStore, initStopsFeatureStore, interactiveSelectionFormWidgetFactory, isBaseLayer, isBaseLayerLinked, isCsvExport, isLayerGroup, isLayerGroupOptions, isLayerItem, isLayerItemOptions, isLayerLinked, isLayerLinkedOptions, isLayerLinkedTogether, isLinkMaster, isSaveableLayer, jsonRegex, layerFeatureIsQueryable, layerIsQueryable, lonLatConversion, mapExtentStrategyActiveToolTip, measureOlGeometry, measureOlGeometryArea, measureOlGeometryLength, mergeLayersOptions, metersToFeet, metersToKilometers, metersToMiles, metersToUnit, moveToOlFeatures, mtmZoneFromLonLat, noElementSelected, nominatimSearchSourceFactory, ogcFilterWidgetFactory, olLayerFeatureIsQueryable, olLayerIsQueryable, olStyleToBasicIgoStyle, optionsApiFactory, osrmDirectionsSourcesFactory, pointerPositionSummaryMarkerStyle, provideCadastreSearchSource, provideCoordinatesReverseSearchSource, provideDefaultCoordinatesSearchResultFormatter, provideDefaultIChercheSearchResultFormatter, provideDirection, provideIChercheReverseSearchSource, provideIChercheSearchSource, provideILayerSearchResultFormatter, provideILayerSearchSource, provideInteractiveSelectionFormWidget, provideNominatimSearchSource, provideOffline, provideOgcFilterWidget, provideOptionsApi, provideOsrmDirectionsSource, provideQuerySearchSource, provideSearch, provideSearchSourceService, provideStoredQueriesReverseSearchSource, provideStoredQueriesSearchSource, provideStyleListLoader, provideStyleListOptions, provideWorkspaceSearchSource, querySearchSourceFactory, removeStopFromStore, renderFeatureFromOl, roundCoordTo, roundCoordToString, scaleExtent, searchSourceServiceFactory, setRowsInMapExtent, setSelectedOnly, sliceOlGeometry, sliceOlPolygon, sortLayersByZindex, sourceCanReverseSearch, sourceCanReverseSearchAsSummary, sourceCanSearch, squareMetersToAcres, squareMetersToHectares, squareMetersToSquareFeet, squareMetersToSquareKilometers, squareMetersToSquareMiles, squareMetersToUnit, standardizeUrl, storedqueriesReverseSearchSourceFactory, storedqueriesSearchSourceFactory, stringToLonLat, translateManeuverBearing, translateManeuverModifier, tryAddLoadingStrategy, tryAddSelectionStrategy, tryBindStoreLayer, updateOlGeometryCenter, updateOlGeometryMidpoints, updateOlTooltipAtCenter, updateOlTooltipDrawAtCenter, updateOlTooltipsAtMidpoints, updateOlTooltipsDrawAtMidpoints, updateStoreSorting, utmZoneFromLonLat, viewStatesAreEqual, withCadastreSource, withCoordinatesReverseSource, withIChercheReverseSource, withIChercheSource, withILayerSource, withNominatimSource, withOsrmSource, withStoredQueriesReverseSource, withStoredQueriesSource, withWorkspaceSource, workspaceSearchSourceFactory, zoneMtm, zoneUtm };
43281
43493
  //# sourceMappingURL=igo2-geo.mjs.map