@igo2/geo 1.13.4 → 1.14.1

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.
Files changed (73) hide show
  1. package/esm2020/lib/catalog/catalog-browser/catalog-browser.component.mjs +4 -1
  2. package/esm2020/lib/catalog/shared/catalog.abstract.mjs +1 -1
  3. package/esm2020/lib/datasource/shared/datasources/datasource.interface.mjs +1 -1
  4. package/esm2020/lib/datasource/shared/datasources/feature-datasource.interface.mjs +1 -1
  5. package/esm2020/lib/draw/draw/draw-popup.component.mjs +562 -32
  6. package/esm2020/lib/draw/draw/draw.component.mjs +360 -130
  7. package/esm2020/lib/draw/draw/draw.module.mjs +12 -4
  8. package/esm2020/lib/draw/shared/draw-style.service.mjs +2 -2
  9. package/esm2020/lib/draw/shared/draw.enum.mjs +14 -1
  10. package/esm2020/lib/draw/shared/draw.interface.mjs +1 -1
  11. package/esm2020/lib/draw/shared/draw.utils.mjs +19 -1
  12. package/esm2020/lib/filter/ogc-filter-time/ogc-filter-time.component.mjs +43 -16
  13. package/esm2020/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.mjs +21 -8
  14. package/esm2020/lib/geometry/geometry-form-field/geometry-form-field-input.component.mjs +12 -2
  15. package/esm2020/lib/geometry/shared/controls/draw.mjs +53 -10
  16. package/esm2020/lib/import-export/shared/export.service.mjs +2 -2
  17. package/esm2020/lib/import-export/shared/import.interface.mjs +1 -1
  18. package/esm2020/lib/import-export/shared/import.service.mjs +26 -6
  19. package/esm2020/lib/layer/shared/layers/layer.interface.mjs +1 -1
  20. package/esm2020/lib/map/shared/hover-feature.directive.mjs +2 -2
  21. package/esm2020/lib/map/shared/map.utils.mjs +4 -1
  22. package/esm2020/lib/map/shared/mapOffline.directive.mjs +7 -7
  23. package/esm2020/lib/offline/geoDB/configFileToGeoDB.service.mjs +33 -4
  24. package/esm2020/lib/offline/geoDB/geoDB.interface.mjs +1 -1
  25. package/esm2020/lib/offline/geoDB/geoDB.service.mjs +12 -12
  26. package/esm2020/lib/print/shared/geopdf.mjs +58 -0
  27. package/esm2020/lib/print/shared/index.mjs +2 -1
  28. package/esm2020/lib/print/shared/print.interface.mjs +1 -1
  29. package/esm2020/lib/print/shared/print.service.mjs +118 -64
  30. package/esm2020/lib/query/shared/query.service.mjs +7 -4
  31. package/esm2020/lib/search/search-bar/search-bar.component.mjs +30 -28
  32. package/esm2020/lib/search/search-results/search-results.component.mjs +22 -13
  33. package/esm2020/lib/search/shared/search.utils.mjs +2 -1
  34. package/esm2020/lib/search/shared/sources/icherche.mjs +70 -58
  35. package/esm2020/lib/search/shared/sources/index.mjs +1 -3
  36. package/esm2020/lib/workspace/shared/edition-workspace.service.mjs +20 -9
  37. package/fesm2015/igo2-geo.mjs +1505 -529
  38. package/fesm2015/igo2-geo.mjs.map +1 -1
  39. package/fesm2020/igo2-geo.mjs +1456 -525
  40. package/fesm2020/igo2-geo.mjs.map +1 -1
  41. package/lib/catalog/shared/catalog.abstract.d.ts +1 -0
  42. package/lib/datasource/shared/datasources/datasource.interface.d.ts +1 -0
  43. package/lib/datasource/shared/datasources/feature-datasource.interface.d.ts +1 -0
  44. package/lib/draw/draw/draw-popup.component.d.ts +52 -5
  45. package/lib/draw/draw/draw.component.d.ts +34 -4
  46. package/lib/draw/draw/draw.module.d.ts +3 -1
  47. package/lib/draw/shared/draw.enum.d.ts +11 -0
  48. package/lib/draw/shared/draw.interface.d.ts +4 -0
  49. package/lib/draw/shared/draw.utils.d.ts +2 -0
  50. package/lib/filter/ogc-filter-time/ogc-filter-time.component.d.ts +3 -1
  51. package/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.d.ts +2 -1
  52. package/lib/geometry/geometry-form-field/geometry-form-field-input.component.d.ts +7 -1
  53. package/lib/geometry/shared/controls/draw.d.ts +18 -0
  54. package/lib/import-export/shared/import.interface.d.ts +2 -1
  55. package/lib/import-export/shared/import.service.d.ts +7 -0
  56. package/lib/layer/shared/layers/layer.interface.d.ts +4 -0
  57. package/lib/map/shared/map.utils.d.ts +1 -0
  58. package/lib/offline/geoDB/configFileToGeoDB.service.d.ts +1 -0
  59. package/lib/offline/geoDB/geoDB.interface.d.ts +1 -0
  60. package/lib/offline/geoDB/geoDB.service.d.ts +3 -3
  61. package/lib/print/shared/geopdf.d.ts +1 -0
  62. package/lib/print/shared/index.d.ts +1 -0
  63. package/lib/print/shared/print.interface.d.ts +5 -0
  64. package/lib/print/shared/print.service.d.ts +17 -8
  65. package/lib/search/search-bar/search-bar.component.d.ts +8 -8
  66. package/lib/search/search-results/search-results.component.d.ts +4 -1
  67. package/lib/search/shared/sources/index.d.ts +0 -2
  68. package/lib/workspace/shared/edition-workspace.service.d.ts +4 -0
  69. package/package.json +4 -4
  70. package/esm2020/lib/search/shared/sources/cadastre.mjs +0 -126
  71. package/esm2020/lib/search/shared/sources/cadastre.providers.mjs +0 -23
  72. package/lib/search/shared/sources/cadastre.d.ts +0 -33
  73. package/lib/search/shared/sources/cadastre.providers.d.ts +0 -18
@@ -11,7 +11,7 @@ import { MatListModule } from '@angular/material/list';
11
11
  import * as i4 from '@angular/material/tooltip';
12
12
  import { MatTooltipModule } from '@angular/material/tooltip';
13
13
  import * as i5$1 from '@igo2/common';
14
- import { getEntityId, getEntityTitle, getEntityProperty, getEntityRevision, getEntityIcon, EntityStore, EntityStoreStrategy, EntityStoreWatcher, SecureImagePipe, IgoListModule, IgoCollapsibleModule, IgoImageModule, IgoPanelModule, IgoMatBadgeIconModule, IgoCustomHtmlModule, IgoEntityTableModule, IgoKeyValueModule, IgoFormModule, IgoFormFieldComponent, DOMService, EntityStoreFilterSelectionStrategy, EntityTableColumnRenderer, IgoEntityModule, IgoDOMModule, DragAndDropDirective, IgoSpinnerModule, IgoDrapDropModule, IgoConfirmDialogModule, getEntityTitleHtml, EntityStoreFilterCustomFuncStrategy, IgoStopPropagationModule, IgoFlexibleModule, WidgetService, Workspace, ActionStore, IgoWidgetModule } from '@igo2/common';
14
+ import { getEntityId, getEntityTitle, getEntityProperty, getEntityRevision, getEntityIcon, EntityStore, EntityStoreStrategy, EntityStoreWatcher, SecureImagePipe, EntityTableColumnRenderer, IgoListModule, IgoCollapsibleModule, IgoImageModule, IgoPanelModule, IgoMatBadgeIconModule, IgoCustomHtmlModule, IgoEntityTableModule, IgoKeyValueModule, IgoFormModule, IgoFormFieldComponent, DOMService, EntityStoreFilterSelectionStrategy, IgoEntityModule, IgoDOMModule, DragAndDropDirective, IgoSpinnerModule, IgoDrapDropModule, IgoConfirmDialogModule, getEntityTitleHtml, EntityStoreFilterCustomFuncStrategy, IgoStopPropagationModule, IgoFlexibleModule, WidgetService, Workspace, ActionStore, IgoWidgetModule } from '@igo2/common';
15
15
  import * as i3 from '@angular/material/button';
16
16
  import { MatButtonModule } from '@angular/material/button';
17
17
  import * as i2$1 from '@igo2/core';
@@ -19,7 +19,7 @@ import { IgoLanguageModule, ConfigService, Media, StorageScope, IgoMessageModule
19
19
  import * as i1 from '@angular/material/dialog';
20
20
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
21
21
  import * as i7 from '@ngx-translate/core';
22
- import { BehaviorSubject, combineLatest, of, Observable, forkJoin, Subject, interval, skipWhile as skipWhile$1, zip, EMPTY, ReplaySubject, timer, fromEvent, throwError } from 'rxjs';
22
+ import { BehaviorSubject, combineLatest, of, Observable, forkJoin, Subject, interval, skipWhile as skipWhile$1, zip, EMPTY, ReplaySubject, timer, fromEvent, Subscription, throwError } from 'rxjs';
23
23
  import { map, concatMap, first, catchError, skipWhile, debounceTime, skip, distinctUntilChanged, switchMap, take, mergeMap, debounce, takeUntil } from 'rxjs/operators';
24
24
  import { Watcher, uuid, SubjectStatus, NumberUtils, ObjectUtils, userAgent, Clipboard, downloadContent, strEnum, ChangeUtils } from '@igo2/utils';
25
25
  import olMap from 'ol/Map';
@@ -54,7 +54,7 @@ import { WMSCapabilities, WMTSCapabilities, EsriJSON } from 'ol/format';
54
54
  import { Md5 } from 'ts-md5';
55
55
  import { MAC } from 'ol/has';
56
56
  import * as olfilter from 'ol/format/filter';
57
- import olWKT from 'ol/format/WKT';
57
+ import olFormatWKT from 'ol/format/WKT';
58
58
  import olFormatWFS from 'ol/format/WFS';
59
59
  import moment from 'moment';
60
60
  import olFormatGML2 from 'ol/format/GML2';
@@ -105,10 +105,10 @@ import { MAT_DATE_LOCALE, MatOptionModule, MatNativeDateModule } from '@angular/
105
105
  import * as i13 from '@angular/material/form-field';
106
106
  import { MatFormFieldModule } from '@angular/material/form-field';
107
107
  import * as i2$2 from '@angular/forms';
108
- import { ReactiveFormsModule, FormsModule, Validators, UntypedFormControl } from '@angular/forms';
108
+ import { UntypedFormControl, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
109
109
  import * as i15 from '@angular/material/select';
110
110
  import { MatSelectModule } from '@angular/material/select';
111
- import * as i12$1 from '@angular/material/checkbox';
111
+ import * as i12 from '@angular/material/checkbox';
112
112
  import { MatCheckboxModule } from '@angular/material/checkbox';
113
113
  import * as i11 from '@angular/material/divider';
114
114
  import { MatDividerModule } from '@angular/material/divider';
@@ -120,7 +120,7 @@ import * as i23 from '@angular/material/slide-toggle';
120
120
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
121
121
  import * as i13$1 from '@angular/material/slider';
122
122
  import { MatSliderModule, MatSlider } from '@angular/material/slider';
123
- import * as i12 from 'ngx-color-picker';
123
+ import * as i12$1 from 'ngx-color-picker';
124
124
  import { ColorPickerModule } from 'ngx-color-picker';
125
125
  import scrollIntoView from 'scroll-into-view-if-needed';
126
126
  import OlOverlay from 'ol/Overlay';
@@ -135,13 +135,13 @@ import { doubleClick } from 'ol/events/condition';
135
135
  import lineIntersect from '@turf/line-intersect';
136
136
  import * as i18 from '@angular/material/button-toggle';
137
137
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
138
+ import * as i17 from '@angular/material/radio';
139
+ import { MatRadioModule } from '@angular/material/radio';
138
140
  import * as i11$1 from '@angular/material/autocomplete';
139
141
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
140
142
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
141
143
  import * as i25 from '@angular/material/datepicker';
142
144
  import { MatDatepickerModule } from '@angular/material/datepicker';
143
- import * as i17 from '@angular/material/radio';
144
- import { MatRadioModule } from '@angular/material/radio';
145
145
  import * as i21 from '@angular/material/table';
146
146
  import { MatTableModule } from '@angular/material/table';
147
147
  import * as i20 from '@angular/material/tabs';
@@ -157,7 +157,7 @@ import { SelectionModel } from '@angular/cdk/collections';
157
157
  import { NestedTreeControl } from '@angular/cdk/tree';
158
158
  import { encode } from 'windows-1252';
159
159
  import { saveAs } from 'file-saver';
160
- import jspdf from 'jspdf';
160
+ import jsPDF from 'jspdf';
161
161
  import html2canvas from 'html2canvas';
162
162
  import JSZip from 'jszip';
163
163
  import * as i3$1 from '@angular/cdk/drag-drop';
@@ -1123,6 +1123,9 @@ function roundCoordTo(coord, decimal = 3) {
1123
1123
  NumberUtils.roundToNDecimal(coord[1], decimal)
1124
1124
  ];
1125
1125
  }
1126
+ function roundCoordToString(coord, decimal = 3) {
1127
+ return roundCoordTo(coord, decimal).map(r => r.toString());
1128
+ }
1126
1129
  /**
1127
1130
  * Returns an array of converted coordinates.
1128
1131
  * Conversion is done for every configured projections
@@ -1581,7 +1584,7 @@ class OgcFilterWriter {
1581
1584
  const wfsExpression = filterOptions.expression;
1582
1585
  let geometry;
1583
1586
  if (wfsWktGeometry) {
1584
- const wkt = new olWKT();
1587
+ const wkt = new olFormatWKT();
1585
1588
  geometry = wkt.readGeometry(wfsWktGeometry, {
1586
1589
  dataProjection: wfsSrsName,
1587
1590
  featureProjection: wfsSrsName || 'EPSG:3857'
@@ -8506,12 +8509,12 @@ class MapOfflineDirective {
8506
8509
  else {
8507
8510
  if (this.networkState.connection === false ||
8508
8511
  this.offlineButtonState.connection === false) {
8509
- layer.ol.setMaxResolution(0);
8512
+ layer.maxResolution = 0;
8510
8513
  return;
8511
8514
  }
8512
8515
  else if (this.networkState.connection === true ||
8513
8516
  this.offlineButtonState.connection === true) {
8514
- layer.ol.setMaxResolution(Infinity);
8517
+ layer.maxResolution = layer.options.maxResolution || Infinity;
8515
8518
  return;
8516
8519
  }
8517
8520
  }
@@ -8539,22 +8542,22 @@ class MapOfflineDirective {
8539
8542
  else {
8540
8543
  if (this.networkState.connection === false ||
8541
8544
  this.offlineButtonState.connection === false) {
8542
- layer.ol.setMaxResolution(0);
8545
+ layer.maxResolution = 0;
8543
8546
  }
8544
8547
  else if (this.networkState.connection === true ||
8545
8548
  this.offlineButtonState.connection === true) {
8546
- layer.ol.setMaxResolution(Infinity);
8549
+ layer.maxResolution = layer.options.maxResolution || Infinity;
8547
8550
  }
8548
8551
  }
8549
8552
  }
8550
8553
  else {
8551
8554
  if (this.networkState.connection === false ||
8552
8555
  this.offlineButtonState.connection === false) {
8553
- layer.ol.setMaxResolution(0);
8556
+ layer.maxResolution = 0;
8554
8557
  }
8555
8558
  else if (this.networkState.connection === true ||
8556
8559
  this.offlineButtonState.connection === true) {
8557
- layer.ol.setMaxResolution(Infinity);
8560
+ layer.maxResolution = layer.options.maxResolution || Infinity;
8558
8561
  }
8559
8562
  }
8560
8563
  });
@@ -8755,7 +8758,7 @@ class HoverFeatureDirective {
8755
8758
  zIndex: 901,
8756
8759
  renderMode: "vector",
8757
8760
  declutter: true,
8758
- source: new olSourceVectorTile({}),
8761
+ source: new olSourceVectorTile({ projection: this.map.projection }),
8759
8762
  style: (feature, resolution) => {
8760
8763
  if (this.mvtStyleOptions && feature.getId() in this.selectionMVT) {
8761
8764
  return this.createHoverStyle(feature, this.mvtStyleOptions, resolution);
@@ -9786,7 +9789,7 @@ class GeoDBService {
9786
9789
  this.compression = compression;
9787
9790
  this.dbName = 'geoData';
9788
9791
  this.collisionsMap = new Map();
9789
- this._newTiles = 0;
9792
+ this._newData = 0;
9790
9793
  }
9791
9794
  /**
9792
9795
  * Only blob can be will be compressed
@@ -9821,7 +9824,7 @@ class GeoDBService {
9821
9824
  return this.ngxIndexedDBService.getByID(this.dbName, url);
9822
9825
  }), concatMap((dbObject) => {
9823
9826
  if (!dbObject) {
9824
- this._newTiles++;
9827
+ this._newData++;
9825
9828
  return this.ngxIndexedDBService.add(this.dbName, geoDBData);
9826
9829
  }
9827
9830
  else {
@@ -9873,11 +9876,11 @@ class GeoDBService {
9873
9876
  deleteByKey(url) {
9874
9877
  return this.ngxIndexedDBService.deleteByKey(this.dbName, url);
9875
9878
  }
9876
- getRegionTileCountByID(id) {
9879
+ getRegionCountByID(id) {
9877
9880
  const subject = new Subject();
9878
9881
  const dbRequest = this.getRegionByID(id)
9879
- .subscribe((tiles) => {
9880
- subject.next(tiles.length);
9882
+ .subscribe((datas) => {
9883
+ subject.next(datas.length);
9881
9884
  subject.complete();
9882
9885
  });
9883
9886
  return subject;
@@ -9896,9 +9899,9 @@ class GeoDBService {
9896
9899
  }
9897
9900
  const IDBKey = IDBKeyRange.only(id);
9898
9901
  const dbRequest = this.ngxIndexedDBService.getAllByIndex(this.dbName, 'regionID', IDBKey);
9899
- dbRequest.subscribe((tiles) => {
9900
- tiles.forEach((tile) => {
9901
- this.ngxIndexedDBService.deleteByKey(this.dbName, tile.url);
9902
+ dbRequest.subscribe((datas) => {
9903
+ datas.forEach((data) => {
9904
+ this.ngxIndexedDBService.deleteByKey(this.dbName, data.url);
9902
9905
  });
9903
9906
  });
9904
9907
  return dbRequest;
@@ -9909,7 +9912,7 @@ class GeoDBService {
9909
9912
  }
9910
9913
  resetCounters() {
9911
9914
  this.resetCollisionsMap();
9912
- this._newTiles = 0;
9915
+ this._newData = 0;
9913
9916
  }
9914
9917
  resetCollisionsMap() {
9915
9918
  this.collisionsMap = new Map();
@@ -9927,8 +9930,8 @@ class GeoDBService {
9927
9930
  }
9928
9931
  }
9929
9932
  }
9930
- get newTiles() {
9931
- return this._newTiles;
9933
+ get newData() {
9934
+ return this._newData;
9932
9935
  }
9933
9936
  }
9934
9937
  GeoDBService.ɵfac = function GeoDBService_Factory(t) { return new (t || GeoDBService)(i0.ɵɵinject(i1$3.NgxIndexedDBService), i0.ɵɵinject(i2$1.CompressionService)); };
@@ -10994,7 +10997,7 @@ class QueryService {
10994
10997
  features = this.extractGML2Data(res, layer, allowedFieldsAndAlias);
10995
10998
  break;
10996
10999
  }
10997
- if (features.length > 0 && features[0].geometry === null) {
11000
+ if (features.length > 0 && (features[0].geometry === null || !features[0].geometry)) {
10998
11001
  const geomToAdd = this.createGeometryFromUrlClick(url);
10999
11002
  for (const feature of features) {
11000
11003
  feature.geometry = geomToAdd;
@@ -11005,7 +11008,7 @@ class QueryService {
11005
11008
  new RegExp('FEATURE_COUNT=' + this.featureCount) :
11006
11009
  new RegExp('FEATURE_COUNT=' + this.defaultFeatureCount);
11007
11010
  if (featureCount.test(url) &&
11008
- ((((_b = wmsDatasource.params) === null || _b === void 0 ? void 0 : _b.FEATURE_COUNT) && features.length === this.featureCount) ||
11011
+ ((((_b = wmsDatasource.params) === null || _b === void 0 ? void 0 : _b.FEATURE_COUNT) && this.featureCount > 1 && features.length === this.featureCount) ||
11009
11012
  (!((_c = wmsDatasource.params) === null || _c === void 0 ? void 0 : _c.FEATURE_COUNT) && features.length === this.defaultFeatureCount))) {
11010
11013
  this.languageService.translate.get('igo.geo.query.featureCountMax', { value: layer.title }).subscribe(message => {
11011
11014
  const messageObj = this.messageService.info(message);
@@ -11205,6 +11208,7 @@ class QueryService {
11205
11208
  delete properties.SHAPE_P;
11206
11209
  delete properties.the_geom;
11207
11210
  delete properties.geom;
11211
+ delete properties.geom32198;
11208
11212
  let geometry;
11209
11213
  if (featureGeometry) {
11210
11214
  geometry = {
@@ -11364,7 +11368,9 @@ class QueryService {
11364
11368
  *
11365
11369
  */
11366
11370
  getCustomQueryUrl(datasource, options, mapExtent) {
11367
- let url = datasource.options.queryUrl.replace(/\{xmin\}/g, mapExtent[0].toString())
11371
+ const extent = olextent.getForViewAndSize(options.coordinates, options.resolution, 0, [101, 101]);
11372
+ let url = datasource.options.queryUrl.replace(/\{bbox\}/g, extent.join(','))
11373
+ .replace(/\{xmin\}/g, mapExtent[0].toString())
11368
11374
  .replace(/\{ymin\}/g, mapExtent[1].toString())
11369
11375
  .replace(/\{xmax\}/g, mapExtent[2].toString())
11370
11376
  .replace(/\{ymax\}/g, mapExtent[3].toString())
@@ -12716,9 +12722,13 @@ class CatalogBrowserComponent {
12716
12722
  */
12717
12723
  addLayersToMap(layers) {
12718
12724
  const layers$ = layers.map((layer) => {
12725
+ var _a;
12719
12726
  if (!layer.options.sourceOptions.optionsFromApi) {
12720
12727
  layer.options.sourceOptions.optionsFromApi = true;
12721
12728
  }
12729
+ if ((_a = this.catalog.profils) === null || _a === void 0 ? void 0 : _a.length) {
12730
+ layer.options.security = { profils: this.catalog.profils };
12731
+ }
12722
12732
  return this.layerService.createAsyncLayer(layer.options);
12723
12733
  });
12724
12734
  zip(...layers$).subscribe((oLayers) => {
@@ -15858,7 +15868,20 @@ var FontType;
15858
15868
  FontType["LucidaConsole"] = "Lucida Console";
15859
15869
  FontType["BrushScriptMT"] = "Brush Script MT";
15860
15870
  FontType["ComicSansMS"] = "Comic Sans MS";
15861
- })(FontType || (FontType = {}));
15871
+ })(FontType || (FontType = {}));
15872
+ var LabelType;
15873
+ (function (LabelType) {
15874
+ LabelType["Coordinates"] = "Coordinates";
15875
+ LabelType["Length"] = "Length";
15876
+ LabelType["Area"] = "Area";
15877
+ LabelType["Predefined"] = "Predefined";
15878
+ LabelType["Custom"] = "Custom";
15879
+ })(LabelType || (LabelType = {}));
15880
+ var CoordinatesUnit;
15881
+ (function (CoordinatesUnit) {
15882
+ CoordinatesUnit["DecimalDegree"] = "DD";
15883
+ CoordinatesUnit["DegreesMinutesSeconds"] = "DMS";
15884
+ })(CoordinatesUnit || (CoordinatesUnit = {}));
15862
15885
 
15863
15886
  class DrawIconService {
15864
15887
  constructor(config) {
@@ -16500,6 +16523,22 @@ function createOlTooltipDrawAtPoint(olPoint) {
16500
16523
  olTooltip.setPosition(olPoint.getFlatCoordinates());
16501
16524
  olPoint.set('_tooltip', olTooltip);
16502
16525
  return olTooltip;
16526
+ }
16527
+ function DDtoDMS(value, unit) {
16528
+ const conversionMapper = new Map([
16529
+ [CoordinatesUnit.DecimalDegree, (val) => {
16530
+ if (typeof val[0] === 'number') {
16531
+ return roundCoordToString(val, 5);
16532
+ }
16533
+ else {
16534
+ const numVal = [Number(val[0]), Number(val[1])];
16535
+ return roundCoordToString(numVal, 5);
16536
+ }
16537
+ }],
16538
+ [CoordinatesUnit.DegreesMinutesSeconds, (val) => convertDDToDMS(val, 2)]
16539
+ ]);
16540
+ let conversion = conversionMapper.get(unit);
16541
+ return conversion ? conversion(value) : undefined;
16503
16542
  }
16504
16543
 
16505
16544
  class DrawStyleService {
@@ -16509,7 +16548,7 @@ class DrawStyleService {
16509
16548
  this.strokeColor = 'rgba(143,7,7,1)';
16510
16549
  this.strokeWidth = 1;
16511
16550
  this.labelsAreShown = true;
16512
- this.fontSize = '20';
16551
+ this.fontSize = '15';
16513
16552
  this.fontStyle = FontType.Arial.toString();
16514
16553
  this.offsetX = 0;
16515
16554
  this.offsetY = 0;
@@ -17404,8 +17443,24 @@ class DrawControl {
17404
17443
  * Freehand mode observable (defaults to false)
17405
17444
  */
17406
17445
  this.freehand$ = new BehaviorSubject(false);
17446
+ /**
17447
+ * Observables from predefined radius (defaults to false and undefined)
17448
+ */
17449
+ this.ispredefinedRadius$ = new BehaviorSubject(false);
17450
+ this.predefinedRadius$ = new BehaviorSubject(undefined);
17451
+ this.radiusDrawEnd$ = new BehaviorSubject(undefined);
17407
17452
  this.olDrawingLayer = options.drawingLayer ? options.drawingLayer : this.createOlInnerOverlayLayer();
17408
17453
  this.olGeometryType = this.options.geometryType;
17454
+ this.olInteractionStyle = this.options.interactionStyle;
17455
+ }
17456
+ /**
17457
+ * take the value of radius
17458
+ */
17459
+ get radiusVal() {
17460
+ return this.predefinedRadius$.getValue();
17461
+ }
17462
+ set radiusValData(radiusCercle) {
17463
+ this.predefinedRadius$.next(radiusCercle);
17409
17464
  }
17410
17465
  /**
17411
17466
  * Wheter the control is active
@@ -17442,6 +17497,9 @@ class DrawControl {
17442
17497
  getSource() {
17443
17498
  return this.olDrawingLayerSource;
17444
17499
  }
17500
+ setOlInteractionStyle(style) {
17501
+ this.olInteractionStyle = style;
17502
+ }
17445
17503
  /**
17446
17504
  * Set the current geometry type
17447
17505
  * @param geometryType the geometry type
@@ -17449,6 +17507,12 @@ class DrawControl {
17449
17507
  setGeometryType(geometryType) {
17450
17508
  this.olGeometryType = geometryType;
17451
17509
  }
17510
+ /**
17511
+ * Get the current geometry type
17512
+ */
17513
+ getGeometryType() {
17514
+ return this.olGeometryType;
17515
+ }
17452
17516
  /**
17453
17517
  * Create a drawing source if none is defined in the options
17454
17518
  */
@@ -17490,21 +17554,35 @@ class DrawControl {
17490
17554
  // Create Draw interaction
17491
17555
  let olDrawInteraction;
17492
17556
  if (!this.freehand$.getValue()) {
17493
- olDrawInteraction = new OlDraw({
17494
- type: this.olGeometryType,
17495
- source: this.getSource(),
17496
- stopClick: true,
17497
- style: this.options.interactionStyle,
17498
- maxPoints: this.options.maxPoints,
17499
- freehand: false,
17500
- freehandCondition: () => false
17501
- });
17557
+ if (!this.ispredefinedRadius$.getValue()) {
17558
+ olDrawInteraction = new OlDraw({
17559
+ type: this.olGeometryType,
17560
+ source: this.getSource(),
17561
+ stopClick: true,
17562
+ style: this.olInteractionStyle,
17563
+ maxPoints: this.options.maxPoints,
17564
+ freehand: false,
17565
+ freehandCondition: () => false
17566
+ });
17567
+ }
17568
+ else {
17569
+ olDrawInteraction = new OlDraw({
17570
+ type: 'Point',
17571
+ source: this.getSource(),
17572
+ stopClick: true,
17573
+ style: this.olInteractionStyle,
17574
+ maxPoints: this.options.maxPoints,
17575
+ freehand: false,
17576
+ freehandCondition: () => false
17577
+ });
17578
+ }
17502
17579
  }
17503
17580
  else {
17504
17581
  if (this.olGeometryType === 'Point') {
17505
17582
  olDrawInteraction = new OlDraw({
17506
17583
  type: 'Circle',
17507
17584
  source: this.getSource(),
17585
+ style: typeof this.olInteractionStyle === 'function' ? undefined : this.olInteractionStyle,
17508
17586
  maxPoints: this.options.maxPoints,
17509
17587
  freehand: true
17510
17588
  });
@@ -17513,6 +17591,7 @@ class DrawControl {
17513
17591
  olDrawInteraction = new OlDraw({
17514
17592
  type: this.olGeometryType,
17515
17593
  source: this.getSource(),
17594
+ style: this.olInteractionStyle,
17516
17595
  maxPoints: this.options.maxPoints,
17517
17596
  freehand: true
17518
17597
  });
@@ -17575,6 +17654,9 @@ class DrawControl {
17575
17654
  * @param event Draw event (drawend)
17576
17655
  */
17577
17656
  onDrawEnd(event) {
17657
+ if (event.feature.getGeometry().getType() === 'Point') {
17658
+ this.radiusDrawEnd$.next(this.predefinedRadius$.getValue());
17659
+ }
17578
17660
  this.unsubscribeKeyDown();
17579
17661
  unByKey(this.onDrawKey);
17580
17662
  const olGeometry = event.feature.getGeometry();
@@ -17632,63 +17714,614 @@ class DrawControl {
17632
17714
  }
17633
17715
  }
17634
17716
 
17717
+ function DrawPopupComponent_div_12_mat_radio_group_5_mat_radio_button_1_Template(rf, ctx) {
17718
+ if (rf & 1) {
17719
+ const _r10 = i0.ɵɵgetCurrentView();
17720
+ i0.ɵɵelementStart(0, "mat-radio-button", 11);
17721
+ i0.ɵɵlistener("change", function DrawPopupComponent_div_12_mat_radio_group_5_mat_radio_button_1_Template_mat_radio_button_change_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r9.onLabelTypeChange($event.value)); });
17722
+ i0.ɵɵtext(1);
17723
+ i0.ɵɵelementEnd();
17724
+ }
17725
+ if (rf & 2) {
17726
+ const option_r8 = ctx.$implicit;
17727
+ const ctx_r7 = i0.ɵɵnextContext(3);
17728
+ i0.ɵɵproperty("value", option_r8.value)("disabled", ctx_r7.optionAvailable(option_r8.value))("checked", option_r8.checked);
17729
+ i0.ɵɵadvance(1);
17730
+ i0.ɵɵtextInterpolate1(" ", ctx_r7.getProperLengthLabel(option_r8.value), " ");
17731
+ }
17732
+ }
17733
+ function DrawPopupComponent_div_12_mat_radio_group_5_Template(rf, ctx) {
17734
+ if (rf & 1) {
17735
+ i0.ɵɵelementStart(0, "mat-radio-group", 5);
17736
+ i0.ɵɵtemplate(1, DrawPopupComponent_div_12_mat_radio_group_5_mat_radio_button_1_Template, 2, 4, "mat-radio-button", 10);
17737
+ i0.ɵɵelementEnd();
17738
+ }
17739
+ if (rf & 2) {
17740
+ const ctx_r2 = i0.ɵɵnextContext(2);
17741
+ i0.ɵɵadvance(1);
17742
+ i0.ɵɵproperty("ngForOf", ctx_r2.arrayBuiltInType);
17743
+ }
17744
+ }
17745
+ function DrawPopupComponent_div_12_ng_container_6_mat_checkbox_1_Template(rf, ctx) {
17746
+ if (rf & 1) {
17747
+ const _r14 = i0.ɵɵgetCurrentView();
17748
+ i0.ɵɵelementStart(0, "mat-checkbox", 13);
17749
+ i0.ɵɵlistener("change", function DrawPopupComponent_div_12_ng_container_6_mat_checkbox_1_Template_mat_checkbox_change_0_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r13.onLabelTypeChange($event.source.value, $event.checked)); });
17750
+ i0.ɵɵtext(1);
17751
+ i0.ɵɵelementEnd();
17752
+ }
17753
+ if (rf & 2) {
17754
+ const option_r12 = ctx.$implicit;
17755
+ const ctx_r11 = i0.ɵɵnextContext(3);
17756
+ i0.ɵɵproperty("value", option_r12.value)("disabled", ctx_r11.optionAvailable(option_r12.value))("checked", option_r12.checked);
17757
+ i0.ɵɵadvance(1);
17758
+ i0.ɵɵtextInterpolate1(" ", ctx_r11.getProperLengthLabel(option_r12.value), " ");
17759
+ }
17760
+ }
17761
+ function DrawPopupComponent_div_12_ng_container_6_Template(rf, ctx) {
17762
+ if (rf & 1) {
17763
+ i0.ɵɵelementContainerStart(0, 5);
17764
+ i0.ɵɵtemplate(1, DrawPopupComponent_div_12_ng_container_6_mat_checkbox_1_Template, 2, 4, "mat-checkbox", 12);
17765
+ i0.ɵɵelementContainerEnd();
17766
+ }
17767
+ if (rf & 2) {
17768
+ const ctx_r3 = i0.ɵɵnextContext(2);
17769
+ i0.ɵɵadvance(1);
17770
+ i0.ɵɵproperty("ngForOf", ctx_r3.arrayBuiltInType);
17771
+ }
17772
+ }
17773
+ function DrawPopupComponent_div_12_div_7_mat_option_6_Template(rf, ctx) {
17774
+ if (rf & 1) {
17775
+ i0.ɵɵelementStart(0, "mat-option", 3);
17776
+ i0.ɵɵtext(1);
17777
+ i0.ɵɵelementEnd();
17778
+ }
17779
+ if (rf & 2) {
17780
+ const unit_r17 = ctx.$implicit;
17781
+ i0.ɵɵproperty("value", unit_r17);
17782
+ i0.ɵɵadvance(1);
17783
+ i0.ɵɵtextInterpolate1(" ", unit_r17, " ");
17784
+ }
17785
+ }
17786
+ function DrawPopupComponent_div_12_div_7_Template(rf, ctx) {
17787
+ if (rf & 1) {
17788
+ const _r19 = i0.ɵɵgetCurrentView();
17789
+ i0.ɵɵelementStart(0, "div")(1, "mat-form-field", 14);
17790
+ i0.ɵɵelement(2, "input", 15, 16);
17791
+ i0.ɵɵelementEnd();
17792
+ i0.ɵɵelementStart(4, "mat-form-field", 17)(5, "mat-select", 18);
17793
+ i0.ɵɵlistener("selectionChange", function DrawPopupComponent_div_12_div_7_Template_mat_select_selectionChange_5_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r18.onChangeCoordinateUnit($event.value)); });
17794
+ i0.ɵɵtemplate(6, DrawPopupComponent_div_12_div_7_mat_option_6_Template, 2, 2, "mat-option", 19);
17795
+ i0.ɵɵelementEnd()()();
17796
+ }
17797
+ if (rf & 2) {
17798
+ const ctx_r4 = i0.ɵɵnextContext(2);
17799
+ i0.ɵɵadvance(2);
17800
+ i0.ɵɵpropertyInterpolate("value", ctx_r4.currentCoordinates);
17801
+ i0.ɵɵadvance(3);
17802
+ i0.ɵɵproperty("value", ctx_r4.coordinatesMeasureUnit);
17803
+ i0.ɵɵadvance(1);
17804
+ i0.ɵɵproperty("ngForOf", ctx_r4.allCoordinatesUnits);
17805
+ }
17806
+ }
17807
+ function DrawPopupComponent_div_12_div_8_mat_option_6_Template(rf, ctx) {
17808
+ if (rf & 1) {
17809
+ i0.ɵɵelementStart(0, "mat-option", 3);
17810
+ i0.ɵɵtext(1);
17811
+ i0.ɵɵelementEnd();
17812
+ }
17813
+ if (rf & 2) {
17814
+ const unit_r22 = ctx.$implicit;
17815
+ const ctx_r21 = i0.ɵɵnextContext(3);
17816
+ i0.ɵɵproperty("value", unit_r22);
17817
+ i0.ɵɵadvance(1);
17818
+ i0.ɵɵtextInterpolate1(" ", ctx_r21.getLengthUnitEnum(unit_r22), " ");
17819
+ }
17820
+ }
17821
+ function DrawPopupComponent_div_12_div_8_Template(rf, ctx) {
17822
+ if (rf & 1) {
17823
+ const _r24 = i0.ɵɵgetCurrentView();
17824
+ i0.ɵɵelementStart(0, "div")(1, "mat-form-field", 14);
17825
+ i0.ɵɵelement(2, "input", 20, 16);
17826
+ i0.ɵɵelementEnd();
17827
+ i0.ɵɵelementStart(4, "mat-form-field", 17)(5, "mat-select", 18);
17828
+ i0.ɵɵlistener("selectionChange", function DrawPopupComponent_div_12_div_8_Template_mat_select_selectionChange_5_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r23 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r23.onChangeLengthUnit($event.value)); });
17829
+ i0.ɵɵtemplate(6, DrawPopupComponent_div_12_div_8_mat_option_6_Template, 2, 2, "mat-option", 19);
17830
+ i0.ɵɵelementEnd()()();
17831
+ }
17832
+ if (rf & 2) {
17833
+ const ctx_r5 = i0.ɵɵnextContext(2);
17834
+ i0.ɵɵadvance(2);
17835
+ i0.ɵɵpropertyInterpolate("placeholder", ctx_r5.lengthLabelT);
17836
+ i0.ɵɵpropertyInterpolate("value", ctx_r5.currentLength);
17837
+ i0.ɵɵadvance(3);
17838
+ i0.ɵɵproperty("value", ctx_r5.lengthMeasureUnit);
17839
+ i0.ɵɵadvance(1);
17840
+ i0.ɵɵproperty("ngForOf", ctx_r5.allLengthUnits);
17841
+ }
17842
+ }
17843
+ function DrawPopupComponent_div_12_div_9_mat_option_7_Template(rf, ctx) {
17844
+ if (rf & 1) {
17845
+ i0.ɵɵelementStart(0, "mat-option", 3);
17846
+ i0.ɵɵtext(1);
17847
+ i0.ɵɵelementEnd();
17848
+ }
17849
+ if (rf & 2) {
17850
+ const unit_r27 = ctx.$implicit;
17851
+ const ctx_r26 = i0.ɵɵnextContext(3);
17852
+ i0.ɵɵproperty("value", unit_r27);
17853
+ i0.ɵɵadvance(1);
17854
+ i0.ɵɵtextInterpolate1(" ", ctx_r26.getAreaUnitEnum(unit_r27), " ");
17855
+ }
17856
+ }
17857
+ function DrawPopupComponent_div_12_div_9_Template(rf, ctx) {
17858
+ if (rf & 1) {
17859
+ const _r29 = i0.ɵɵgetCurrentView();
17860
+ i0.ɵɵelementStart(0, "div")(1, "mat-form-field", 14);
17861
+ i0.ɵɵelement(2, "input", 20, 16);
17862
+ i0.ɵɵpipe(4, "translate");
17863
+ i0.ɵɵelementEnd();
17864
+ i0.ɵɵelementStart(5, "mat-form-field", 17)(6, "mat-select", 18);
17865
+ i0.ɵɵlistener("selectionChange", function DrawPopupComponent_div_12_div_9_Template_mat_select_selectionChange_6_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r28 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r28.onChangeAreaUnit($event.value)); });
17866
+ i0.ɵɵtemplate(7, DrawPopupComponent_div_12_div_9_mat_option_7_Template, 2, 2, "mat-option", 19);
17867
+ i0.ɵɵelementEnd()()();
17868
+ }
17869
+ if (rf & 2) {
17870
+ const ctx_r6 = i0.ɵɵnextContext(2);
17871
+ i0.ɵɵadvance(2);
17872
+ i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 4, "igo.geo.draw.labelType.Area"));
17873
+ i0.ɵɵpropertyInterpolate("value", ctx_r6.currentArea);
17874
+ i0.ɵɵadvance(4);
17875
+ i0.ɵɵproperty("value", ctx_r6.areaMeasureUnit);
17876
+ i0.ɵɵadvance(1);
17877
+ i0.ɵɵproperty("ngForOf", ctx_r6.allAreaUnits);
17878
+ }
17879
+ }
17880
+ function DrawPopupComponent_div_12_Template(rf, ctx) {
17881
+ if (rf & 1) {
17882
+ const _r31 = i0.ɵɵgetCurrentView();
17883
+ i0.ɵɵelementStart(0, "div")(1, "div")(2, "p", 5);
17884
+ i0.ɵɵtext(3);
17885
+ i0.ɵɵpipe(4, "translate");
17886
+ i0.ɵɵelementEnd();
17887
+ i0.ɵɵtemplate(5, DrawPopupComponent_div_12_mat_radio_group_5_Template, 2, 1, "mat-radio-group", 6);
17888
+ i0.ɵɵtemplate(6, DrawPopupComponent_div_12_ng_container_6_Template, 2, 1, "ng-container", 6);
17889
+ i0.ɵɵtemplate(7, DrawPopupComponent_div_12_div_7_Template, 7, 3, "div", 4);
17890
+ i0.ɵɵtemplate(8, DrawPopupComponent_div_12_div_8_Template, 7, 4, "div", 4);
17891
+ i0.ɵɵtemplate(9, DrawPopupComponent_div_12_div_9_Template, 8, 6, "div", 4);
17892
+ i0.ɵɵelementEnd();
17893
+ i0.ɵɵelementStart(10, "div", 7)(11, "button", 8);
17894
+ i0.ɵɵlistener("click", function DrawPopupComponent_div_12_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r30.cancelDrawing()); });
17895
+ i0.ɵɵtext(12);
17896
+ i0.ɵɵpipe(13, "translate");
17897
+ i0.ɵɵelementEnd();
17898
+ i0.ɵɵelementStart(14, "button", 9);
17899
+ i0.ɵɵlistener("click", function DrawPopupComponent_div_12_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r31); const ctx_r32 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r32.confirm()); });
17900
+ i0.ɵɵtext(15);
17901
+ i0.ɵɵelementEnd()()();
17902
+ }
17903
+ if (rf & 2) {
17904
+ const ctx_r0 = i0.ɵɵnextContext();
17905
+ i0.ɵɵadvance(3);
17906
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 8, "igo.geo.draw.builtInInstructions"));
17907
+ i0.ɵɵadvance(2);
17908
+ i0.ɵɵproperty("ngIf", ctx_r0.olGeometryType !== "Polygon");
17909
+ i0.ɵɵadvance(1);
17910
+ i0.ɵɵproperty("ngIf", ctx_r0.olGeometryType === "Polygon");
17911
+ i0.ɵɵadvance(1);
17912
+ i0.ɵɵproperty("ngIf", ctx_r0.labelFlag === ctx_r0.labelType.Coordinates);
17913
+ i0.ɵɵadvance(1);
17914
+ i0.ɵɵproperty("ngIf", ctx_r0.labelFlag === ctx_r0.labelType.Length || ctx_r0.polygonCheck === 2);
17915
+ i0.ɵɵadvance(1);
17916
+ i0.ɵɵproperty("ngIf", ctx_r0.labelFlag === ctx_r0.labelType.Area || ctx_r0.polygonCheck === 2);
17917
+ i0.ɵɵadvance(3);
17918
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 10, "igo.geo.draw.cancel"), " ");
17919
+ i0.ɵɵadvance(3);
17920
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.noLabelButton(), " ");
17921
+ }
17922
+ }
17923
+ function DrawPopupComponent_div_13_Template(rf, ctx) {
17924
+ if (rf & 1) {
17925
+ const _r36 = i0.ɵɵgetCurrentView();
17926
+ i0.ɵɵelementStart(0, "div")(1, "div")(2, "p", 5);
17927
+ i0.ɵɵtext(3);
17928
+ i0.ɵɵpipe(4, "translate");
17929
+ i0.ɵɵelementEnd();
17930
+ i0.ɵɵelementStart(5, "mat-form-field", 21)(6, "input", 22, 16);
17931
+ i0.ɵɵlistener("select", function DrawPopupComponent_div_13_Template_input_select_6_listener() { return true; })("input", function DrawPopupComponent_div_13_Template_input_input_6_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r35 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r35.getLabelLength($event.target.value)); });
17932
+ i0.ɵɵpipe(8, "translate");
17933
+ i0.ɵɵelementEnd()()();
17934
+ i0.ɵɵelementStart(9, "div", 7)(10, "button", 8);
17935
+ i0.ɵɵlistener("click", function DrawPopupComponent_div_13_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r36); const ctx_r37 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r37.cancelDrawing()); });
17936
+ i0.ɵɵtext(11);
17937
+ i0.ɵɵpipe(12, "translate");
17938
+ i0.ɵɵelementEnd();
17939
+ i0.ɵɵelementStart(13, "button", 9);
17940
+ i0.ɵɵlistener("click", function DrawPopupComponent_div_13_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r36); const _r33 = i0.ɵɵreference(7); const ctx_r38 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r38.confirm(_r33.value)); });
17941
+ i0.ɵɵtext(14);
17942
+ i0.ɵɵelementEnd()()();
17943
+ }
17944
+ if (rf & 2) {
17945
+ const ctx_r1 = i0.ɵɵnextContext();
17946
+ i0.ɵɵadvance(3);
17947
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "igo.geo.draw.dialogInstruction"));
17948
+ i0.ɵɵadvance(3);
17949
+ i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(8, 7, "igo.geo.draw.dialogTitle"));
17950
+ i0.ɵɵpropertyInterpolate("value", ctx_r1.currentLabel);
17951
+ i0.ɵɵadvance(5);
17952
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 9, "igo.geo.draw.cancel"), " ");
17953
+ i0.ɵɵadvance(3);
17954
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.noLabelButton(), " ");
17955
+ }
17956
+ }
17635
17957
  class DrawPopupComponent {
17636
- constructor(dialogRef, data) {
17958
+ constructor(languageService, dialogRef, data) {
17959
+ var _a;
17960
+ this.languageService = languageService;
17637
17961
  this.dialogRef = dialogRef;
17638
17962
  this.data = data;
17639
17963
  this.confirmFlag = false;
17640
- }
17964
+ this.labelFlag = LabelType.Custom;
17965
+ this.geometryType = GeometryType;
17966
+ this.labelType = LabelType;
17967
+ this.arrayBuiltInType = [];
17968
+ this.olGeometryType = undefined;
17969
+ this.polygonCheck = 0; // Count for polygon label types checkboxes
17970
+ this.currentLabel = this.data.olGeometry.get('draw');
17971
+ this.labelLength = this.currentLabel ? this.currentLabel.length : 0;
17972
+ let olGeometry;
17973
+ const projection = this.data.map.ol.getView().getProjection();
17974
+ if (this.data.olGeometry instanceof OlFeature) {
17975
+ if (this.data.olGeometry.get('rad')) {
17976
+ const longitudeLatitude = [this.data.olGeometry.get('longitude'), this.data.olGeometry.get('latitude')];
17977
+ this.olGeometryType = GeometryType.Circle;
17978
+ olGeometry = new OlCircle(longitudeLatitude, this.data.olGeometry.get('rad'));
17979
+ }
17980
+ else {
17981
+ this.olGeometryType = this.data.olGeometry.getGeometry().getType();
17982
+ olGeometry = this.data.olGeometry.get('geometry');
17983
+ }
17984
+ }
17985
+ else {
17986
+ this.olGeometryType = this.data.olGeometry.getType();
17987
+ olGeometry = this.data.olGeometry;
17988
+ }
17989
+ if (this.olGeometryType === GeometryType.Point || this.olGeometryType === GeometryType.Circle) {
17990
+ if (this.data.olGeometry instanceof OlFeature) {
17991
+ let longitude = this.data.olGeometry.get('longitude');
17992
+ let latitude = this.data.olGeometry.get('latitude');
17993
+ this.longlatDD = roundCoordTo([longitude, latitude], 5);
17994
+ this.coordinatesInDD = '(' + latitude + ', '
17995
+ + longitude + ')';
17996
+ }
17997
+ else {
17998
+ let point4326 = transform(this.data.olGeometry.getFlatCoordinates(), projection, 'EPSG:4326');
17999
+ this.longlatDD = roundCoordTo([point4326[0], point4326[1]], 5);
18000
+ this.coordinatesInDD =
18001
+ '(' + this.longlatDD[1] + ', ' + this.longlatDD[0] + ')';
18002
+ }
18003
+ this.currentCoordinates = this.coordinatesInDD;
18004
+ }
18005
+ if (this.olGeometryType === GeometryType.LineString) {
18006
+ this.lengthInMeters = measureOlGeometryLength(olGeometry, projection.getCode()).toFixed(2);
18007
+ this.currentLength = this.lengthInMeters;
18008
+ }
18009
+ else if (this.olGeometryType === GeometryType.Polygon) {
18010
+ this.lengthInMeters = measureOlGeometryLength(olGeometry, projection.getCode()).toFixed(2);
18011
+ this.currentLength = this.lengthInMeters;
18012
+ this.areaInMetersSquare = measureOlGeometryArea(olGeometry, projection.getCode()).toFixed(2);
18013
+ this.currentArea = this.areaInMetersSquare;
18014
+ }
18015
+ else if (this.olGeometryType === GeometryType.Circle) {
18016
+ let circularPolygon = fromCircle(olGeometry, 10000);
18017
+ const radius = this.getRadius(circularPolygon);
18018
+ this.lengthInMeters = radius.toFixed(2);
18019
+ this.currentLength = this.lengthInMeters;
18020
+ this.areaInMetersSquare = measureOlGeometryArea(circularPolygon, projection.getCode()).toFixed(2);
18021
+ this.currentArea = this.areaInMetersSquare;
18022
+ }
18023
+ if (data.olGeometry.get('labelType') === LabelType.Coordinates) {
18024
+ this.onLabelTypeChange(LabelType.Predefined);
18025
+ this.onLabelTypeChange(LabelType.Coordinates, true);
18026
+ this.coordinatesMeasureUnit = data.olGeometry.get('measureUnit');
18027
+ }
18028
+ else if (data.olGeometry.get('labelType') === LabelType.Length) {
18029
+ this.onLabelTypeChange(LabelType.Predefined);
18030
+ this.onLabelTypeChange(LabelType.Length, true);
18031
+ this.lengthMeasureUnit = data.olGeometry.get('measureUnit');
18032
+ }
18033
+ else if (data.olGeometry.get('labelType') === LabelType.Area) {
18034
+ this.onLabelTypeChange(LabelType.Predefined);
18035
+ this.onLabelTypeChange(LabelType.Area, true);
18036
+ this.areaMeasureUnit = data.olGeometry.get('measureUnit');
18037
+ }
18038
+ else if (((_a = data.olGeometry.get('labelType')) === null || _a === void 0 ? void 0 : _a.length) === 2) {
18039
+ this.onLabelTypeChange(LabelType.Predefined);
18040
+ this.onLabelTypeChange(LabelType.Length, true);
18041
+ this.onLabelTypeChange(LabelType.Area, true);
18042
+ this.lengthMeasureUnit = data.olGeometry.get('measureUnit')[0];
18043
+ this.areaMeasureUnit = data.olGeometry.get('measureUnit')[1];
18044
+ }
18045
+ this.buildArrayType();
18046
+ }
18047
+ /**
18048
+ * HTML Interactions
18049
+ */
17641
18050
  cancelDrawing() {
17642
18051
  this.dialogRef.close();
17643
18052
  }
17644
- confirm(labelString) {
18053
+ confirm(input) {
17645
18054
  this.confirmFlag = true;
17646
- this.dialogRef.close(labelString);
18055
+ if (this.labelFlag === LabelType.Predefined) {
18056
+ this.dialogRef.close();
18057
+ }
18058
+ else if (this.labelFlag === LabelType.Custom) {
18059
+ this.dialogRef.close({
18060
+ label: input
18061
+ });
18062
+ }
18063
+ else if (this.labelFlag === LabelType.Coordinates) {
18064
+ this.dialogRef.close({
18065
+ label: this.currentCoordinates,
18066
+ measureUnit: this.coordinatesMeasureUnit
18067
+ });
18068
+ }
18069
+ else if (this.olGeometryType === GeometryType.Polygon) {
18070
+ if (this.polygonCheck === 2) {
18071
+ this.labelFlag = [LabelType.Length, LabelType.Area];
18072
+ this.dialogRef.close({
18073
+ label: 'P: ' + this.currentLength + ' ' + MeasureLengthUnitAbbreviation[MeasureLengthUnit.Meters] + '\n'
18074
+ + this.languageService.translate.instant('igo.geo.draw.labelType.A') + this.currentArea + ' ' +
18075
+ MeasureAreaUnitAbbreviation[MeasureAreaUnit.SquareMeters], measureUnit: [this.lengthMeasureUnit, this.areaMeasureUnit]
18076
+ });
18077
+ }
18078
+ else {
18079
+ this.labelFlag === LabelType.Length ?
18080
+ this.dialogRef.close({
18081
+ label: 'P: ' + this.currentLength + ' ' + MeasureLengthUnitAbbreviation[this.lengthMeasureUnit],
18082
+ measureUnit: this.lengthMeasureUnit
18083
+ }) :
18084
+ this.dialogRef.close({
18085
+ label: this.currentArea + ' ' + MeasureAreaUnitAbbreviation[this.areaMeasureUnit],
18086
+ measureUnit: this.areaMeasureUnit
18087
+ });
18088
+ }
18089
+ }
18090
+ else if (this.labelFlag === LabelType.Length) {
18091
+ if (this.olGeometryType === GeometryType.Circle) {
18092
+ this.dialogRef.close({
18093
+ label: 'R: ' + this.currentLength + ' ' + MeasureLengthUnitAbbreviation[this.lengthMeasureUnit],
18094
+ measureUnit: this.lengthMeasureUnit
18095
+ });
18096
+ }
18097
+ else if (this.olGeometryType === GeometryType.LineString) {
18098
+ this.dialogRef.close({
18099
+ label: this.currentLength + ' ' + MeasureLengthUnitAbbreviation[this.lengthMeasureUnit],
18100
+ measureUnit: this.lengthMeasureUnit
18101
+ });
18102
+ }
18103
+ }
18104
+ else if (this.labelFlag === LabelType.Area) {
18105
+ this.dialogRef.close({
18106
+ label: this.currentArea + ' ' + MeasureAreaUnitAbbreviation[this.areaMeasureUnit],
18107
+ measureUnit: this.areaMeasureUnit
18108
+ });
18109
+ }
18110
+ }
18111
+ onLabelTypeChange(labelType, checked) {
18112
+ var _a;
18113
+ if (labelType !== LabelType.Predefined &&
18114
+ labelType !== LabelType.Custom &&
18115
+ this.olGeometryType === GeometryType.Polygon) {
18116
+ this.arrayBuiltInType.find(type => type.value === labelType) ?
18117
+ this.arrayBuiltInType.find(type => type.value === labelType).checked = checked : this.labelFlag = undefined;
18118
+ checked ? this.labelFlag = labelType : this.labelFlag = (_a = this.arrayBuiltInType.find(type => type.checked)) === null || _a === void 0 ? void 0 : _a.value;
18119
+ }
18120
+ else {
18121
+ this.labelFlag = labelType;
18122
+ }
18123
+ if (labelType === LabelType.Predefined) {
18124
+ if (this.olGeometryType === GeometryType.Point) {
18125
+ this.labelFlag = LabelType.Coordinates;
18126
+ this.currentCoordinates = this.coordinatesInDD;
18127
+ this.coordinatesMeasureUnit = CoordinatesUnit.DecimalDegree;
18128
+ }
18129
+ else if (this.olGeometryType === GeometryType.LineString) {
18130
+ this.labelFlag = LabelType.Length;
18131
+ this.currentLength = this.lengthInMeters;
18132
+ this.lengthMeasureUnit = MeasureLengthUnit.Meters;
18133
+ }
18134
+ }
18135
+ else if (labelType === LabelType.Area) {
18136
+ this.currentArea = this.areaInMetersSquare;
18137
+ this.areaMeasureUnit = MeasureAreaUnit.SquareMeters;
18138
+ }
18139
+ else if (labelType === LabelType.Length) {
18140
+ this.currentLength = this.lengthInMeters;
18141
+ this.lengthMeasureUnit = MeasureLengthUnit.Meters;
18142
+ }
18143
+ else if (this.labelFlag === LabelType.Coordinates) {
18144
+ this.currentCoordinates = this.coordinatesInDD;
18145
+ this.coordinatesMeasureUnit = CoordinatesUnit.DecimalDegree;
18146
+ }
18147
+ const labeltypes = [this.labelType.Length, this.labelType.Area];
18148
+ if (this.olGeometryType === GeometryType.Polygon &&
18149
+ labeltypes.includes(labelType)) {
18150
+ checked ? this.polygonCheck += 1 : this.polygonCheck -= 1;
18151
+ ;
18152
+ }
18153
+ else {
18154
+ this.polygonCheck = 0;
18155
+ }
18156
+ }
18157
+ onChangeLengthUnit(lengthUnit) {
18158
+ this.lengthMeasureUnit = lengthUnit;
18159
+ this.currentLength = metersToUnit(Number(this.lengthInMeters), lengthUnit).toFixed(2);
18160
+ }
18161
+ onChangeAreaUnit(areaUnit) {
18162
+ this.areaMeasureUnit = areaUnit;
18163
+ this.currentArea = squareMetersToUnit(Number(this.areaInMetersSquare), areaUnit).toFixed(2);
18164
+ }
18165
+ onChangeCoordinateUnit(coordinatesUnit) {
18166
+ this.coordinatesMeasureUnit = coordinatesUnit;
18167
+ let coordinates = DDtoDMS(this.longlatDD, coordinatesUnit);
18168
+ this.currentCoordinates = '(' + coordinates[1] + ', ' + coordinates[0] + ')';
18169
+ }
18170
+ buildArrayType() {
18171
+ for (const labelType of Object.values(LabelType)) {
18172
+ if (labelType !== LabelType.Custom && labelType !== LabelType.Predefined) {
18173
+ this.arrayBuiltInType.push({
18174
+ value: labelType,
18175
+ checked: this.selectOptions(labelType) ||
18176
+ this.labelFlag === labelType ||
18177
+ (this.polygonCheck === 2 && labelType !== LabelType.Coordinates)
18178
+ });
18179
+ }
18180
+ }
18181
+ }
18182
+ noLabelButton() {
18183
+ if (this.labelFlag === LabelType.Predefined || (this.labelFlag === LabelType.Custom && this.labelLength === 0)) {
18184
+ return this.languageService.translate.instant('igo.geo.draw.noLabel');
18185
+ }
18186
+ return 'OK';
18187
+ }
18188
+ get customOrPredefined() {
18189
+ if (this.labelFlag === LabelType.Custom) {
18190
+ return LabelType.Custom;
18191
+ }
18192
+ return LabelType.Predefined;
18193
+ }
18194
+ optionAvailable(currentOption) {
18195
+ switch (this.olGeometryType) {
18196
+ case GeometryType.Point:
18197
+ if (currentOption === LabelType.Coordinates) {
18198
+ return false;
18199
+ }
18200
+ return true;
18201
+ case GeometryType.LineString:
18202
+ if (currentOption === LabelType.Length) {
18203
+ return false;
18204
+ }
18205
+ return true;
18206
+ case GeometryType.Polygon:
18207
+ if (currentOption === LabelType.Coordinates) {
18208
+ return true;
18209
+ }
18210
+ return false;
18211
+ default:
18212
+ return false;
18213
+ }
18214
+ }
18215
+ get allLengthUnits() {
18216
+ return Object.values(MeasureLengthUnit);
18217
+ }
18218
+ getLengthUnitEnum(lengthUnit) {
18219
+ return MeasureLengthUnitAbbreviation[lengthUnit];
18220
+ }
18221
+ get allAreaUnits() {
18222
+ return Object.values(MeasureAreaUnit);
18223
+ }
18224
+ get allCoordinatesUnits() {
18225
+ return Object.values(CoordinatesUnit);
18226
+ }
18227
+ getAreaUnitEnum(areaUnit) {
18228
+ return MeasureAreaUnitAbbreviation[areaUnit];
18229
+ }
18230
+ getRadius(olGeometry) {
18231
+ const length = getLength(olGeometry);
18232
+ return Number(length / (2 * Math.PI));
18233
+ }
18234
+ get lengthLabelT() {
18235
+ if (this.olGeometryType === GeometryType.Polygon) {
18236
+ return this.languageService.translate.instant('igo.geo.measure.perimeter');
18237
+ }
18238
+ if (this.olGeometryType === GeometryType.Circle) {
18239
+ return this.languageService.translate.instant('igo.geo.search.coordinates.radius');
18240
+ }
18241
+ return this.languageService.translate.instant('igo.geo.draw.labelType.Length');
18242
+ }
18243
+ getLabelLength(event) {
18244
+ this.labelLength = event.length;
18245
+ }
18246
+ selectOptions(option) {
18247
+ if (this.olGeometryType === GeometryType.Point) {
18248
+ return option === LabelType.Coordinates;
18249
+ }
18250
+ else if (this.olGeometryType === GeometryType.LineString) {
18251
+ return option === LabelType.Length;
18252
+ }
18253
+ }
18254
+ getProperLengthLabel(option) {
18255
+ if (option === LabelType.Length) {
18256
+ if (this.olGeometryType === GeometryType.Polygon) {
18257
+ return this.languageService.translate.instant('igo.geo.measure.perimeter');
18258
+ }
18259
+ if (this.olGeometryType === GeometryType.Circle) {
18260
+ return this.languageService.translate.instant('igo.geo.search.coordinates.radius');
18261
+ }
18262
+ return this.languageService.translate.instant('igo.geo.draw.labelType.Length');
18263
+ }
18264
+ return this.languageService.translate.instant('igo.geo.draw.labelType.' + option);
17647
18265
  }
17648
18266
  }
17649
- DrawPopupComponent.ɵfac = function DrawPopupComponent_Factory(t) { return new (t || DrawPopupComponent)(i0.ɵɵdirectiveInject(i1.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
17650
- DrawPopupComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawPopupComponent, selectors: [["igo-draw-popup-component"]], inputs: { confirmFlag: "confirmFlag" }, decls: 14, vars: 10, consts: [["mat-dialog-content", ""], [1, "mat-typography"], [1, "example-full-width"], ["matInput", "", 3, "placeholder", "value"], ["input", ""], ["mat-dialog-actions", ""], ["mat-raised-button", "", 3, "click"], ["mat-raised-button", "", "color", "primary", 3, "click"]], template: function DrawPopupComponent_Template(rf, ctx) {
18267
+ DrawPopupComponent.ɵfac = function DrawPopupComponent_Factory(t) { return new (t || DrawPopupComponent)(i0.ɵɵdirectiveInject(i2$1.LanguageService), i0.ɵɵdirectiveInject(i1.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
18268
+ DrawPopupComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawPopupComponent, selectors: [["igo-draw-popup-component"]], inputs: { confirmFlag: "confirmFlag", labelFlag: "labelFlag", coordinatesMeasureUnit: "coordinatesMeasureUnit", lengthMeasureUnit: "lengthMeasureUnit", areaMeasureUnit: "areaMeasureUnit" }, decls: 14, vars: 14, consts: [["mat-dialog-title", ""], [1, "geometry-type-toggle", "mat-typography"], [3, "value", "change"], [3, "value"], [4, "ngIf"], [1, "mat-typography"], ["class", "mat-typography", 4, "ngIf"], ["mat-dialog-actions", ""], ["mat-raised-button", "", 3, "click"], ["mat-raised-button", "", "color", "primary", 3, "click"], [3, "value", "disabled", "checked", "change", 4, "ngFor", "ngForOf"], [3, "value", "disabled", "checked", "change"], ["class", "mat-typography", 3, "value", "disabled", "checked", "change", 4, "ngFor", "ngForOf"], [1, "mat-typography", 3, "value", "disabled", "checked", "change"], [1, "readOnly-Input"], ["matInput", "", "placeholder", "(Latitude, Longitude)", "readonly", "", 3, "value"], ["input", ""], [1, "unit-field"], [3, "value", "selectionChange"], [3, "value", 4, "ngFor", "ngForOf"], ["matInput", "", "readonly", "", 3, "placeholder", "value"], [1, "input"], ["matInput", "", "cdkFocusInitial", "", 3, "placeholder", "value", "select", "input"]], template: function DrawPopupComponent_Template(rf, ctx) {
17651
18269
  if (rf & 1) {
17652
- const _r1 = i0.ɵɵgetCurrentView();
17653
- i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
18270
+ i0.ɵɵelementStart(0, "div")(1, "h2", 0);
17654
18271
  i0.ɵɵtext(2);
17655
18272
  i0.ɵɵpipe(3, "translate");
17656
- i0.ɵɵelementEnd();
17657
- i0.ɵɵelementStart(4, "mat-form-field", 2);
17658
- i0.ɵɵelement(5, "input", 3, 4);
17659
- i0.ɵɵpipe(7, "translate");
17660
18273
  i0.ɵɵelementEnd()();
17661
- i0.ɵɵelementStart(8, "div", 5)(9, "button", 6);
17662
- i0.ɵɵlistener("click", function DrawPopupComponent_Template_button_click_9_listener() { return ctx.cancelDrawing(); });
18274
+ i0.ɵɵelementStart(4, "div", 1)(5, "mat-button-toggle-group", 2);
18275
+ i0.ɵɵlistener("change", function DrawPopupComponent_Template_mat_button_toggle_group_change_5_listener($event) { return ctx.onLabelTypeChange($event.value); });
18276
+ i0.ɵɵelementStart(6, "mat-button-toggle", 3);
18277
+ i0.ɵɵtext(7);
18278
+ i0.ɵɵpipe(8, "translate");
18279
+ i0.ɵɵelementEnd();
18280
+ i0.ɵɵelementStart(9, "mat-button-toggle", 3);
17663
18281
  i0.ɵɵtext(10);
17664
18282
  i0.ɵɵpipe(11, "translate");
17665
- i0.ɵɵelementEnd();
17666
- i0.ɵɵelementStart(12, "button", 7);
17667
- i0.ɵɵlistener("click", function DrawPopupComponent_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r1); const _r0 = i0.ɵɵreference(6); return i0.ɵɵresetView(ctx.confirm(_r0.value)); });
17668
- i0.ɵɵtext(13, "OK ");
17669
- i0.ɵɵelementEnd()();
18283
+ i0.ɵɵelementEnd()()();
18284
+ i0.ɵɵtemplate(12, DrawPopupComponent_div_12_Template, 16, 12, "div", 4);
18285
+ i0.ɵɵtemplate(13, DrawPopupComponent_div_13_Template, 15, 11, "div", 4);
17670
18286
  }
17671
18287
  if (rf & 2) {
17672
18288
  i0.ɵɵadvance(2);
17673
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 4, "igo.geo.draw.dialogInstruction"));
18289
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 8, "igo.geo.draw.popupTitle"), " ");
17674
18290
  i0.ɵɵadvance(3);
17675
- i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(7, 6, "igo.geo.draw.dialogTitle"));
17676
- i0.ɵɵpropertyInterpolate("value", ctx.data.currentLabel);
17677
- i0.ɵɵadvance(5);
17678
- i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(11, 8, "igo.geo.draw.cancel"), " ");
18291
+ i0.ɵɵproperty("value", ctx.customOrPredefined);
18292
+ i0.ɵɵadvance(1);
18293
+ i0.ɵɵproperty("value", ctx.labelType.Custom);
18294
+ i0.ɵɵadvance(1);
18295
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 10, "igo.geo.draw.labelType.custom"), " ");
18296
+ i0.ɵɵadvance(2);
18297
+ i0.ɵɵproperty("value", ctx.labelType.Predefined);
18298
+ i0.ɵɵadvance(1);
18299
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 12, "igo.geo.draw.labelType.predefined"), " ");
18300
+ i0.ɵɵadvance(2);
18301
+ i0.ɵɵproperty("ngIf", ctx.labelFlag !== ctx.labelType.Custom);
18302
+ i0.ɵɵadvance(1);
18303
+ i0.ɵɵproperty("ngIf", ctx.labelFlag === ctx.labelType.Custom);
17679
18304
  }
17680
- }, dependencies: [i3.MatButton, i13.MatFormField, i14.MatInput, i1.MatDialogContent, i1.MatDialogActions, i7.TranslatePipe] });
18305
+ }, dependencies: [i1$1.NgForOf, i1$1.NgIf, i3.MatButton, i18.MatButtonToggleGroup, i18.MatButtonToggle, i13.MatFormField, i14.MatInput, i15.MatSelect, i9.MatOption, i1.MatDialogTitle, i1.MatDialogActions, i17.MatRadioGroup, i17.MatRadioButton, i12.MatCheckbox, i7.TranslatePipe], styles: [".mat-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.readOnly-Input[_ngcontent-%COMP%]{width:200px!important}.unit-field[_ngcontent-%COMP%]{width:50px;margin-left:10px;margin-top:10px}.mat-form-field[_ngcontent-%COMP%]{position:-webkit-sticky!important;position:sticky!important}.coordinatesInputView[_ngcontent-%COMP%]{top:5em!important} .mat-form-field-wrapper{margin-bottom:-1.25em;margin-top:.25em}.geometry-type-toggle[_ngcontent-%COMP%], .mat-dialog-actions[_ngcontent-%COMP%]{display:flex!important;justify-content:center}.input[_ngcontent-%COMP%]{width:auto!important}.mat-button-toggle-group[_ngcontent-%COMP%], .mat-button-toggle[_ngcontent-%COMP%]{width:100%}mat-checkbox[_ngcontent-%COMP%]{margin-right:10px}"] });
17681
18306
  (function () {
17682
18307
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrawPopupComponent, [{
17683
18308
  type: Component,
17684
- args: [{ selector: 'igo-draw-popup-component', template: "<div mat-dialog-content>\n <p class=\"mat-typography\">{{ 'igo.geo.draw.dialogInstruction' | translate }}</p>\n <mat-form-field class=\"example-full-width\">\n <input\n #input\n matInput\n placeholder=\"{{'igo.geo.draw.dialogTitle' | translate}}\"\n value=\"{{data.currentLabel}}\"/>\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button \n mat-raised-button \n (click)=\"cancelDrawing()\">{{'igo.geo.draw.cancel' | translate}}\n </button>\n <button \n mat-raised-button \n color=\"primary\" \n (click)=\"confirm(input.value)\">OK\n </button>\n</div>\n" }]
18309
+ args: [{ selector: 'igo-draw-popup-component', template: "<div>\n <h2 mat-dialog-title>\n {{ 'igo.geo.draw.popupTitle' | translate }}\n </h2>\n</div>\n\n\n<div class=\"geometry-type-toggle mat-typography\">\n <mat-button-toggle-group\n (change)=\"onLabelTypeChange($event.value)\" [value]=\"customOrPredefined\">\n <mat-button-toggle [value]=\"labelType.Custom\" >\n {{ 'igo.geo.draw.labelType.custom' | translate }}\n </mat-button-toggle>\n <mat-button-toggle [value]=\"labelType.Predefined\">\n {{ 'igo.geo.draw.labelType.predefined' | translate }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n</div>\n\n<div *ngIf=\"labelFlag !== labelType.Custom\">\n <div>\n <p class=\"mat-typography\">{{ 'igo.geo.draw.builtInInstructions' | translate }}</p>\n <mat-radio-group *ngIf=\"olGeometryType !== 'Polygon'\" class=\"mat-typography\">\n <mat-radio-button *ngFor=\"let option of arrayBuiltInType\" [value]=\"option.value\" [disabled]=\"optionAvailable(option.value)\" \n (change)=\"onLabelTypeChange($event.value)\" [checked]=\"option.checked\">\n {{getProperLengthLabel(option.value)}}\n </mat-radio-button>\n </mat-radio-group>\n <ng-container class=\"mat-typography\" *ngIf=\"olGeometryType === 'Polygon'\">\n <mat-checkbox\n *ngFor=\"let option of arrayBuiltInType\"\n class=\"mat-typography\"\n [value]=\"option.value\"\n [disabled]=\"optionAvailable(option.value)\"\n (change)=\"onLabelTypeChange($event.source.value, $event.checked)\"\n [checked]=\"option.checked\">\n {{getProperLengthLabel(option.value)}}\n </mat-checkbox>\n </ng-container>\n <div *ngIf=\"labelFlag === labelType.Coordinates\">\n <mat-form-field class=\"readOnly-Input\">\n <input\n #input\n matInput\n placeholder=\"(Latitude, Longitude)\"\n value=\"{{currentCoordinates}}\" readonly>\n </mat-form-field>\n <mat-form-field class=\"unit-field\">\n <mat-select [value]=\"coordinatesMeasureUnit\" (selectionChange)=\"onChangeCoordinateUnit($event.value)\">\n <mat-option *ngFor=\"let unit of allCoordinatesUnits\" [value]=\"unit\">\n {{unit}}\n </mat-option>\n </mat-select> \n </mat-form-field>\n </div>\n <div *ngIf=\"labelFlag === labelType.Length || polygonCheck === 2\">\n <mat-form-field class=\"readOnly-Input\">\n <input\n #input\n matInput\n placeholder={{lengthLabelT}}\n value=\"{{currentLength}}\" readonly>\n </mat-form-field>\n <mat-form-field class=\"unit-field\">\n <mat-select [value]=\"lengthMeasureUnit\" (selectionChange)=\"onChangeLengthUnit($event.value)\">\n <mat-option *ngFor=\"let unit of allLengthUnits\" [value]=\"unit\">\n {{getLengthUnitEnum(unit)}}\n </mat-option>\n </mat-select> \n </mat-form-field>\n </div>\n <div *ngIf=\"labelFlag === labelType.Area || polygonCheck === 2\">\n <mat-form-field class=\"readOnly-Input\">\n <input\n #input\n matInput\n placeholder=\"{{ 'igo.geo.draw.labelType.Area' | translate }}\"\n value=\"{{currentArea}}\" readonly>\n </mat-form-field>\n <mat-form-field class=\"unit-field\">\n <mat-select [value]=\"areaMeasureUnit\" (selectionChange)=\"onChangeAreaUnit($event.value)\">\n <mat-option *ngFor=\"let unit of allAreaUnits\" [value]=\"unit\">\n {{getAreaUnitEnum(unit)}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n\n <div mat-dialog-actions>\n <button mat-raised-button (click)=\"cancelDrawing()\" >\n {{'igo.geo.draw.cancel' | translate}}\n </button>\n <button \n mat-raised-button \n color=\"primary\" \n (click)=\"confirm()\"> \n {{noLabelButton()}} \n </button>\n </div>\n</div>\n\n<div *ngIf=\"labelFlag === labelType.Custom\">\n <div>\n <p class=\"mat-typography\">{{ 'igo.geo.draw.dialogInstruction' | translate }}</p>\n <mat-form-field class=\"input\">\n <input\n #input\n matInput\n (select)=\"true\"\n (input)=\"getLabelLength($event.target.value)\"\n placeholder=\"{{'igo.geo.draw.dialogTitle' | translate}}\"\n value=\"{{ currentLabel }}\"\n cdkFocusInitial/>\n </mat-form-field>\n </div>\n \n <div mat-dialog-actions>\n <button mat-raised-button (click)=\"cancelDrawing()\" >\n {{'igo.geo.draw.cancel' | translate}}\n </button>\n <button \n mat-raised-button \n color=\"primary\" \n (click)=\"confirm(input.value)\">\n {{noLabelButton()}}\n </button>\n </div>\n</div>\n", styles: [".mat-radio-button~.mat-radio-button{margin-left:16px}.readOnly-Input{width:200px!important}.unit-field{width:50px;margin-left:10px;margin-top:10px}.mat-form-field{position:-webkit-sticky!important;position:sticky!important}.coordinatesInputView{top:5em!important}::ng-deep .mat-form-field-wrapper{margin-bottom:-1.25em;margin-top:.25em}.geometry-type-toggle,.mat-dialog-actions{display:flex!important;justify-content:center}.input{width:auto!important}.mat-button-toggle-group,.mat-button-toggle{width:100%}mat-checkbox{margin-right:10px}\n"] }]
17685
18310
  }], function () {
17686
- return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
18311
+ return [{ type: i2$1.LanguageService }, { type: i1.MatDialogRef }, { type: undefined, decorators: [{
17687
18312
  type: Inject,
17688
18313
  args: [MAT_DIALOG_DATA]
17689
18314
  }] }];
17690
18315
  }, { confirmFlag: [{
17691
18316
  type: Input
18317
+ }], labelFlag: [{
18318
+ type: Input
18319
+ }], coordinatesMeasureUnit: [{
18320
+ type: Input
18321
+ }], lengthMeasureUnit: [{
18322
+ type: Input
18323
+ }], areaMeasureUnit: [{
18324
+ type: Input
17692
18325
  }] });
17693
18326
  })();
17694
18327
 
@@ -17793,127 +18426,180 @@ DrawLayerPopupComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dra
17793
18426
  })();
17794
18427
 
17795
18428
  const _c0$c = ["selectedLayer"];
17796
- function DrawComponent_mat_option_30_Template(rf, ctx) {
18429
+ function DrawComponent_mat_slide_toggle_22_Template(rf, ctx) {
18430
+ if (rf & 1) {
18431
+ const _r10 = i0.ɵɵgetCurrentView();
18432
+ i0.ɵɵelementStart(0, "mat-slide-toggle", 5);
18433
+ i0.ɵɵlistener("change", function DrawComponent_mat_slide_toggle_22_Template_mat_slide_toggle_change_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.onToggleFreehandMode($event)); });
18434
+ i0.ɵɵtext(1);
18435
+ i0.ɵɵpipe(2, "translate");
18436
+ i0.ɵɵelementEnd();
18437
+ }
18438
+ if (rf & 2) {
18439
+ const ctx_r0 = i0.ɵɵnextContext();
18440
+ i0.ɵɵproperty("checked", ctx_r0.freehandMode)("labelPosition", "before");
18441
+ i0.ɵɵadvance(1);
18442
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 3, "igo.geo.draw.freehandMode"), " ");
18443
+ }
18444
+ }
18445
+ function DrawComponent_div_23_mat_option_7_Template(rf, ctx) {
17797
18446
  if (rf & 1) {
17798
18447
  i0.ɵɵelementStart(0, "mat-option", 2);
17799
18448
  i0.ɵɵtext(1);
18449
+ i0.ɵɵpipe(2, "translate");
17800
18450
  i0.ɵɵelementEnd();
17801
18451
  }
17802
18452
  if (rf & 2) {
17803
- const layer_r7 = ctx.$implicit;
17804
- i0.ɵɵproperty("value", layer_r7);
18453
+ const measureUnit_r12 = ctx.$implicit;
18454
+ i0.ɵɵproperty("value", measureUnit_r12);
17805
18455
  i0.ɵɵadvance(1);
17806
- i0.ɵɵtextInterpolate1(" ", layer_r7.title, " ");
18456
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "igo.geo.measure." + measureUnit_r12), " ");
17807
18457
  }
17808
18458
  }
17809
- function DrawComponent_button_34_Template(rf, ctx) {
18459
+ function DrawComponent_div_23_Template(rf, ctx) {
17810
18460
  if (rf & 1) {
17811
- const _r9 = i0.ɵɵgetCurrentView();
17812
- i0.ɵɵelementStart(0, "button", 20);
17813
- i0.ɵɵlistener("click", function DrawComponent_button_34_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.activeDrawingLayer.visible = !ctx_r8.activeDrawingLayer.visible); });
18461
+ const _r14 = i0.ɵɵgetCurrentView();
18462
+ i0.ɵɵelementStart(0, "div", 22)(1, "form", 23)(2, "mat-form-field", 24);
18463
+ i0.ɵɵelement(3, "input", 25);
18464
+ i0.ɵɵpipe(4, "translate");
18465
+ i0.ɵɵelementEnd()();
18466
+ i0.ɵɵelementStart(5, "mat-form-field", 26)(6, "mat-select", 9);
18467
+ i0.ɵɵlistener("selectionChange", function DrawComponent_div_23_Template_mat_select_selectionChange_6_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.onMeasureUnitChange($event.value)); });
18468
+ i0.ɵɵtemplate(7, DrawComponent_div_23_mat_option_7_Template, 3, 4, "mat-option", 11);
18469
+ i0.ɵɵelementEnd()()();
18470
+ }
18471
+ if (rf & 2) {
18472
+ const ctx_r1 = i0.ɵɵnextContext();
18473
+ i0.ɵɵadvance(3);
18474
+ i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 5, "igo.geo.spatialFilter.radius"));
18475
+ i0.ɵɵproperty("formControl", ctx_r1.radiusFormControl)("readonly", ctx_r1.freehandMode);
18476
+ i0.ɵɵadvance(3);
18477
+ i0.ɵɵproperty("value", ctx_r1.measureUnit);
18478
+ i0.ɵɵadvance(1);
18479
+ i0.ɵɵproperty("ngForOf", ctx_r1.measureUnits);
18480
+ }
18481
+ }
18482
+ function DrawComponent_mat_option_32_Template(rf, ctx) {
18483
+ if (rf & 1) {
18484
+ i0.ɵɵelementStart(0, "mat-option", 2);
18485
+ i0.ɵɵtext(1);
18486
+ i0.ɵɵelementEnd();
18487
+ }
18488
+ if (rf & 2) {
18489
+ const layer_r15 = ctx.$implicit;
18490
+ i0.ɵɵproperty("value", layer_r15);
18491
+ i0.ɵɵadvance(1);
18492
+ i0.ɵɵtextInterpolate1(" ", layer_r15.title, " ");
18493
+ }
18494
+ }
18495
+ function DrawComponent_button_36_Template(rf, ctx) {
18496
+ if (rf & 1) {
18497
+ const _r17 = i0.ɵɵgetCurrentView();
18498
+ i0.ɵɵelementStart(0, "button", 27);
18499
+ i0.ɵɵlistener("click", function DrawComponent_button_36_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r16.activeDrawingLayer.visible = !ctx_r16.activeDrawingLayer.visible); });
17814
18500
  i0.ɵɵpipe(1, "translate");
17815
18501
  i0.ɵɵpipe(2, "translate");
17816
- i0.ɵɵelement(3, "mat-icon", 21);
18502
+ i0.ɵɵelement(3, "mat-icon", 28);
17817
18503
  i0.ɵɵelementEnd();
17818
18504
  }
17819
18505
  if (rf & 2) {
17820
- const ctx_r2 = i0.ɵɵnextContext();
17821
- i0.ɵɵproperty("color", ctx_r2.activeDrawingLayer.visible ? "primary" : "default")("matTooltip", ctx_r2.activeDrawingLayer.visible ? i0.ɵɵpipeBind1(1, 3, "igo.geo.layer.hideLayer") : i0.ɵɵpipeBind1(2, 5, "igo.geo.layer.showLayer"));
18506
+ const ctx_r4 = i0.ɵɵnextContext();
18507
+ i0.ɵɵproperty("color", ctx_r4.activeDrawingLayer.visible ? "primary" : "default")("matTooltip", ctx_r4.activeDrawingLayer.visible ? i0.ɵɵpipeBind1(1, 3, "igo.geo.layer.hideLayer") : i0.ɵɵpipeBind1(2, 5, "igo.geo.layer.showLayer"));
17822
18508
  i0.ɵɵadvance(3);
17823
- i0.ɵɵproperty("svgIcon", ctx_r2.activeDrawingLayer.visible ? "eye" : "eye-off");
18509
+ i0.ɵɵproperty("svgIcon", ctx_r4.activeDrawingLayer.visible ? "eye" : "eye-off");
17824
18510
  }
17825
18511
  }
17826
- function DrawComponent_button_37_Template(rf, ctx) {
18512
+ function DrawComponent_button_39_Template(rf, ctx) {
17827
18513
  if (rf & 1) {
17828
- const _r11 = i0.ɵɵgetCurrentView();
17829
- i0.ɵɵelementStart(0, "button", 22);
17830
- i0.ɵɵlistener("click", function DrawComponent_button_37_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r10.deleteDrawings()); });
18514
+ const _r19 = i0.ɵɵgetCurrentView();
18515
+ i0.ɵɵelementStart(0, "button", 29);
18516
+ i0.ɵɵlistener("click", function DrawComponent_button_39_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.deleteDrawings()); });
17831
18517
  i0.ɵɵpipe(1, "translate");
17832
18518
  i0.ɵɵpipe(2, "async");
17833
- i0.ɵɵelement(3, "mat-icon", 23);
18519
+ i0.ɵɵelement(3, "mat-icon", 30);
17834
18520
  i0.ɵɵelementEnd();
17835
18521
  }
17836
18522
  if (rf & 2) {
17837
- const ctx_r3 = i0.ɵɵnextContext();
17838
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.geo.draw.delete"))("disabled", i0.ɵɵpipeBind1(2, 4, ctx_r3.selectedFeatures$).length === 0);
18523
+ const ctx_r5 = i0.ɵɵnextContext();
18524
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.geo.draw.delete"))("disabled", i0.ɵɵpipeBind1(2, 4, ctx_r5.selectedFeatures$).length === 0);
17839
18525
  }
17840
18526
  }
17841
- function DrawComponent_mat_form_field_42_div_6_Template(rf, ctx) {
18527
+ function DrawComponent_mat_form_field_44_div_6_Template(rf, ctx) {
17842
18528
  if (rf & 1) {
17843
- i0.ɵɵelementStart(0, "div", 27);
17844
- i0.ɵɵelement(1, "img", 28);
18529
+ i0.ɵɵelementStart(0, "div", 34);
18530
+ i0.ɵɵelement(1, "img", 35);
17845
18531
  i0.ɵɵelementEnd();
17846
18532
  }
17847
18533
  if (rf & 2) {
17848
- const ctx_r12 = i0.ɵɵnextContext(2);
18534
+ const ctx_r20 = i0.ɵɵnextContext(2);
17849
18535
  i0.ɵɵadvance(1);
17850
- i0.ɵɵpropertyInterpolate("src", ctx_r12.icon, i0.ɵɵsanitizeUrl);
18536
+ i0.ɵɵpropertyInterpolate("src", ctx_r20.icon, i0.ɵɵsanitizeUrl);
17851
18537
  }
17852
18538
  }
17853
- function DrawComponent_mat_form_field_42_mat_option_10_Template(rf, ctx) {
18539
+ function DrawComponent_mat_form_field_44_mat_option_10_Template(rf, ctx) {
17854
18540
  if (rf & 1) {
17855
- const _r16 = i0.ɵɵgetCurrentView();
17856
- i0.ɵɵelementStart(0, "mat-option", 29);
17857
- i0.ɵɵlistener("click", function DrawComponent_mat_form_field_42_mat_option_10_Template_mat_option_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r16); const icon_html_r14 = restoredCtx.$implicit; const ctx_r15 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r15.onIconChange(icon_html_r14)); });
17858
- i0.ɵɵelementStart(1, "div", 27);
17859
- i0.ɵɵelement(2, "img", 28);
18541
+ const _r24 = i0.ɵɵgetCurrentView();
18542
+ i0.ɵɵelementStart(0, "mat-option", 36);
18543
+ i0.ɵɵlistener("click", function DrawComponent_mat_form_field_44_mat_option_10_Template_mat_option_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r24); const icon_html_r22 = restoredCtx.$implicit; const ctx_r23 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r23.onIconChange(icon_html_r22)); });
18544
+ i0.ɵɵelementStart(1, "div", 34);
18545
+ i0.ɵɵelement(2, "img", 35);
17860
18546
  i0.ɵɵelementEnd()();
17861
18547
  }
17862
18548
  if (rf & 2) {
17863
- const icon_html_r14 = ctx.$implicit;
17864
- i0.ɵɵproperty("value", icon_html_r14);
18549
+ const icon_html_r22 = ctx.$implicit;
18550
+ i0.ɵɵproperty("value", icon_html_r22);
17865
18551
  i0.ɵɵadvance(2);
17866
- i0.ɵɵpropertyInterpolate("src", icon_html_r14, i0.ɵɵsanitizeUrl);
18552
+ i0.ɵɵpropertyInterpolate("src", icon_html_r22, i0.ɵɵsanitizeUrl);
17867
18553
  }
17868
18554
  }
17869
- function DrawComponent_mat_form_field_42_Template(rf, ctx) {
18555
+ function DrawComponent_mat_form_field_44_Template(rf, ctx) {
17870
18556
  if (rf & 1) {
17871
- const _r18 = i0.ɵɵgetCurrentView();
18557
+ const _r26 = i0.ɵɵgetCurrentView();
17872
18558
  i0.ɵɵelementStart(0, "mat-form-field")(1, "mat-label");
17873
18559
  i0.ɵɵtext(2);
17874
18560
  i0.ɵɵpipe(3, "translate");
17875
18561
  i0.ɵɵelementEnd();
17876
18562
  i0.ɵɵelementStart(4, "mat-select")(5, "mat-select-trigger");
17877
- i0.ɵɵtemplate(6, DrawComponent_mat_form_field_42_div_6_Template, 2, 1, "div", 24);
18563
+ i0.ɵɵtemplate(6, DrawComponent_mat_form_field_44_div_6_Template, 2, 1, "div", 31);
17878
18564
  i0.ɵɵelementEnd();
17879
- i0.ɵɵelementStart(7, "mat-option", 25);
17880
- i0.ɵɵlistener("click", function DrawComponent_mat_form_field_42_Template_mat_option_click_7_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r17.onIconChange()); });
18565
+ i0.ɵɵelementStart(7, "mat-option", 32);
18566
+ i0.ɵɵlistener("click", function DrawComponent_mat_form_field_44_Template_mat_option_click_7_listener() { i0.ɵɵrestoreView(_r26); const ctx_r25 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r25.onIconChange()); });
17881
18567
  i0.ɵɵtext(8);
17882
18568
  i0.ɵɵpipe(9, "translate");
17883
18569
  i0.ɵɵelementEnd();
17884
- i0.ɵɵtemplate(10, DrawComponent_mat_form_field_42_mat_option_10_Template, 3, 2, "mat-option", 26);
18570
+ i0.ɵɵtemplate(10, DrawComponent_mat_form_field_44_mat_option_10_Template, 3, 2, "mat-option", 33);
17885
18571
  i0.ɵɵelementEnd()();
17886
18572
  }
17887
18573
  if (rf & 2) {
17888
- const ctx_r5 = i0.ɵɵnextContext();
18574
+ const ctx_r7 = i0.ɵɵnextContext();
17889
18575
  i0.ɵɵadvance(2);
17890
18576
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 4, "igo.geo.draw.icon"));
17891
18577
  i0.ɵɵadvance(4);
17892
- i0.ɵɵproperty("ngIf", ctx_r5.icon);
18578
+ i0.ɵɵproperty("ngIf", ctx_r7.icon);
17893
18579
  i0.ɵɵadvance(2);
17894
18580
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 6, "igo.geo.draw.noIcon"));
17895
18581
  i0.ɵɵadvance(2);
17896
- i0.ɵɵproperty("ngForOf", ctx_r5.icons);
18582
+ i0.ɵɵproperty("ngForOf", ctx_r7.icons);
17897
18583
  }
17898
18584
  }
17899
- function DrawComponent_button_46_Template(rf, ctx) {
18585
+ function DrawComponent_button_48_Template(rf, ctx) {
17900
18586
  if (rf & 1) {
17901
- const _r20 = i0.ɵɵgetCurrentView();
17902
- i0.ɵɵelementStart(0, "button", 30);
17903
- i0.ɵɵlistener("click", function DrawComponent_button_46_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r19.openStyleModalDialog()); });
18587
+ const _r28 = i0.ɵɵgetCurrentView();
18588
+ i0.ɵɵelementStart(0, "button", 37);
18589
+ i0.ɵɵlistener("click", function DrawComponent_button_48_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r28); const ctx_r27 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r27.openStyleModalDialog()); });
17904
18590
  i0.ɵɵpipe(1, "translate");
17905
18591
  i0.ɵɵtext(2);
17906
18592
  i0.ɵɵpipe(3, "translate");
17907
- i0.ɵɵelement(4, "mat-icon", 31);
18593
+ i0.ɵɵelement(4, "mat-icon", 38);
17908
18594
  i0.ɵɵelementEnd();
17909
18595
  }
17910
18596
  if (rf & 2) {
17911
- const ctx_r6 = i0.ɵɵnextContext();
18597
+ const ctx_r8 = i0.ɵɵnextContext();
17912
18598
  i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 3, "igo.geo.layer.style.styleModalTooltip"));
17913
18599
  i0.ɵɵadvance(2);
17914
18600
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, "igo.geo.layer.style.styleModal"), " ");
17915
18601
  i0.ɵɵadvance(2);
17916
- i0.ɵɵproperty("matBadge", ctx_r6.selectedFeatures$.value.length);
18602
+ i0.ɵɵproperty("matBadge", ctx_r8.selectedFeatures$.value.length);
17917
18603
  }
17918
18604
  }
17919
18605
  class DrawComponent {
@@ -17938,10 +18624,24 @@ class DrawComponent {
17938
18624
  {
17939
18625
  name: 'Drawing',
17940
18626
  title: this.languageService.translate.instant('igo.geo.draw.labels'),
17941
- tooltip: this.languageService.translate.instant('igo.geo.draw.changeLabel'),
17942
18627
  valueAccessor: (feature) => {
17943
18628
  return feature.properties.draw;
17944
18629
  }
18630
+ },
18631
+ {
18632
+ name: 'Edition',
18633
+ title: '',
18634
+ sort: false,
18635
+ valueAccessor: (feature) => {
18636
+ return [{
18637
+ editMode: false,
18638
+ icon: 'pencil',
18639
+ color: 'primary',
18640
+ click: () => { this.editLabelDrawing(feature); },
18641
+ style: 'mat-icon-button'
18642
+ }];
18643
+ },
18644
+ renderer: EntityTableColumnRenderer.ButtonGroup,
17945
18645
  }
17946
18646
  ]
17947
18647
  };
@@ -17957,8 +18657,14 @@ class DrawComponent {
17957
18657
  this.selectedFeatures$ = new BehaviorSubject([]);
17958
18658
  this.drawControlIsDisabled = true;
17959
18659
  this.drawControlIsActive = false;
18660
+ this.freehandMode = false;
17960
18661
  this.subscriptions$$ = [];
17961
18662
  this.position = 'bottom';
18663
+ this.radiusFormControl = new UntypedFormControl(1000);
18664
+ this.measureUnit = MeasureLengthUnit.Meters;
18665
+ this.radiusFormControlChange$$ = new Subscription();
18666
+ this.predefinedRadius$ = new BehaviorSubject(undefined);
18667
+ this.radiusDrawEnd$ = new BehaviorSubject(undefined);
17962
18668
  this.isCreatingNewLayer = false;
17963
18669
  this.currGeometryType = this.geometryType.Point;
17964
18670
  this.buildForm();
@@ -17989,6 +18695,13 @@ class DrawComponent {
17989
18695
  set activeDrawingLayer(value) {
17990
18696
  this._activeDrawingLayer = value;
17991
18697
  }
18698
+ /**
18699
+ * Available measure units for the measure type given
18700
+ * @internal
18701
+ */
18702
+ get measureUnits() {
18703
+ return [MeasureLengthUnit.Meters, MeasureLengthUnit.Kilometers];
18704
+ }
17992
18705
  // Initialize the store that will contain the entities and create the Draw control
17993
18706
  ngOnInit() {
17994
18707
  if (!this.stores.length) {
@@ -18041,6 +18754,11 @@ class DrawComponent {
18041
18754
  });
18042
18755
  this.onLayerChange(this.activeDrawingLayer);
18043
18756
  }
18757
+ this.radiusFormControlChange$$ = this.radiusFormControl.valueChanges.subscribe(value => {
18758
+ if (this.activeDrawControl.ispredefinedRadius$.getValue()) {
18759
+ this.changeRadius(value);
18760
+ }
18761
+ });
18044
18762
  }
18045
18763
  /**
18046
18764
  * Remove the drawing layer and the interactions
@@ -18051,6 +18769,7 @@ class DrawComponent {
18051
18769
  this.activeStore.state.updateAll({ selected: false });
18052
18770
  this.deactivateDrawControl();
18053
18771
  this.subscriptions$$.map((s) => s.unsubscribe());
18772
+ this.radiusFormControlChange$$.unsubscribe();
18054
18773
  }
18055
18774
  /**
18056
18775
  * Create a Draw Control
@@ -18124,30 +18843,21 @@ class DrawComponent {
18124
18843
  // open the dialog box used to enter label
18125
18844
  const dialogRef = this.dialog.open(DrawPopupComponent, {
18126
18845
  disableClose: false,
18127
- data: { currentLabel: olGeometry.get('draw') }
18846
+ data: { olGeometry: olGeometry, map: this.map }
18128
18847
  });
18129
18848
  // when dialog box is closed, get label and set it to geometry
18130
- dialogRef.afterClosed().subscribe((label) => {
18849
+ dialogRef.afterClosed().subscribe((result) => {
18131
18850
  // checks if the user clicked ok
18132
18851
  if (dialogRef.componentInstance.confirmFlag) {
18133
- this.updateLabelOfOlGeometry(olGeometry, label);
18134
- if (!olGeometry.values_.fontStyle) {
18135
- this.updateFontSizeAndStyle(olGeometry, '20', FontType.Arial);
18136
- }
18137
- if (!olGeometry.values_.drawingStyle) {
18852
+ this.updateLabelOfOlGeometry(olGeometry, result.label);
18853
+ this.updateLabelType(olGeometry, dialogRef.componentInstance.labelFlag);
18854
+ this.updateMeasureUnit(olGeometry, result.measureUnit);
18855
+ if (!(olGeometry instanceof OlFeature)) {
18856
+ this.updateFontSizeAndStyle(olGeometry, '15', FontType.Arial);
18138
18857
  this.updateFillAndStrokeColor(olGeometry, 'rgba(255,255,255,0.4)', 'rgba(143,7,7,1)');
18858
+ this.updateOffset(olGeometry, 0, (olGeometry instanceof OlPoint) ? -15 : 0);
18139
18859
  }
18140
- if (!(olGeometry.values_.offsetX || olGeometry.values_.offsetY)) {
18141
- this.updateOffset(olGeometry, 0, olGeometry instanceof OlPoint ? -15 : 0);
18142
- }
18143
- // if event was fired at draw end
18144
- if (isDrawEnd) {
18145
- this.onDrawEnd(olGeometry);
18146
- // if event was fired at select
18147
- }
18148
- else {
18149
- this.onSelectDraw(olGeometry, label);
18150
- }
18860
+ isDrawEnd ? this.onDrawEnd(olGeometry) : this.onSelectDraw(olGeometry, result.label, [dialogRef.componentInstance.labelFlag, result.measureUnit]);
18151
18861
  this.updateHeightTable();
18152
18862
  }
18153
18863
  // deletes the feature
@@ -18179,7 +18889,55 @@ class DrawComponent {
18179
18889
  const entityId = entity.properties.id;
18180
18890
  const olGeometryId = olGeometry.ol_uid;
18181
18891
  if (entityId === olGeometryId) {
18182
- this.updateLabelOfOlGeometry(olGeometry, entity.properties.draw);
18892
+ if (entity.properties.labelType === LabelType.Coordinates) {
18893
+ let longLat = DDtoDMS([entity.properties.longitude, entity.properties.latitude], entity.properties.measureUnit);
18894
+ this.updateLabelOfOlGeometry(olGeometry, '(' + longLat[1] + ', ' + longLat[0] + ')');
18895
+ }
18896
+ else if (entity.properties.labelType === LabelType.Length) {
18897
+ if (olGeometry instanceof OlCircle) {
18898
+ let circularPolygon = fromCircle(olGeometry, 10000);
18899
+ const radius = metersToUnit(this.getRadius(circularPolygon), entity.properties.measureUnit);
18900
+ const unit = MeasureLengthUnitAbbreviation[entity.properties.measureUnit];
18901
+ const radiusLabel = 'R: ' + radius.toFixed(2).toString() + ' ' + unit;
18902
+ this.updateLabelOfOlGeometry(olGeometry, radiusLabel);
18903
+ }
18904
+ else {
18905
+ let olGeometryLength = measureOlGeometryLength(olGeometry, this.map.ol.getView().getProjection().getCode());
18906
+ let measureUnit;
18907
+ const temp = entity.properties.measureUnit;
18908
+ measureUnit = MeasureLengthUnitAbbreviation[entity.properties.measureUnit];
18909
+ olGeometryLength = metersToUnit(olGeometryLength, temp);
18910
+ let lengthLabel = olGeometry instanceof OlPolygon ?
18911
+ 'P: ' + olGeometryLength.toFixed(2).toString() + ' ' + measureUnit
18912
+ : olGeometryLength.toFixed(2).toString() + ' ' + measureUnit;
18913
+ this.updateLabelOfOlGeometry(olGeometry, lengthLabel);
18914
+ }
18915
+ }
18916
+ else if (entity.properties.labelType === LabelType.Area) {
18917
+ if (olGeometry instanceof OlCircle) {
18918
+ let circularPolygon = fromCircle(olGeometry, 10000);
18919
+ let circleArea = measureOlGeometryArea(circularPolygon, this.map.ol.getView().getProjection().getCode());
18920
+ const unit = MeasureAreaUnitAbbreviation[entity.properties.measureUnit];
18921
+ const temp = entity.properties.measureUnit;
18922
+ circleArea = squareMetersToUnit(circleArea, temp);
18923
+ const areaLabel = circleArea.toFixed(2).toString() + ' ' + unit;
18924
+ this.updateLabelOfOlGeometry(olGeometry, areaLabel);
18925
+ }
18926
+ else {
18927
+ let olGeometryArea = measureOlGeometryArea(olGeometry, this.map.ol.getView().getProjection().getCode());
18928
+ let measureUnit;
18929
+ const temp = entity.properties.measureUnit;
18930
+ measureUnit = MeasureAreaUnitAbbreviation[entity.properties.measureUnit];
18931
+ olGeometryArea = squareMetersToUnit(olGeometryArea, temp);
18932
+ const lengthLabel = olGeometryArea.toFixed(2).toString() + ' ' + measureUnit;
18933
+ this.updateLabelOfOlGeometry(olGeometry, lengthLabel);
18934
+ }
18935
+ }
18936
+ else {
18937
+ this.updateLabelOfOlGeometry(olGeometry, entity.properties.draw);
18938
+ }
18939
+ this.updateLabelType(olGeometry, entity.properties.labelType);
18940
+ this.updateMeasureUnit(olGeometry, entity.properties.measureUnit);
18183
18941
  this.updateFontSizeAndStyle(olGeometry, entity.properties.fontStyle.split(' ')[0].replace('px', ''), entity.properties.fontStyle.substring(entity.properties.fontStyle.indexOf(' ') + 1));
18184
18942
  this.updateFillAndStrokeColor(olGeometry, entity.properties.drawingStyle.fill, entity.properties.drawingStyle.stroke);
18185
18943
  this.updateOffset(olGeometry, entity.properties.offsetX, entity.properties.offsetY);
@@ -18187,7 +18945,7 @@ class DrawComponent {
18187
18945
  }
18188
18946
  });
18189
18947
  }
18190
- onSelectDraw(olFeature, label) {
18948
+ onSelectDraw(olFeature, label, labelTypeAndUnit) {
18191
18949
  const entities = this.activeStore.all();
18192
18950
  const olGeometry = olFeature.getGeometry();
18193
18951
  olGeometry.ol_uid = olFeature.get('id');
@@ -18213,6 +18971,8 @@ class DrawComponent {
18213
18971
  this.updateFontSizeAndStyle(olGeometry, fontSize, fontStyle);
18214
18972
  this.updateFillAndStrokeColor(olGeometry, fillColor, strokeColor);
18215
18973
  this.updateOffset(olGeometry, offsetX, offsetY);
18974
+ this.updateLabelType(olGeometry, labelTypeAndUnit[0]);
18975
+ this.updateMeasureUnit(olGeometry, labelTypeAndUnit[1]);
18216
18976
  this.replaceFeatureInStore(entity, olGeometry, rad);
18217
18977
  }
18218
18978
  });
@@ -18252,8 +19012,12 @@ class DrawComponent {
18252
19012
  lon4326 = center4326[0];
18253
19013
  lat4326 = center4326[1];
18254
19014
  rad = getDistance(center4326, extent4326);
19015
+ this.radiusFormControl.setValue(Math.round(rad));
18255
19016
  }
18256
19017
  }
19018
+ if (this.activeDrawControl.radiusDrawEnd$.getValue()) {
19019
+ rad = this.activeDrawControl.radiusDrawEnd$.getValue();
19020
+ }
18257
19021
  if (olGeometry instanceof OlPoint) {
18258
19022
  point4326 = transform(olGeometry.getFlatCoordinates(), projection, 'EPSG:4326');
18259
19023
  lon4326 = point4326[0];
@@ -18275,12 +19039,17 @@ class DrawComponent {
18275
19039
  stroke: olGeometry.get('strokeColor_')
18276
19040
  },
18277
19041
  offsetX: olGeometry.get('offsetX_'),
18278
- offsetY: olGeometry.get('offsetY_')
19042
+ offsetY: olGeometry.get('offsetY_'),
19043
+ labelType: olGeometry.get('labelType_'),
19044
+ measureUnit: olGeometry.get('measureUnit_')
18279
19045
  },
18280
19046
  meta: {
18281
19047
  id: featureId
18282
19048
  }
18283
19049
  });
19050
+ this.activeStore.setLayerExtent();
19051
+ this.activeDrawControl.predefinedRadius$.next(undefined);
19052
+ this.activeDrawControl.radiusDrawEnd$.next(undefined);
18284
19053
  }
18285
19054
  buildForm() {
18286
19055
  this.form = this.formBuilder.group({
@@ -18325,11 +19094,9 @@ class DrawComponent {
18325
19094
  /**
18326
19095
  * Called when the user double-clicks the selected drawing
18327
19096
  */
18328
- editLabelDrawing() {
18329
- if (this.selectedFeatures$.value.length) {
18330
- const olGeometry = featureToOl(this.selectedFeatures$.value[0], this.map.ol.getView().getProjection().getCode());
18331
- this.openDrawDialog(olGeometry, false);
18332
- }
19097
+ editLabelDrawing(feature) {
19098
+ const olGeometryFeature = featureToOl(feature, this.map.ol.getView().getProjection().getCode());
19099
+ this.openDrawDialog(olGeometryFeature, false);
18333
19100
  }
18334
19101
  openShorcutsDialog() {
18335
19102
  this.dialog.open(DrawShorcutsComponent);
@@ -18347,6 +19114,7 @@ class DrawComponent {
18347
19114
  });
18348
19115
  });
18349
19116
  this.updateHeightTable();
19117
+ this.activeStore.setLayerExtent();
18350
19118
  }
18351
19119
  /**
18352
19120
  * Called when the user toggles the labels toggle
@@ -18366,6 +19134,19 @@ class DrawComponent {
18366
19134
  onToggleDrawControl(toggleIsChecked) {
18367
19135
  toggleIsChecked ? this.toggleDrawControl() : this.deactivateDrawControl();
18368
19136
  }
19137
+ onToggleFreehandMode(event) {
19138
+ if (this.isCircle() && !event.checked) {
19139
+ this.activeDrawControl.ispredefinedRadius$.next(true);
19140
+ this.changeRadius(this.radiusFormControl.value);
19141
+ }
19142
+ else {
19143
+ this.activeDrawControl.setOlInteractionStyle(createInteractionStyle(this.fillColor, this.strokeColor, this.strokeWidth));
19144
+ this.activeDrawControl.ispredefinedRadius$.next(false);
19145
+ }
19146
+ this.freehandMode = event.checked;
19147
+ this.activeDrawControl.freehand$.next(event.checked);
19148
+ this.toggleDrawControl();
19149
+ }
18369
19150
  // User changes properties of a drawing element
18370
19151
  /**
18371
19152
  * Display the current layer with the current store and the current layerSource
@@ -18516,16 +19297,19 @@ class DrawComponent {
18516
19297
  onGeometryTypeChange(geometryType) {
18517
19298
  this.currGeometryType = geometryType;
18518
19299
  this.activeDrawControl.setGeometryType(geometryType);
19300
+ this.freehandMode ?
19301
+ this.onToggleFreehandMode({ checked: true }) :
19302
+ this.onToggleFreehandMode({ checked: false });
18519
19303
  this.toggleDrawControl();
18520
19304
  }
18521
19305
  // Updates the properties of olFeature inputted
18522
19306
  /**
18523
19307
  * Update the label of a geometry when a label is entered in a dialog box
18524
- * @param olGeometry the geometry
19308
+ * @param OlFeature the feature
18525
19309
  * @param label the label
18526
19310
  */
18527
- updateLabelOfOlGeometry(olGeometry, label) {
18528
- olGeometry.setProperties({
19311
+ updateLabelOfOlGeometry(OlFeature, label) {
19312
+ OlFeature.setProperties({
18529
19313
  _label: label
18530
19314
  }, true);
18531
19315
  }
@@ -18546,13 +19330,23 @@ class DrawComponent {
18546
19330
  offsetY_: offsetY
18547
19331
  }, true);
18548
19332
  }
19333
+ updateLabelType(olFeature, typeOfLabel) {
19334
+ olFeature.setProperties({
19335
+ labelType_: typeOfLabel
19336
+ }, true);
19337
+ }
19338
+ updateMeasureUnit(olFeature, measureUnit) {
19339
+ olFeature.setProperties({
19340
+ measureUnit_: measureUnit
19341
+ }, true);
19342
+ }
18549
19343
  // Updates values of the selected element on the HTML view
18550
19344
  getFeatureFontSize() {
18551
19345
  return this.selectedFeatures$.value.length > 0
18552
19346
  ? this.selectedFeatures$.value[0].properties.fontStyle
18553
19347
  .split(' ')[0]
18554
19348
  .replace('px', '')
18555
- : '20';
19349
+ : '15';
18556
19350
  }
18557
19351
  getFeatureFontStyle() {
18558
19352
  return this.selectedFeatures$.value.length > 0
@@ -18656,6 +19450,66 @@ class DrawComponent {
18656
19450
  }
18657
19451
  this.activeDrawControl.setOlMap(this.map.ol, true);
18658
19452
  }
19453
+ /**
19454
+ * get the geometry of design
19455
+ *
19456
+ */
19457
+ isPoint() {
19458
+ return this.activeDrawControl.getGeometryType() === this.geometryType.Point;
19459
+ }
19460
+ isLineString() {
19461
+ return this.activeDrawControl.getGeometryType() === this.geometryType.LineString;
19462
+ }
19463
+ isPolygon() {
19464
+ return this.activeDrawControl.getGeometryType() === this.geometryType.Polygon;
19465
+ }
19466
+ isCircle() {
19467
+ return this.activeDrawControl.getGeometryType() === this.geometryType.Circle;
19468
+ }
19469
+ /**
19470
+ * The fonction to predefine the radius of the user
19471
+ *
19472
+ */
19473
+ changeRadius(radius) {
19474
+ let radiusMeters;
19475
+ if (radius) {
19476
+ this.measureUnit === MeasureLengthUnit.Meters ? radiusMeters = radius :
19477
+ radiusMeters = radius * 1000;
19478
+ }
19479
+ else {
19480
+ radiusMeters = undefined;
19481
+ }
19482
+ const pointStyle = (feature, resolution) => {
19483
+ const geom = feature.getGeometry();
19484
+ const coordinates = olproj.transform(geom.getCoordinates(), this.map.projection, 'EPSG:4326');
19485
+ const radius = radiusMeters / (Math.cos((Math.PI / 180) * coordinates[1])) / resolution;
19486
+ this.activeDrawControl.predefinedRadius$.next(radiusMeters);
19487
+ return new olstyle.Style({
19488
+ image: new olstyle.Circle({
19489
+ radius: radius,
19490
+ stroke: new olstyle.Stroke({
19491
+ width: 1,
19492
+ color: 'rgba(143,7,7,1)'
19493
+ }),
19494
+ fill: new olstyle.Fill({
19495
+ color: 'rgba(255,255,255,0.4)'
19496
+ })
19497
+ })
19498
+ });
19499
+ };
19500
+ this.activeDrawControl.setOlInteractionStyle(pointStyle);
19501
+ this.toggleDrawControl();
19502
+ }
19503
+ onMeasureUnitChange(selectedMeasureUnit) {
19504
+ if (selectedMeasureUnit === this.measureUnit) {
19505
+ return;
19506
+ }
19507
+ else {
19508
+ this.measureUnit = selectedMeasureUnit;
19509
+ this.measureUnit === MeasureLengthUnit.Meters ? this.radiusFormControl.setValue(this.radiusFormControl.value * 1000) :
19510
+ this.radiusFormControl.setValue(this.radiusFormControl.value / 1000);
19511
+ }
19512
+ }
18659
19513
  /**
18660
19514
  * Recreates the style of the feature stored
18661
19515
  */
@@ -18671,6 +19525,10 @@ class DrawComponent {
18671
19525
  });
18672
19526
  }
18673
19527
  }
19528
+ getRadius(olGeometry) {
19529
+ const length = getLength(olGeometry);
19530
+ return Number(length / (2 * Math.PI));
19531
+ }
18674
19532
  }
18675
19533
  DrawComponent.ɵfac = function DrawComponent_Factory(t) { return new (t || DrawComponent)(i0.ɵɵdirectiveInject(i2$1.LanguageService), i0.ɵɵdirectiveInject(i2$2.UntypedFormBuilder), i0.ɵɵdirectiveInject(DrawStyleService), i0.ɵɵdirectiveInject(i1.MatDialog), i0.ɵɵdirectiveInject(DrawIconService)); };
18676
19534
  DrawComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawComponent, selectors: [["igo-draw"]], viewQuery: function DrawComponent_Query(rf, ctx) {
@@ -18681,9 +19539,9 @@ DrawComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawComponent
18681
19539
  let _t;
18682
19540
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.select = _t.first);
18683
19541
  }
18684
- }, inputs: { map: "map", stores: "stores", drawControls: "drawControls", activeDrawingLayer: "activeDrawingLayer" }, outputs: { activeLayerChange: "activeLayerChange", drawControlsEvent: "drawControlsEvent", layersIDEvent: "layersIDEvent", fillColor: "fillColor", strokeColor: "strokeColor", strokeWidth: "strokeWidth", fontSize: "fontSize", fontStyle: "fontStyle" }, decls: 47, vars: 45, consts: [[1, "geometry-type-toggle", "mat-typography"], [3, "value", "change"], [3, "value"], [1, "draw-options", "mat-typography"], [3, "disabled", "checked", "labelPosition", "change"], [3, "checked", "labelPosition", "change"], ["appearance", "outline", 1, "layer-select"], [3, "value", "selectionChange"], ["selectedLayer", ""], [3, "value", 4, "ngFor", "ngForOf"], ["id", "createNewLayer"], ["mat-icon-button", "", "collapsibleButton", "", "tooltip-position", "below", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click", 4, "ngIf"], ["class", "deleteBtn", "mat-icon-button", "", "color", "warn", "tooltip-position", "below", "matTooltipShowDelay", "500", 3, "matTooltip", "disabled", "click", 4, "ngIf"], [1, "table-compact", 3, "store", "template", "dblclick"], ["table", ""], [1, "icon-options"], [4, "ngIf"], ["mat-icon-button", "", "color", "accent", "disableRipple", "true", 3, "click"], ["svgIcon", "keyboard-outline", "tooltip-position", "below", "matTooltipShowDelay", "500", 1, "shortcuts-icon", 3, "matTooltip"], ["mat-raised-button", "", "color", "primary", 3, "matTooltip", "click", 4, "ngIf"], ["mat-icon-button", "", "collapsibleButton", "", "tooltip-position", "below", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click"], [3, "svgIcon"], ["mat-icon-button", "", "color", "warn", "tooltip-position", "below", "matTooltipShowDelay", "500", 1, "deleteBtn", 3, "matTooltip", "disabled", "click"], ["svgIcon", "delete"], ["class", "box", 4, "ngIf"], ["value", "", 3, "click"], [3, "value", "click", 4, "ngFor", "ngForOf"], [1, "box"], [3, "src"], [3, "value", "click"], ["mat-raised-button", "", "color", "primary", 3, "matTooltip", "click"], ["svgIcon", "palette", "matBadgeColor", "warn", "matBadgeSize", "medium", 1, "style-icon", 3, "matBadge"]], template: function DrawComponent_Template(rf, ctx) {
19542
+ }, inputs: { map: "map", stores: "stores", drawControls: "drawControls", activeDrawingLayer: "activeDrawingLayer" }, outputs: { activeLayerChange: "activeLayerChange", drawControlsEvent: "drawControlsEvent", layersIDEvent: "layersIDEvent", fillColor: "fillColor", strokeColor: "strokeColor", strokeWidth: "strokeWidth", fontSize: "fontSize", fontStyle: "fontStyle" }, decls: 49, vars: 47, consts: [[1, "geometry-type-toggle", "mat-typography"], [3, "value", "change"], [3, "value"], [1, "draw-options", "mat-typography"], [3, "disabled", "checked", "labelPosition", "change"], [3, "checked", "labelPosition", "change"], [3, "checked", "labelPosition", "change", 4, "ngIf"], ["class", "radius-unit", 4, "ngIf"], ["appearance", "outline", 1, "layer-select"], [3, "value", "selectionChange"], ["selectedLayer", ""], [3, "value", 4, "ngFor", "ngForOf"], ["id", "createNewLayer"], ["mat-icon-button", "", "collapsibleButton", "", "tooltip-position", "below", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click", 4, "ngIf"], ["class", "deleteBtn", "mat-icon-button", "", "color", "warn", "tooltip-position", "below", "matTooltipShowDelay", "500", 3, "matTooltip", "disabled", "click", 4, "ngIf"], [1, "table-compact", 3, "store", "template"], ["table", ""], [1, "icon-options"], [4, "ngIf"], ["mat-icon-button", "", "color", "accent", "disableRipple", "true", 3, "click"], ["svgIcon", "keyboard-outline", "tooltip-position", "below", "matTooltipShowDelay", "500", 1, "shortcuts-icon", 3, "matTooltip"], ["mat-raised-button", "", "color", "primary", 3, "matTooltip", "click", 4, "ngIf"], [1, "radius-unit"], [1, "radius-form"], [1, "radius"], ["matInput", "", "type", "number", "min", "0", 3, "placeholder", "formControl", "readonly"], [1, "unit-field"], ["mat-icon-button", "", "collapsibleButton", "", "tooltip-position", "below", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click"], [3, "svgIcon"], ["mat-icon-button", "", "color", "warn", "tooltip-position", "below", "matTooltipShowDelay", "500", 1, "deleteBtn", 3, "matTooltip", "disabled", "click"], ["svgIcon", "delete"], ["class", "box", 4, "ngIf"], ["value", "", 3, "click"], [3, "value", "click", 4, "ngFor", "ngForOf"], [1, "box"], [3, "src"], [3, "value", "click"], ["mat-raised-button", "", "color", "primary", 3, "matTooltip", "click"], ["svgIcon", "palette", "matBadgeColor", "warn", "matBadgeSize", "medium", 1, "style-icon", 3, "matBadge"]], template: function DrawComponent_Template(rf, ctx) {
18685
19543
  if (rf & 1) {
18686
- const _r21 = i0.ɵɵgetCurrentView();
19544
+ const _r29 = i0.ɵɵgetCurrentView();
18687
19545
  i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "mat-button-toggle-group", 1);
18688
19546
  i0.ɵɵlistener("change", function DrawComponent_Template_mat_button_toggle_group_change_2_listener($event) { return ctx.onGeometryTypeChange($event.value); });
18689
19547
  i0.ɵɵelementStart(3, "mat-button-toggle", 2);
@@ -18711,36 +19569,39 @@ DrawComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawComponent
18711
19569
  i0.ɵɵlistener("change", function DrawComponent_Template_mat_slide_toggle_change_19_listener() { return ctx.onToggleLabels(); });
18712
19570
  i0.ɵɵtext(20);
18713
19571
  i0.ɵɵpipe(21, "translate");
18714
- i0.ɵɵelementEnd()();
18715
- i0.ɵɵelement(22, "mat-divider");
18716
- i0.ɵɵelementStart(23, "div")(24, "mat-form-field", 6)(25, "mat-label");
18717
- i0.ɵɵtext(26);
18718
- i0.ɵɵpipe(27, "translate");
18719
19572
  i0.ɵɵelementEnd();
18720
- i0.ɵɵelementStart(28, "mat-select", 7, 8);
18721
- i0.ɵɵlistener("selectionChange", function DrawComponent_Template_mat_select_selectionChange_28_listener() { i0.ɵɵrestoreView(_r21); const _r0 = i0.ɵɵreference(29); return i0.ɵɵresetView(ctx.onLayerChange(_r0.value)); });
18722
- i0.ɵɵtemplate(30, DrawComponent_mat_option_30_Template, 2, 2, "mat-option", 9);
18723
- i0.ɵɵelementStart(31, "mat-option", 10);
18724
- i0.ɵɵtext(32);
18725
- i0.ɵɵpipe(33, "translate");
18726
- i0.ɵɵelementEnd()()();
18727
- i0.ɵɵtemplate(34, DrawComponent_button_34_Template, 4, 7, "button", 11);
19573
+ i0.ɵɵtemplate(22, DrawComponent_mat_slide_toggle_22_Template, 3, 5, "mat-slide-toggle", 6);
19574
+ i0.ɵɵtemplate(23, DrawComponent_div_23_Template, 8, 7, "div", 7);
18728
19575
  i0.ɵɵelementEnd();
18729
- i0.ɵɵelement(35, "mat-divider");
18730
- i0.ɵɵelementStart(36, "div");
18731
- i0.ɵɵtemplate(37, DrawComponent_button_37_Template, 4, 6, "button", 12);
18732
- i0.ɵɵelementStart(38, "div")(39, "igo-entity-table", 13, 14);
18733
- i0.ɵɵlistener("dblclick", function DrawComponent_Template_igo_entity_table_dblclick_39_listener() { return ctx.editLabelDrawing(); });
19576
+ i0.ɵɵelement(24, "mat-divider");
19577
+ i0.ɵɵelementStart(25, "div")(26, "mat-form-field", 8)(27, "mat-label");
19578
+ i0.ɵɵtext(28);
19579
+ i0.ɵɵpipe(29, "translate");
19580
+ i0.ɵɵelementEnd();
19581
+ i0.ɵɵelementStart(30, "mat-select", 9, 10);
19582
+ i0.ɵɵlistener("selectionChange", function DrawComponent_Template_mat_select_selectionChange_30_listener() { i0.ɵɵrestoreView(_r29); const _r2 = i0.ɵɵreference(31); return i0.ɵɵresetView(ctx.onLayerChange(_r2.value)); });
19583
+ i0.ɵɵtemplate(32, DrawComponent_mat_option_32_Template, 2, 2, "mat-option", 11);
19584
+ i0.ɵɵelementStart(33, "mat-option", 12);
19585
+ i0.ɵɵtext(34);
19586
+ i0.ɵɵpipe(35, "translate");
18734
19587
  i0.ɵɵelementEnd()()();
18735
- i0.ɵɵelementStart(41, "div", 15);
18736
- i0.ɵɵtemplate(42, DrawComponent_mat_form_field_42_Template, 11, 8, "mat-form-field", 16);
19588
+ i0.ɵɵtemplate(36, DrawComponent_button_36_Template, 4, 7, "button", 13);
18737
19589
  i0.ɵɵelementEnd();
18738
- i0.ɵɵelementStart(43, "button", 17);
18739
- i0.ɵɵlistener("click", function DrawComponent_Template_button_click_43_listener() { return ctx.openShorcutsDialog(); });
18740
- i0.ɵɵelement(44, "mat-icon", 18);
18741
- i0.ɵɵpipe(45, "translate");
19590
+ i0.ɵɵelement(37, "mat-divider");
19591
+ i0.ɵɵelementStart(38, "div");
19592
+ i0.ɵɵtemplate(39, DrawComponent_button_39_Template, 4, 6, "button", 14);
19593
+ i0.ɵɵelementStart(40, "div");
19594
+ i0.ɵɵelement(41, "igo-entity-table", 15, 16);
19595
+ i0.ɵɵelementEnd()();
19596
+ i0.ɵɵelementStart(43, "div", 17);
19597
+ i0.ɵɵtemplate(44, DrawComponent_mat_form_field_44_Template, 11, 8, "mat-form-field", 18);
19598
+ i0.ɵɵelementEnd();
19599
+ i0.ɵɵelementStart(45, "button", 19);
19600
+ i0.ɵɵlistener("click", function DrawComponent_Template_button_click_45_listener() { return ctx.openShorcutsDialog(); });
19601
+ i0.ɵɵelement(46, "mat-icon", 20);
19602
+ i0.ɵɵpipe(47, "translate");
18742
19603
  i0.ɵɵelementEnd();
18743
- i0.ɵɵtemplate(46, DrawComponent_button_46_Template, 5, 7, "button", 19);
19604
+ i0.ɵɵtemplate(48, DrawComponent_button_48_Template, 5, 7, "button", 21);
18744
19605
  i0.ɵɵelementEnd();
18745
19606
  }
18746
19607
  if (rf & 2) {
@@ -18749,35 +19610,39 @@ DrawComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawComponent
18749
19610
  i0.ɵɵadvance(1);
18750
19611
  i0.ɵɵproperty("value", ctx.geometryType.Point);
18751
19612
  i0.ɵɵadvance(1);
18752
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 27, "igo.geo.draw." + ctx.geometryType.Point), " ");
19613
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 29, "igo.geo.draw." + ctx.geometryType.Point), " ");
18753
19614
  i0.ɵɵadvance(2);
18754
19615
  i0.ɵɵproperty("value", ctx.geometryType.LineString);
18755
19616
  i0.ɵɵadvance(1);
18756
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 29, "igo.geo.draw." + ctx.geometryType.LineString), " ");
19617
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 31, "igo.geo.draw." + ctx.geometryType.LineString), " ");
18757
19618
  i0.ɵɵadvance(2);
18758
19619
  i0.ɵɵproperty("value", ctx.geometryType.Polygon);
18759
19620
  i0.ɵɵadvance(1);
18760
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 31, "igo.geo.draw." + ctx.geometryType.Polygon), " ");
19621
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 33, "igo.geo.draw." + ctx.geometryType.Polygon), " ");
18761
19622
  i0.ɵɵadvance(2);
18762
19623
  i0.ɵɵproperty("value", ctx.geometryType.Circle);
18763
19624
  i0.ɵɵadvance(1);
18764
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(14, 33, "igo.geo.draw." + ctx.geometryType.Circle), " ");
19625
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(14, 35, "igo.geo.draw." + ctx.geometryType.Circle), " ");
18765
19626
  i0.ɵɵadvance(3);
18766
19627
  i0.ɵɵproperty("disabled", ctx.drawControlIsDisabled)("checked", ctx.drawControlIsActive)("labelPosition", "before");
18767
19628
  i0.ɵɵadvance(1);
18768
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(18, 35, "igo.geo.spatialFilter.drawControl"), " ");
19629
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(18, 37, "igo.geo.spatialFilter.drawControl"), " ");
18769
19630
  i0.ɵɵadvance(2);
18770
19631
  i0.ɵɵproperty("checked", ctx.labelsAreShown)("labelPosition", "before");
18771
19632
  i0.ɵɵadvance(1);
18772
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(21, 37, "igo.geo.draw.toggleMapTooltips"), " ");
18773
- i0.ɵɵadvance(6);
18774
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(27, 39, "igo.geo.draw.layer.title"));
19633
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(21, 39, "igo.geo.draw.toggleMapTooltips"), " ");
19634
+ i0.ɵɵadvance(2);
19635
+ i0.ɵɵproperty("ngIf", !ctx.isPoint());
19636
+ i0.ɵɵadvance(1);
19637
+ i0.ɵɵproperty("ngIf", ctx.isCircle());
19638
+ i0.ɵɵadvance(5);
19639
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(29, 41, "igo.geo.draw.layer.title"));
18775
19640
  i0.ɵɵadvance(2);
18776
19641
  i0.ɵɵproperty("value", ctx.updateActiveLayer());
18777
19642
  i0.ɵɵadvance(2);
18778
19643
  i0.ɵɵproperty("ngForOf", ctx.allLayers);
18779
19644
  i0.ɵɵadvance(2);
18780
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(33, 41, "igo.geo.draw.layer.createNewLayer"), " ");
19645
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(35, 43, "igo.geo.draw.layer.createNewLayer"), " ");
18781
19646
  i0.ɵɵadvance(2);
18782
19647
  i0.ɵɵproperty("ngIf", ctx.activeDrawingLayer);
18783
19648
  i0.ɵɵadvance(3);
@@ -18787,11 +19652,11 @@ DrawComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawComponent
18787
19652
  i0.ɵɵadvance(3);
18788
19653
  i0.ɵɵproperty("ngIf", ctx.icons.length >= 1);
18789
19654
  i0.ɵɵadvance(2);
18790
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(45, 43, "igo.geo.draw.shortcuts"));
19655
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(47, 45, "igo.geo.draw.shortcuts"));
18791
19656
  i0.ɵɵadvance(2);
18792
19657
  i0.ɵɵproperty("ngIf", ctx.selectedFeatures$.value.length);
18793
19658
  }
18794
- }, dependencies: [i1$1.NgForOf, i1$1.NgIf, i3.MatButton, i18.MatButtonToggleGroup, i18.MatButtonToggle, i11.MatDivider, i13.MatFormField, i13.MatLabel, i2.MatIcon, i7$1.MatBadge, i4.MatTooltip, i15.MatSelect, i15.MatSelectTrigger, i9.MatOption, i23.MatSlideToggle, i5$1.EntityTableComponent, i1$1.AsyncPipe, i7.TranslatePipe], styles: [".geometry-type-toggle[_ngcontent-%COMP%]{padding:10px;text-align:center}.geometry-type-toggle[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{width:100%}.geometry-type-toggle[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%] mat-button-toggle[_ngcontent-%COMP%]{width:25%}.draw-options[_ngcontent-%COMP%]{overflow-x:hidden}.draw-options[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{width:100%;margin:10px}.draw-options[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%] .mat-slide-toggle-content{width:calc(100% - 60px)}.icon-options[_ngcontent-%COMP%]{margin:5px 5px 0}.edition-drawing[_ngcontent-%COMP%]{padding:10px 0}img[_ngcontent-%COMP%]{width:100%;height:100%}.deleteBtn[_ngcontent-%COMP%]{margin-left:12px}.storeTable[_ngcontent-%COMP%]{height:auto!important}.layer-select[_ngcontent-%COMP%]{width:85%;padding:10px 10px 0%}.input-button-container[_ngcontent-%COMP%]{padding:10px}.input-button-container[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:25%}.input-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{left:8px;bottom:10px}"], data: { animation: [
19659
+ }, dependencies: [i2$2.ɵNgNoValidate, i2$2.DefaultValueAccessor, i2$2.NumberValueAccessor, i2$2.NgControlStatus, i2$2.NgControlStatusGroup, i2$2.MinValidator, i2$2.NgForm, i2$2.FormControlDirective, i1$1.NgForOf, i1$1.NgIf, i3.MatButton, i18.MatButtonToggleGroup, i18.MatButtonToggle, i11.MatDivider, i13.MatFormField, i13.MatLabel, i2.MatIcon, i7$1.MatBadge, i4.MatTooltip, i14.MatInput, i15.MatSelect, i15.MatSelectTrigger, i9.MatOption, i23.MatSlideToggle, i5$1.EntityTableComponent, i1$1.AsyncPipe, i7.TranslatePipe], styles: [".geometry-type-toggle[_ngcontent-%COMP%]{padding:10px;text-align:center}.geometry-type-toggle[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{width:100%}.geometry-type-toggle[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%] mat-button-toggle[_ngcontent-%COMP%]{width:25%}.draw-options[_ngcontent-%COMP%]{overflow-x:hidden}.draw-options[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{width:100%;margin:10px}.draw-options[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%] .mat-slide-toggle-content{width:calc(100% - 60px)}.icon-options[_ngcontent-%COMP%]{margin:5px 5px 0}.edition-drawing[_ngcontent-%COMP%]{padding:10px 0}img[_ngcontent-%COMP%]{width:100%;height:100%}.deleteBtn[_ngcontent-%COMP%]{margin-left:12px}.storeTable[_ngcontent-%COMP%]{height:auto!important}.layer-select[_ngcontent-%COMP%]{width:85%;padding:10px 10px 0%}.input-button-container[_ngcontent-%COMP%]{padding:10px}.input-button-container[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:25%}.input-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{left:8px;bottom:10px}.radius[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;width:110%}.unit-field[_ngcontent-%COMP%]{width:110px;margin-left:30px}.radius-unit[_ngcontent-%COMP%]{display:flex;width:100%;margin-left:2px;padding:5px} igo-entity-table td:last-child{text-align:right!important} igo-entity-table td:last-child button{margin:0%!important}"], data: { animation: [
18795
19660
  trigger('openClose', [
18796
19661
  state('open', style({
18797
19662
  opacity: 1
@@ -18817,7 +19682,7 @@ DrawComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DrawComponent
18817
19682
  transition('open => closed', [animate('600ms ease')]),
18818
19683
  transition('closed => open', [animate('800ms ease')])
18819
19684
  ])
18820
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <div class=\"geometry-type-toggle mat-typography\">\n <mat-button-toggle-group\n (change)=\"onGeometryTypeChange($event.value)\" [value]=\"geometryType.Point\">\n <mat-button-toggle [value]=\"geometryType.Point\">\n {{'igo.geo.draw.' + geometryType.Point | translate}}\n </mat-button-toggle>\n\n <mat-button-toggle [value]=\"geometryType.LineString\">\n {{'igo.geo.draw.' + geometryType.LineString | translate}}\n </mat-button-toggle>\n\n <mat-button-toggle [value]=\"geometryType.Polygon\">\n {{'igo.geo.draw.' + geometryType.Polygon | translate}}\n </mat-button-toggle>\n\n <mat-button-toggle [value]=\"geometryType.Circle\">\n {{'igo.geo.draw.' + geometryType.Circle | translate}}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n <div class=\"draw-options mat-typography\">\n <mat-slide-toggle\n [disabled]=\"drawControlIsDisabled\"\n [checked]=\"drawControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleDrawControl($event.checked)\">\n {{'igo.geo.spatialFilter.drawControl' | translate}}\n </mat-slide-toggle>\n\n <mat-slide-toggle\n [checked]=\"labelsAreShown\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleLabels()\"\n >\n {{ 'igo.geo.draw.toggleMapTooltips' | translate }}\n </mat-slide-toggle>\n </div>\n\n <mat-divider></mat-divider>\n\n <div>\n <mat-form-field appearance=\"outline\" class=\"layer-select\">\n <mat-label>{{'igo.geo.draw.layer.title' | translate}}</mat-label>\n <mat-select #selectedLayer (selectionChange)=\"onLayerChange(selectedLayer.value)\" [value]=\"updateActiveLayer()\">\n <mat-option *ngFor=\"let layer of allLayers\" [value]=\"layer\">\n {{ layer.title }}\n </mat-option>\n <mat-option id=\"createNewLayer\" >\n {{'igo.geo.draw.layer.createNewLayer' | translate}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <button\n *ngIf=\"activeDrawingLayer\"\n mat-icon-button\n [color]=\"activeDrawingLayer.visible ? 'primary' : 'default'\"\n collapsibleButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"activeDrawingLayer.visible ?\n ('igo.geo.layer.hideLayer' | translate) :\n ('igo.geo.layer.showLayer' | translate)\"\n (click)=\"activeDrawingLayer.visible = !activeDrawingLayer.visible\">\n <mat-icon\n [svgIcon]=\"activeDrawingLayer.visible ? 'eye' : 'eye-off'\">\n </mat-icon>\n </button>\n </div>\n <mat-divider></mat-divider>\n <div>\n <button\n *ngIf=\"activeStore.count$.getValue() > 0\"\n class=\"deleteBtn\"\n mat-icon-button\n color=\"warn\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.draw.delete' | translate\"\n [disabled]=\"(selectedFeatures$ | async).length === 0\"\n (click)=\"deleteDrawings()\">\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n\n <div>\n <igo-entity-table\n #table\n class=\"table-compact\"\n [store]=\"activeStore\"\n [template]=\"tableTemplate\"\n (dblclick)=\"editLabelDrawing()\">\n </igo-entity-table>\n </div>\n </div>\n\n <div class=\"icon-options\">\n <mat-form-field *ngIf=\"icons.length >= 1\">\n <mat-label>{{ 'igo.geo.draw.icon' | translate }}</mat-label>\n <mat-select>\n <mat-select-trigger>\n <div *ngIf=\"icon\" class=\"box\">\n <img src=\"{{ icon }}\">\n </div>\n </mat-select-trigger>\n <mat-option value=\"\" (click)=\"onIconChange()\">{{ 'igo.geo.draw.noIcon' | translate }}</mat-option>\n <mat-option\n *ngFor=\"let icon_html of icons\"\n [value]=\"icon_html\"\n (click)=\"onIconChange(icon_html)\">\n <div class=\"box\">\n <img src=\"{{ icon_html }}\">\n </div>\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <button\n mat-icon-button\n color=\"accent\"\n disableRipple=\"true\"\n (click)=\"openShorcutsDialog()\"\n >\n <mat-icon\n class=\"shortcuts-icon\"\n svgIcon=\"keyboard-outline\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.draw.shortcuts' | translate\"\n >\n </mat-icon>\n </button>\n\n <button\n *ngIf=\"selectedFeatures$.value.length\"\n mat-raised-button\n color=\"primary\"\n (click)=\"openStyleModalDialog()\"\n [matTooltip]=\"'igo.geo.layer.style.styleModalTooltip' | translate\">\n {{'igo.geo.layer.style.styleModal' | translate}}\n <mat-icon\n class=\"style-icon\"\n svgIcon=\"palette\"\n [matBadge]=\"selectedFeatures$.value.length\"\n matBadgeColor=\"warn\"\n matBadgeSize=\"medium\">\n </mat-icon>\n </button>\n</div>\n", styles: [".geometry-type-toggle{padding:10px;text-align:center}.geometry-type-toggle mat-button-toggle-group{width:100%}.geometry-type-toggle mat-button-toggle-group mat-button-toggle{width:25%}.draw-options{overflow-x:hidden}.draw-options mat-slide-toggle{width:100%;margin:10px}.draw-options mat-slide-toggle ::ng-deep .mat-slide-toggle-content{width:calc(100% - 60px)}.icon-options{margin:5px 5px 0}.edition-drawing{padding:10px 0}img{width:100%;height:100%}.deleteBtn{margin-left:12px}.storeTable{height:auto!important}.layer-select{width:85%;padding:10px 10px 0%}.input-button-container{padding:10px}.input-button-container mat-form-field{width:25%}.input-button-container button{left:8px;bottom:10px}\n"] }]
19685
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <div class=\"geometry-type-toggle mat-typography\">\n <mat-button-toggle-group\n (change)=\"onGeometryTypeChange($event.value)\" [value]=\"geometryType.Point\">\n <mat-button-toggle [value]=\"geometryType.Point\">\n {{'igo.geo.draw.' + geometryType.Point | translate}}\n </mat-button-toggle>\n\n <mat-button-toggle [value]=\"geometryType.LineString\">\n {{'igo.geo.draw.' + geometryType.LineString | translate}}\n </mat-button-toggle>\n\n <mat-button-toggle [value]=\"geometryType.Polygon\">\n {{'igo.geo.draw.' + geometryType.Polygon | translate}}\n </mat-button-toggle>\n\n <mat-button-toggle [value]=\"geometryType.Circle\">\n {{'igo.geo.draw.' + geometryType.Circle | translate}}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n <div class=\"draw-options mat-typography\">\n <mat-slide-toggle\n [disabled]=\"drawControlIsDisabled\"\n [checked]=\"drawControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleDrawControl($event.checked)\">\n {{'igo.geo.spatialFilter.drawControl' | translate}}\n </mat-slide-toggle>\n\n <mat-slide-toggle\n [checked]=\"labelsAreShown\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleLabels()\">\n {{ 'igo.geo.draw.toggleMapTooltips' | translate }}\n </mat-slide-toggle>\n\n <mat-slide-toggle\n *ngIf=\"!isPoint()\"\n [checked]=\"freehandMode\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleFreehandMode($event)\">\n {{ 'igo.geo.draw.freehandMode' | translate }}\n </mat-slide-toggle>\n\n <div class=\"radius-unit\" *ngIf=\"isCircle()\">\n <form class=\"radius-form\">\n <mat-form-field class=\"radius\">\n <input\n matInput type=\"number\"\n min=\"0\"\n placeholder=\"{{ 'igo.geo.spatialFilter.radius' | translate }}\"\n [formControl]=\"radiusFormControl\"\n [readonly]=\"this.freehandMode\">\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"unit-field\">\n <mat-select\n [value]=\"measureUnit\"\n (selectionChange)=\"onMeasureUnitChange($event.value)\">\n <mat-option\n *ngFor=\"let measureUnit of measureUnits\"\n [value]=\"measureUnit\">\n {{('igo.geo.measure.' + measureUnit) | translate}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <mat-divider></mat-divider>\n\n <div>\n <mat-form-field appearance=\"outline\" class=\"layer-select\">\n <mat-label>{{'igo.geo.draw.layer.title' | translate}}</mat-label>\n <mat-select #selectedLayer (selectionChange)=\"onLayerChange(selectedLayer.value)\" [value]=\"updateActiveLayer()\">\n <mat-option *ngFor=\"let layer of allLayers\" [value]=\"layer\">\n {{ layer.title }}\n </mat-option>\n <mat-option id=\"createNewLayer\" >\n {{'igo.geo.draw.layer.createNewLayer' | translate}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <button\n *ngIf=\"activeDrawingLayer\"\n mat-icon-button\n [color]=\"activeDrawingLayer.visible ? 'primary' : 'default'\"\n collapsibleButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"activeDrawingLayer.visible ?\n ('igo.geo.layer.hideLayer' | translate) :\n ('igo.geo.layer.showLayer' | translate)\"\n (click)=\"activeDrawingLayer.visible = !activeDrawingLayer.visible\">\n <mat-icon\n [svgIcon]=\"activeDrawingLayer.visible ? 'eye' : 'eye-off'\">\n </mat-icon>\n </button>\n </div>\n <mat-divider></mat-divider>\n <div>\n <button\n *ngIf=\"activeStore.count$.getValue() > 0\"\n class=\"deleteBtn\"\n mat-icon-button\n color=\"warn\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.draw.delete' | translate\"\n [disabled]=\"(selectedFeatures$ | async).length === 0\"\n (click)=\"deleteDrawings()\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n\n <div>\n <igo-entity-table\n #table\n class=\"table-compact\"\n [store]=\"activeStore\"\n [template]=\"tableTemplate\">\n </igo-entity-table>\n </div>\n </div>\n\n <div class=\"icon-options\">\n <mat-form-field *ngIf=\"icons.length >= 1\">\n <mat-label>{{ 'igo.geo.draw.icon' | translate }}</mat-label>\n <mat-select>\n <mat-select-trigger>\n <div *ngIf=\"icon\" class=\"box\">\n <img src=\"{{ icon }}\">\n </div>\n </mat-select-trigger>\n <mat-option value=\"\" (click)=\"onIconChange()\">{{ 'igo.geo.draw.noIcon' | translate }}</mat-option>\n <mat-option\n *ngFor=\"let icon_html of icons\"\n [value]=\"icon_html\"\n (click)=\"onIconChange(icon_html)\">\n <div class=\"box\">\n <img src=\"{{ icon_html }}\">\n </div>\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <button\n mat-icon-button\n color=\"accent\"\n disableRipple=\"true\"\n (click)=\"openShorcutsDialog()\"\n >\n <mat-icon\n class=\"shortcuts-icon\"\n svgIcon=\"keyboard-outline\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.draw.shortcuts' | translate\"\n >\n </mat-icon>\n </button>\n\n <button\n *ngIf=\"selectedFeatures$.value.length\"\n mat-raised-button\n color=\"primary\"\n (click)=\"openStyleModalDialog()\"\n [matTooltip]=\"'igo.geo.layer.style.styleModalTooltip' | translate\">\n {{'igo.geo.layer.style.styleModal' | translate}}\n <mat-icon\n class=\"style-icon\"\n svgIcon=\"palette\"\n [matBadge]=\"selectedFeatures$.value.length\"\n matBadgeColor=\"warn\"\n matBadgeSize=\"medium\">\n </mat-icon>\n </button>\n</div>\n", styles: [".geometry-type-toggle{padding:10px;text-align:center}.geometry-type-toggle mat-button-toggle-group{width:100%}.geometry-type-toggle mat-button-toggle-group mat-button-toggle{width:25%}.draw-options{overflow-x:hidden}.draw-options mat-slide-toggle{width:100%;margin:10px}.draw-options mat-slide-toggle ::ng-deep .mat-slide-toggle-content{width:calc(100% - 60px)}.icon-options{margin:5px 5px 0}.edition-drawing{padding:10px 0}img{width:100%;height:100%}.deleteBtn{margin-left:12px}.storeTable{height:auto!important}.layer-select{width:85%;padding:10px 10px 0%}.input-button-container{padding:10px}.input-button-container mat-form-field{width:25%}.input-button-container button{left:8px;bottom:10px}.radius{display:flex;flex-flow:column nowrap;width:110%}.unit-field{width:110px;margin-left:30px}.radius-unit{display:flex;width:100%;margin-left:2px;padding:5px}::ng-deep igo-entity-table td:last-child{text-align:right!important}::ng-deep igo-entity-table td:last-child button{margin:0%!important}\n"] }]
18821
19686
  }], function () { return [{ type: i2$1.LanguageService }, { type: i2$2.UntypedFormBuilder }, { type: DrawStyleService }, { type: i1.MatDialog }, { type: DrawIconService }]; }, { map: [{
18822
19687
  type: Input
18823
19688
  }], stores: [{
@@ -19117,7 +19982,7 @@ StyleModalComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: StyleMo
19117
19982
  i0.ɵɵadvance(4);
19118
19983
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(51, 44, "igo.geo.draw.cancel"), " ");
19119
19984
  }
19120
- }, dependencies: [i13.MatFormField, i13.MatLabel, i13.MatSuffix, i14.MatInput, i2$2.ɵNgNoValidate, i2$2.DefaultValueAccessor, i2$2.NgControlStatus, i2$2.NgControlStatusGroup, i2$2.FormGroupDirective, i2$2.FormControlName, i1$1.NgForOf, i1$1.NgIf, i2.MatIcon, i3.MatButton, i15.MatSelect, i9.MatOption, i4.MatTooltip, i12.ColorPickerDirective, i7.TranslatePipe], styles: ["h2[_ngcontent-%COMP%]{font-weight:700;font-size:large}.igo-form[_ngcontent-%COMP%]{padding:10px}.fill-field[_ngcontent-%COMP%], .stroke-field[_ngcontent-%COMP%]{width:130px}.fill-color-picker[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{position:relative;top:7px}.fill-color-picker[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{left:8px}.stroke-color-picker[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{position:relative;top:7px}.stroke-color-picker[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{left:35px}.box[_ngcontent-%COMP%]{width:25px;height:25px}.edition-drawing[_ngcontent-%COMP%]{padding:10px 0}.igo-input-container[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] + .mat-form-field[_ngcontent-%COMP%]{margin-left:8px}.igo-form-input-box[_ngcontent-%COMP%]{width:150px}button[_ngcontent-%COMP%]{margin-right:5px}"] });
19985
+ }, dependencies: [i13.MatFormField, i13.MatLabel, i13.MatSuffix, i14.MatInput, i2$2.ɵNgNoValidate, i2$2.DefaultValueAccessor, i2$2.NgControlStatus, i2$2.NgControlStatusGroup, i2$2.FormGroupDirective, i2$2.FormControlName, i1$1.NgForOf, i1$1.NgIf, i2.MatIcon, i3.MatButton, i15.MatSelect, i9.MatOption, i4.MatTooltip, i12$1.ColorPickerDirective, i7.TranslatePipe], styles: ["h2[_ngcontent-%COMP%]{font-weight:700;font-size:large}.igo-form[_ngcontent-%COMP%]{padding:10px}.fill-field[_ngcontent-%COMP%], .stroke-field[_ngcontent-%COMP%]{width:130px}.fill-color-picker[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{position:relative;top:7px}.fill-color-picker[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{left:8px}.stroke-color-picker[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{position:relative;top:7px}.stroke-color-picker[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{left:35px}.box[_ngcontent-%COMP%]{width:25px;height:25px}.edition-drawing[_ngcontent-%COMP%]{padding:10px 0}.igo-input-container[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] + .mat-form-field[_ngcontent-%COMP%]{margin-left:8px}.igo-form-input-box[_ngcontent-%COMP%]{width:150px}button[_ngcontent-%COMP%]{margin-right:5px}"] });
19121
19986
  (function () {
19122
19987
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StyleModalComponent, [{
19123
19988
  type: Component,
@@ -19267,9 +20132,9 @@ IgoLayerModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [MatInputM
19267
20132
  TrackFeatureButtonComponent,
19268
20133
  StyleModalComponent] });
19269
20134
  })();
19270
- i0.ɵɵsetComponentScope(LayerItemComponent, [i1$1.NgClass, i1$1.NgIf, i2.MatIcon, i3.MatButton, i4.MatTooltip, i5.MatListItem, i9.MatLine, i5.MatListIconCssMatStyler, i7$1.MatBadge, i12$1.MatCheckbox, LayerLegendComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
20135
+ i0.ɵɵsetComponentScope(LayerItemComponent, [i1$1.NgClass, i1$1.NgIf, i2.MatIcon, i3.MatButton, i4.MatTooltip, i5.MatListItem, i9.MatLine, i5.MatListIconCssMatStyler, i7$1.MatBadge, i12.MatCheckbox, LayerLegendComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
19271
20136
  i0.ɵɵsetComponentScope(LayerLegendItemComponent, [i4.MatTooltip, i5.MatListItem, i9.MatLine, LayerLegendComponent], []);
19272
- i0.ɵɵsetComponentScope(LayerListComponent, [i2$2.NgControlStatus, i1$1.NgClass, i1$1.NgForOf, i1$1.NgIf, i1$1.NgTemplateOutlet, i2$2.NgModel, i11.MatDivider, i7$2.MatMenu, i7$2.MatMenuTrigger, i2.MatIcon, i3.MatButton, i4.MatTooltip, i5.MatList, i5.MatListItem, i13$1.MatSlider, i7$1.MatBadge, i12$1.MatCheckbox, i5$1.ListItemDirective, i5$1.ListComponent, i5$1.PanelComponent, LayerItemComponent,
20137
+ i0.ɵɵsetComponentScope(LayerListComponent, [i2$2.NgControlStatus, i1$1.NgClass, i1$1.NgForOf, i1$1.NgIf, i1$1.NgTemplateOutlet, i2$2.NgModel, i11.MatDivider, i7$2.MatMenu, i7$2.MatMenuTrigger, i2.MatIcon, i3.MatButton, i4.MatTooltip, i5.MatList, i5.MatListItem, i13$1.MatSlider, i7$1.MatBadge, i12.MatCheckbox, i5$1.ListItemDirective, i5$1.ListComponent, i5$1.PanelComponent, LayerItemComponent,
19273
20138
  LayerListToolComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
19274
20139
  i0.ɵɵsetComponentScope(LayerLegendListComponent, [i1$1.NgForOf, i1$1.NgIf, i11.MatDivider, i23.MatSlideToggle, i4.MatTooltip, i5$1.ListItemDirective, i5$1.ListComponent, LayerLegendItemComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
19275
20140
 
@@ -20675,7 +21540,9 @@ IgoDrawModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [FormsModul
20675
21540
  IgoEntityTableModule,
20676
21541
  ColorPickerModule,
20677
21542
  BrowserModule,
20678
- BrowserAnimationsModule] });
21543
+ BrowserAnimationsModule,
21544
+ MatRadioModule,
21545
+ MatCheckboxModule] });
20679
21546
  (function () {
20680
21547
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IgoDrawModule, [{
20681
21548
  type: NgModule,
@@ -20701,7 +21568,9 @@ IgoDrawModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [FormsModul
20701
21568
  IgoEntityTableModule,
20702
21569
  ColorPickerModule,
20703
21570
  BrowserModule,
20704
- BrowserAnimationsModule
21571
+ BrowserAnimationsModule,
21572
+ MatRadioModule,
21573
+ MatCheckboxModule
20705
21574
  ],
20706
21575
  declarations: [DrawComponent, DrawPopupComponent, DrawLayerPopupComponent, DrawShorcutsComponent],
20707
21576
  exports: [DrawComponent]
@@ -20729,7 +21598,9 @@ IgoDrawModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [FormsModul
20729
21598
  IgoEntityTableModule,
20730
21599
  ColorPickerModule,
20731
21600
  BrowserModule,
20732
- BrowserAnimationsModule], exports: [DrawComponent] });
21601
+ BrowserAnimationsModule,
21602
+ MatRadioModule,
21603
+ MatCheckboxModule], exports: [DrawComponent] });
20733
21604
  })();
20734
21605
 
20735
21606
  class IgoDrawingToolModule {
@@ -22969,6 +23840,14 @@ class GeometryFormFieldInputComponent {
22969
23840
  }
22970
23841
  this.toggleControl();
22971
23842
  }
23843
+ /**
23844
+ * Whether freehand draw control should be active or not
23845
+ */
23846
+ get predefinedRadius() { return this._predefinedRadius; }
23847
+ set predefinedRadius(value) {
23848
+ this._predefinedRadius = value;
23849
+ this.drawControl.ispredefinedRadius$.next(value);
23850
+ }
22972
23851
  /**
22973
23852
  * Style for the draw control (applies while the geometry is being drawn)
22974
23853
  */
@@ -23349,7 +24228,7 @@ class GeometryFormFieldInputComponent {
23349
24228
  }
23350
24229
  }
23351
24230
  GeometryFormFieldInputComponent.ɵfac = function GeometryFormFieldInputComponent_Factory(t) { return new (t || GeometryFormFieldInputComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i2$2.NgControl, 10)); };
23352
- GeometryFormFieldInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GeometryFormFieldInputComponent, selectors: [["igo-geometry-form-field-input"]], inputs: { map: "map", geometryType: "geometryType", drawGuide: "drawGuide", measure: "measure", drawControlIsActive: "drawControlIsActive", freehandDrawIsActive: "freehandDrawIsActive", controlOptions: "controlOptions", drawStyle: "drawStyle", overlayStyle: "overlayStyle", value: "value", radius: "radius" }, decls: 1, vars: 0, template: function GeometryFormFieldInputComponent_Template(rf, ctx) {
24231
+ GeometryFormFieldInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GeometryFormFieldInputComponent, selectors: [["igo-geometry-form-field-input"]], inputs: { map: "map", geometryType: "geometryType", drawGuide: "drawGuide", measure: "measure", drawControlIsActive: "drawControlIsActive", freehandDrawIsActive: "freehandDrawIsActive", predefinedRadius: "predefinedRadius", controlOptions: "controlOptions", drawStyle: "drawStyle", overlayStyle: "overlayStyle", value: "value", radius: "radius" }, decls: 1, vars: 0, template: function GeometryFormFieldInputComponent_Template(rf, ctx) {
23353
24232
  if (rf & 1) {
23354
24233
  i0.ɵɵtemplate(0, GeometryFormFieldInputComponent_ng_template_0_Template, 0, 0, "ng-template");
23355
24234
  }
@@ -23376,6 +24255,8 @@ GeometryFormFieldInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
23376
24255
  type: Input
23377
24256
  }], freehandDrawIsActive: [{
23378
24257
  type: Input
24258
+ }], predefinedRadius: [{
24259
+ type: Input
23379
24260
  }], controlOptions: [{
23380
24261
  type: Input
23381
24262
  }], drawStyle: [{
@@ -24716,7 +25597,7 @@ TimeFilterListBindingDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ ty
24716
25597
  class WktService {
24717
25598
  constructor() { }
24718
25599
  wktToFeature(wkt, wktProj, featureProj) {
24719
- return new olWKT().readFeature(wkt, {
25600
+ return new olFormatWKT().readFeature(wkt, {
24720
25601
  dataProjection: wktProj,
24721
25602
  featureProjection: featureProj
24722
25603
  });
@@ -28487,6 +29368,7 @@ class SpatialFilterItemComponent {
28487
29368
  this.measureUnitChange = new EventEmitter();
28488
29369
  this.radiusEvent = new EventEmitter();
28489
29370
  this.freehandControl = new EventEmitter();
29371
+ this.predefinedRadius = new EventEmitter();
28490
29372
  this.clearButtonEvent = new EventEmitter();
28491
29373
  this.clearSearchEvent = new EventEmitter();
28492
29374
  this.export = new EventEmitter();
@@ -28954,6 +29836,16 @@ class SpatialFilterItemComponent {
28954
29836
  onfreehandControlChange() {
28955
29837
  this.freehandDrawIsActive = !this.freehandDrawIsActive;
28956
29838
  this.freehandControl.emit(this.freehandDrawIsActive);
29839
+ if (this.isPoint()) {
29840
+ this.predefinedRadius.emit(!this.freehandDrawIsActive);
29841
+ if (this.freehandDrawIsActive) {
29842
+ this.overlayStyle$.next(undefined);
29843
+ this.drawStyle$.next(undefined);
29844
+ }
29845
+ }
29846
+ else {
29847
+ this.predefinedRadius.emit(false);
29848
+ }
28957
29849
  }
28958
29850
  /**
28959
29851
  * Launch search button
@@ -29142,7 +30034,7 @@ class SpatialFilterItemComponent {
29142
30034
  }
29143
30035
  }
29144
30036
  SpatialFilterItemComponent.ɵfac = function SpatialFilterItemComponent_Factory(t) { return new (t || SpatialFilterItemComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(SpatialFilterService), i0.ɵɵdirectiveInject(i2$1.MessageService), i0.ɵɵdirectiveInject(i2$1.LanguageService)); };
29145
- SpatialFilterItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SpatialFilterItemComponent, selectors: [["igo-spatial-filter-item"]], inputs: { map: "map", type: "type", queryType: "queryType", zone: "zone", loading: "loading", store: "store", layers: "layers", allLayers: "allLayers", thematicLength: "thematicLength" }, outputs: { toggleSearch: "toggleSearch", itemTypeChange: "itemTypeChange", thematicChange: "thematicChange", drawZoneEvent: "drawZoneEvent", bufferEvent: "bufferEvent", zoneWithBufferChange: "zoneWithBufferChange", measureUnitChange: "measureUnitChange", radiusEvent: "radiusEvent", freehandControl: "freehandControl", clearButtonEvent: "clearButtonEvent", clearSearchEvent: "clearSearchEvent", export: "export", openWorkspace: "openWorkspace", entityChange: "entityChange" }, decls: 29, vars: 42, consts: [[3, "formControl", "map", "geometryType", "drawGuide", "measure", "drawControlIsActive", "freehandDrawIsActive", "drawStyle", "overlayStyle", "radius"], [1, "header"], [3, "checked", "labelPosition", "change", 4, "ngIf"], ["class", "buffer-unit", 4, "ngIf"], ["class", "radius-unit", 4, "ngIf"], [1, "title", "mat-typography"], [3, "value"], [3, "value", "change", 4, "ngFor", "ngForOf"], ["class", "thematics", 4, "ngIf"], [1, "buttons"], ["mat-raised-button", "", "class", "clear-search-button", 3, "disabled", "click", 4, "ngIf"], ["mat-raised-button", "", "class", "clear-form-button", 3, "disabled", "click", 4, "ngIf"], ["mat-raised-button", "", "color", "primary", 1, "search-button", 3, "disabled", "click"], ["mat-raised-button", "", 1, "remove-button", 3, "disabled", "click"], ["mat-raised-button", "", 1, "export-button", 3, "disabled", "click"], ["class", "chevron-down", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], ["class", "results", 4, "ngIf"], [3, "checked", "labelPosition", "change"], [1, "buffer-unit"], [1, "buffer-form"], [1, "buffer"], ["type", "number", "matInput", "", 3, "placeholder", "formControl", "value", "readonly"], [1, "unit-field"], [3, "value", "selectionChange"], [3, "value", 4, "ngFor", "ngForOf"], [1, "radius-unit"], [1, "radius-form"], [1, "radius"], ["type", "number", "matInput", "", 3, "placeholder", "formControl", "value", "readonly", "input"], [3, "value", "change"], [1, "thematics"], ["matColumnDef", "name"], ["class", "thematics-header", 4, "matHeaderCellDef"], ["matColumnDef", "select"], ["class", "checks-header", 4, "matHeaderCellDef"], [4, "matHeaderRowDef"], [4, "matRowDef", "matRowDefColumns"], [3, "dataSource", "treeControl"], ["matTreeNodeToggle", "", 4, "matTreeNodeDef"], [4, "matTreeNodeDef", "matTreeNodeDefWhen"], [1, "thematics-header"], [1, "checks-header"], [3, "checked", "indeterminate", "change"], ["matTreeNodeToggle", ""], [1, "mat-tree-node"], ["mat-icon-button", "", "disabled", ""], [1, "tree-check", 3, "checked", "click", "change"], ["mat-icon-button", "", 3, "click"], [3, "svgIcon"], [1, "tree-check-2", 3, "checked", "indeterminate", "change"], [1, "tree-ul"], ["matTreeNodeOutlet", ""], ["mat-raised-button", "", 1, "clear-search-button", 3, "disabled", "click"], ["mat-raised-button", "", 1, "clear-form-button", 3, "disabled", "click"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "chevron-down", 3, "matTooltip", "click"], ["svgIcon", "chevron-down"], [1, "results"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], [1, "results-list", 3, "template", "store", "entitySelectChange"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click"], ["svgIcon", "chevron-up"]], template: function SpatialFilterItemComponent_Template(rf, ctx) {
30037
+ SpatialFilterItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SpatialFilterItemComponent, selectors: [["igo-spatial-filter-item"]], inputs: { map: "map", type: "type", queryType: "queryType", zone: "zone", loading: "loading", store: "store", layers: "layers", allLayers: "allLayers", thematicLength: "thematicLength" }, outputs: { toggleSearch: "toggleSearch", itemTypeChange: "itemTypeChange", thematicChange: "thematicChange", drawZoneEvent: "drawZoneEvent", bufferEvent: "bufferEvent", zoneWithBufferChange: "zoneWithBufferChange", measureUnitChange: "measureUnitChange", radiusEvent: "radiusEvent", freehandControl: "freehandControl", predefinedRadius: "predefinedRadius", clearButtonEvent: "clearButtonEvent", clearSearchEvent: "clearSearchEvent", export: "export", openWorkspace: "openWorkspace", entityChange: "entityChange" }, decls: 29, vars: 43, consts: [[3, "formControl", "map", "geometryType", "drawGuide", "measure", "drawControlIsActive", "freehandDrawIsActive", "drawStyle", "overlayStyle", "radius", "predefinedRadius"], [1, "header"], [3, "checked", "labelPosition", "change", 4, "ngIf"], ["class", "buffer-unit", 4, "ngIf"], ["class", "radius-unit", 4, "ngIf"], [1, "title", "mat-typography"], [3, "value"], [3, "value", "change", 4, "ngFor", "ngForOf"], ["class", "thematics", 4, "ngIf"], [1, "buttons"], ["mat-raised-button", "", "class", "clear-search-button", 3, "disabled", "click", 4, "ngIf"], ["mat-raised-button", "", "class", "clear-form-button", 3, "disabled", "click", 4, "ngIf"], ["mat-raised-button", "", "color", "primary", 1, "search-button", 3, "disabled", "click"], ["mat-raised-button", "", 1, "remove-button", 3, "disabled", "click"], ["mat-raised-button", "", 1, "export-button", 3, "disabled", "click"], ["class", "chevron-down", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], ["class", "results", 4, "ngIf"], [3, "checked", "labelPosition", "change"], [1, "buffer-unit"], [1, "buffer-form"], [1, "buffer"], ["type", "number", "matInput", "", 3, "placeholder", "formControl", "value", "readonly"], [1, "unit-field"], [3, "value", "selectionChange"], [3, "value", 4, "ngFor", "ngForOf"], [1, "radius-unit"], [1, "radius-form"], [1, "radius"], ["type", "number", "matInput", "", 3, "placeholder", "formControl", "value", "readonly", "input"], [3, "value", "change"], [1, "thematics"], ["matColumnDef", "name"], ["class", "thematics-header", 4, "matHeaderCellDef"], ["matColumnDef", "select"], ["class", "checks-header", 4, "matHeaderCellDef"], [4, "matHeaderRowDef"], [4, "matRowDef", "matRowDefColumns"], [3, "dataSource", "treeControl"], ["matTreeNodeToggle", "", 4, "matTreeNodeDef"], [4, "matTreeNodeDef", "matTreeNodeDefWhen"], [1, "thematics-header"], [1, "checks-header"], [3, "checked", "indeterminate", "change"], ["matTreeNodeToggle", ""], [1, "mat-tree-node"], ["mat-icon-button", "", "disabled", ""], [1, "tree-check", 3, "checked", "click", "change"], ["mat-icon-button", "", 3, "click"], [3, "svgIcon"], [1, "tree-check-2", 3, "checked", "indeterminate", "change"], [1, "tree-ul"], ["matTreeNodeOutlet", ""], ["mat-raised-button", "", 1, "clear-search-button", 3, "disabled", "click"], ["mat-raised-button", "", 1, "clear-form-button", 3, "disabled", "click"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "chevron-down", 3, "matTooltip", "click"], ["svgIcon", "chevron-down"], [1, "results"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], [1, "results-list", 3, "template", "store", "entitySelectChange"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click"], ["svgIcon", "chevron-up"]], template: function SpatialFilterItemComponent_Template(rf, ctx) {
29146
30038
  if (rf & 1) {
29147
30039
  i0.ɵɵelement(0, "igo-geometry-form-field-input", 0);
29148
30040
  i0.ɵɵpipe(1, "async");
@@ -29184,7 +30076,7 @@ SpatialFilterItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
29184
30076
  i0.ɵɵtemplate(28, SpatialFilterItemComponent_div_28_Template, 3, 3, "div", 16);
29185
30077
  }
29186
30078
  if (rf & 2) {
29187
- i0.ɵɵproperty("formControl", ctx.formControl)("map", ctx.map)("geometryType", ctx.geometryType)("drawGuide", i0.ɵɵpipeBind1(1, 28, ctx.drawGuide$))("measure", ctx.measure)("drawControlIsActive", ctx.drawControlIsActive)("freehandDrawIsActive", ctx.freehandDrawIsActive)("drawStyle", i0.ɵɵpipeBind1(2, 30, ctx.drawStyle$))("overlayStyle", i0.ɵɵpipeBind1(3, 32, ctx.overlayStyle$))("radius", ctx.radius);
30079
+ i0.ɵɵproperty("formControl", ctx.formControl)("map", ctx.map)("geometryType", ctx.geometryType)("drawGuide", i0.ɵɵpipeBind1(1, 29, ctx.drawGuide$))("measure", ctx.measure)("drawControlIsActive", ctx.drawControlIsActive)("freehandDrawIsActive", ctx.freehandDrawIsActive)("drawStyle", i0.ɵɵpipeBind1(2, 31, ctx.drawStyle$))("overlayStyle", i0.ɵɵpipeBind1(3, 33, ctx.overlayStyle$))("radius", ctx.radius)("predefinedRadius", ctx.predefinedRadius);
29188
30080
  i0.ɵɵadvance(5);
29189
30081
  i0.ɵɵproperty("ngIf", !ctx.isPredefined());
29190
30082
  i0.ɵɵadvance(1);
@@ -29194,7 +30086,7 @@ SpatialFilterItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
29194
30086
  i0.ɵɵadvance(1);
29195
30087
  i0.ɵɵproperty("ngIf", ctx.isPoint());
29196
30088
  i0.ɵɵadvance(2);
29197
- i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(11, 34, "igo.geo.spatialFilter.search"), " : ");
30089
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(11, 35, "igo.geo.spatialFilter.search"), " : ");
29198
30090
  i0.ɵɵadvance(2);
29199
30091
  i0.ɵɵproperty("value", ctx.selectedItemType);
29200
30092
  i0.ɵɵadvance(1);
@@ -29208,15 +30100,15 @@ SpatialFilterItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
29208
30100
  i0.ɵɵadvance(1);
29209
30101
  i0.ɵɵproperty("disabled", ctx.disableSearchButton());
29210
30102
  i0.ɵɵadvance(1);
29211
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 36, "igo.geo.spatialFilter.goSearch"), " ");
30103
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 37, "igo.geo.spatialFilter.goSearch"), " ");
29212
30104
  i0.ɵɵadvance(2);
29213
30105
  i0.ɵɵproperty("disabled", ctx.allLayers.length === 0);
29214
30106
  i0.ɵɵadvance(1);
29215
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(23, 38, "igo.geo.spatialFilter.removeLayer"), " ");
30107
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(23, 39, "igo.geo.spatialFilter.removeLayer"), " ");
29216
30108
  i0.ɵɵadvance(2);
29217
30109
  i0.ɵɵproperty("disabled", !ctx.store.entities$.getValue().length);
29218
30110
  i0.ɵɵadvance(1);
29219
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(26, 40, "igo.geo.spatialFilter.exportLayer"), " ");
30111
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(26, 41, "igo.geo.spatialFilter.exportLayer"), " ");
29220
30112
  i0.ɵɵadvance(2);
29221
30113
  i0.ɵɵproperty("ngIf", ctx.store.all().length && ctx.tableTemplate && !ctx.listIsVisible);
29222
30114
  i0.ɵɵadvance(1);
@@ -29226,7 +30118,7 @@ SpatialFilterItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
29226
30118
  (function () {
29227
30119
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SpatialFilterItemComponent, [{
29228
30120
  type: Component,
29229
- args: [{ selector: 'igo-spatial-filter-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-geometry-form-field-input\n [formControl]=\"formControl\"\n [map]=\"map\"\n [geometryType]=\"geometryType\"\n [drawGuide]=\"drawGuide$ | async\"\n [measure]=\"measure\"\n [drawControlIsActive]=\"drawControlIsActive\"\n [freehandDrawIsActive]=\"freehandDrawIsActive\"\n [drawStyle]=\"drawStyle$ | async\"\n [overlayStyle]=\"overlayStyle$ | async\"\n [radius]=\"radius\">\n</igo-geometry-form-field-input>\n\n<div class=\"header\">\n <mat-slide-toggle *ngIf=\"!isPredefined()\"\n [checked]=\"drawControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onDrawControlChange()\">\n {{'igo.geo.spatialFilter.drawControl' | translate}}\n </mat-slide-toggle>\n <mat-slide-toggle *ngIf=\"!isPredefined()\"\n [checked]=\"freehandDrawIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onfreehandControlChange()\">\n {{'igo.geo.spatialFilter.freehandControl' | translate}}\n </mat-slide-toggle>\n</div>\n\n<div class=\"buffer-unit\" *ngIf=\"isPolygon()\">\n <form class=\"buffer-form\">\n <mat-form-field class=\"buffer\">\n <input type=\"number\" matInput placeholder=\"{{'igo.geo.spatialFilter.buffer' | translate}}\" [formControl]=\"bufferFormControl\"\n [value]=\"0\" [readonly]=\"this.formControl.value === null\">\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"unit-field\">\n <mat-select\n [value]=\"measureUnit\"\n (selectionChange)=\"onMeasureUnitChange($event.value)\">\n <mat-option *ngFor=\"let measureUnit of measureUnits\" [value]=\"measureUnit\">\n {{('igo.geo.measure.' + measureUnit) | translate}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n\n<div class=\"radius-unit\" *ngIf=\"isPoint()\">\n <form class=\"radius-form\">\n <mat-form-field class=\"radius\">\n <input type=\"number\" matInput placeholder=\"{{'igo.geo.spatialFilter.radius' | translate}}\" [formControl]=\"radiusFormControl\"\n [value]=\"1000\" (input)=\"getRadius()\" [readonly]=\"this.freehandDrawIsActive && this.formControl.value === null\">\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"unit-field\">\n <mat-select\n [value]=\"measureUnit\"\n (selectionChange)=\"onMeasureUnitChange($event.value)\">\n <mat-option *ngFor=\"let measureUnit of measureUnits\" [value]=\"measureUnit\">\n {{('igo.geo.measure.' + measureUnit) | translate}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n\n<mat-label class=\"title mat-typography\">{{'igo.geo.spatialFilter.search' | translate}} : </mat-label>\n<mat-radio-group [value]=\"selectedItemType\">\n <mat-radio-button *ngFor=\"let item of itemType\"\n [value]=\"item\"\n (change)=\"onItemTypeChange($event)\">\n {{'igo.geo.spatialFilter.' + item | translate}}\n </mat-radio-button>\n</mat-radio-group>\n\n<div class=\"thematics\" *ngIf=\"(selectedItemType==='Thematics' && !tableTemplate) || (selectedItemType==='Thematics' && tableTemplate && !listIsVisible)\">\n <mat-table>\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <mat-header-cell *matHeaderCellDef class=\"thematics-header\">{{'igo.geo.spatialFilter.Thematics' | translate}}</mat-header-cell>\n </ng-container>\n\n <!-- Select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef class=\"checks-header\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"selectedThematics.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n\n </mat-table>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle>\n <li class=\"mat-tree-node\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n {{node.name}}\n <mat-checkbox class=\"tree-check\" (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? onToggleChange(node) : null\"\n [checked]=\"selectedThematics.isSelected(node)\">\n </mat-checkbox>\n </li>\n </mat-tree-node>\n\n <!-- This is the tree node template for expandable nodes -->\n <mat-nested-tree-node *matTreeNodeDef=\"let node; when: hasChild\">\n <div class=\"mat-tree-node\">\n <button mat-icon-button\n (click)=\"onToggleClick(node)\">\n <mat-icon [svgIcon]=\"treeControl.isExpanded(node) ? 'chevron-down' : 'chevron-right'\"></mat-icon>\n </button>\n {{node.name}}\n <mat-checkbox class=\"tree-check-2\" (change)=\"$event ? childrensToggle(node) : null\"\n [checked]=\"isAllSelected(node)\"\n [indeterminate]=\"hasChildrenSelected(node) && !isAllSelected(node)\">\n </mat-checkbox>\n </div>\n <ul class=\"tree-ul\" [class.example-tree-invisible]=\"!treeControl.isExpanded(node)\">\n <ng-container matTreeNodeOutlet></ng-container>\n </ul>\n </mat-nested-tree-node>\n\n </mat-tree>\n</div>\n\n<div class=\"buttons\">\n\n <button *ngIf=\"isPredefined()\" mat-raised-button class=\"clear-search-button\" [disabled]=\"disabledClearSearch()\"\n (click)=\"clearSearch()\">\n {{'igo.geo.spatialFilter.clearSearch' | translate}}\n </button>\n\n <button *ngIf=\"isPolygon() || isPoint()\" mat-raised-button class=\"clear-form-button\" [disabled]=\"this.formControl.value === null\"\n (click)=\"clearDrawZone()\">\n {{'igo.geo.spatialFilter.clearForm' | translate}}\n </button>\n\n <button mat-raised-button class=\"search-button\" [disabled]=\"disableSearchButton()\" color=\"primary\"\n (click)=\"toggleSearchButton()\">\n {{'igo.geo.spatialFilter.goSearch' | translate}}\n </button>\n\n <button mat-raised-button class=\"remove-button\" [disabled]=\"allLayers.length === 0\" (click)=\"clearButton()\">\n {{'igo.geo.spatialFilter.removeLayer' | translate}}\n </button>\n\n <button mat-raised-button class=\"export-button\" [disabled]=\"!store.entities$.getValue().length\" (click)=\"export.emit()\">\n {{'igo.geo.spatialFilter.exportLayer' | translate}}\n </button>\n\n</div>\n\n<button\n class=\"chevron-down\"\n *ngIf=\"store.all().length && tableTemplate && !listIsVisible\"\n mat-icon-button\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.spatialFilter.showSearchResults' | translate\"\n (click)=\"toggleVisibleList()\">\n <mat-icon svgIcon=\"chevron-down\"></mat-icon>\n</button>\n\n<div class=\"results\" *ngIf=\"store.all().length && tableTemplate && listIsVisible\">\n <button\n *ngIf=\"listIsVisible\"\n mat-icon-button\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.spatialFilter.hideSearchResults' | translate\"\n (click)=\"toggleVisibleList()\">\n <mat-icon svgIcon=\"chevron-up\"></mat-icon>\n </button>\n <igo-entity-table\n class=\"results-list\"\n [template]=\"tableTemplate\"\n [store]=\"store\"\n (entitySelectChange)=\"entityChange.emit($event)\">\n </igo-entity-table>\n</div>\n", styles: [".header{margin-top:5px;width:100%}.mat-slide-toggle{padding:5px;margin-bottom:15px;width:98%}.mat-slide-toggle ::ng-deep .mat-slide-toggle-content{width:calc(100% - 20px)}.title{margin-left:5px;font-size:medium;font-size:initial}.mat-radio-group{display:flex;flex-direction:column;padding-top:10px}.mat-radio-button{display:inline-flex;position:relative;margin-left:16px;margin-top:10px}.mat-form-field{margin-top:5px}.mat-column-select{overflow:auto}.buttons{margin-top:15px}.search-button{left:15px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.search-button{left:10px;width:45%;min-height:35px;white-space:normal;line-height:normal}}.export-button{left:15px;width:46%;margin-bottom:5px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.export-button{left:10px;margin-top:10px;width:45%;min-height:35px;white-space:normal;line-height:normal}}.remove-button{margin-top:12px;left:5px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.remove-button{margin:0;width:45%;min-height:35px;white-space:normal;line-height:normal}}.clear-form-button{left:5px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.clear-form-button{width:45%;min-height:35px;white-space:normal;line-height:normal}}.clear-search-button{left:5px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.clear-search-button{width:45%;min-height:35px;white-space:normal;line-height:normal}}.thematics{max-height:35%;overflow:auto;margin-top:5px;width:98%}.results{overflow:auto;max-height:250px;width:98%}.mat-column-typeResults{max-width:100px;margin-right:5px}.buffer-unit,.radius-unit{display:flex;width:100%;margin-left:2px;padding:5px}.radius,.buffer{display:flex;flex-flow:column nowrap;width:110%}.unit-field{width:110px;margin-left:30px}.example-tree-invisible{display:none}.tree-ul{margin:0;padding:0 0 0 20px;list-style-type:none}.tree-check,.tree-check-2{position:relative;margin-left:auto;margin-right:5px}.thematics-header{max-width:250px}.checks-header{padding:none;max-width:calc(100% - 316px);overflow:hidden}.mat-checkbox{padding:5px}.mat-tree-node{position:relative;min-height:42px;width:280px}.mat-header-cell{height:56px}.results{max-height:45%;width:98%}.results igo-entity-table ::ng-deep div.table-container{overflow:visible;overflow:initial}\n"] }]
30121
+ args: [{ selector: 'igo-spatial-filter-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-geometry-form-field-input\n [formControl]=\"formControl\"\n [map]=\"map\"\n [geometryType]=\"geometryType\"\n [drawGuide]=\"drawGuide$ | async\"\n [measure]=\"measure\"\n [drawControlIsActive]=\"drawControlIsActive\"\n [freehandDrawIsActive]=\"freehandDrawIsActive\"\n [drawStyle]=\"drawStyle$ | async\"\n [overlayStyle]=\"overlayStyle$ | async\"\n [radius]=\"radius\"\n [predefinedRadius]=\"predefinedRadius\">\n</igo-geometry-form-field-input>\n\n<div class=\"header\">\n <mat-slide-toggle *ngIf=\"!isPredefined()\"\n [checked]=\"drawControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onDrawControlChange()\">\n {{'igo.geo.spatialFilter.drawControl' | translate}}\n </mat-slide-toggle>\n <mat-slide-toggle *ngIf=\"!isPredefined()\"\n [checked]=\"freehandDrawIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onfreehandControlChange()\">\n {{'igo.geo.spatialFilter.freehandControl' | translate}}\n </mat-slide-toggle>\n</div>\n\n<div class=\"buffer-unit\" *ngIf=\"isPolygon()\">\n <form class=\"buffer-form\">\n <mat-form-field class=\"buffer\">\n <input type=\"number\" matInput placeholder=\"{{'igo.geo.spatialFilter.buffer' | translate}}\" [formControl]=\"bufferFormControl\"\n [value]=\"0\" [readonly]=\"this.formControl.value === null\">\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"unit-field\">\n <mat-select\n [value]=\"measureUnit\"\n (selectionChange)=\"onMeasureUnitChange($event.value)\">\n <mat-option *ngFor=\"let measureUnit of measureUnits\" [value]=\"measureUnit\">\n {{('igo.geo.measure.' + measureUnit) | translate}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n\n<div class=\"radius-unit\" *ngIf=\"isPoint()\">\n <form class=\"radius-form\">\n <mat-form-field class=\"radius\">\n <input type=\"number\" matInput placeholder=\"{{'igo.geo.spatialFilter.radius' | translate}}\" [formControl]=\"radiusFormControl\"\n [value]=\"1000\" (input)=\"getRadius()\" [readonly]=\"this.freehandDrawIsActive && this.formControl.value === null\">\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"unit-field\">\n <mat-select\n [value]=\"measureUnit\"\n (selectionChange)=\"onMeasureUnitChange($event.value)\">\n <mat-option *ngFor=\"let measureUnit of measureUnits\" [value]=\"measureUnit\">\n {{('igo.geo.measure.' + measureUnit) | translate}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n\n<mat-label class=\"title mat-typography\">{{'igo.geo.spatialFilter.search' | translate}} : </mat-label>\n<mat-radio-group [value]=\"selectedItemType\">\n <mat-radio-button *ngFor=\"let item of itemType\"\n [value]=\"item\"\n (change)=\"onItemTypeChange($event)\">\n {{'igo.geo.spatialFilter.' + item | translate}}\n </mat-radio-button>\n</mat-radio-group>\n\n<div class=\"thematics\" *ngIf=\"(selectedItemType==='Thematics' && !tableTemplate) || (selectedItemType==='Thematics' && tableTemplate && !listIsVisible)\">\n <mat-table>\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <mat-header-cell *matHeaderCellDef class=\"thematics-header\">{{'igo.geo.spatialFilter.Thematics' | translate}}</mat-header-cell>\n </ng-container>\n\n <!-- Select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef class=\"checks-header\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"selectedThematics.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n\n </mat-table>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle>\n <li class=\"mat-tree-node\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n {{node.name}}\n <mat-checkbox class=\"tree-check\" (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? onToggleChange(node) : null\"\n [checked]=\"selectedThematics.isSelected(node)\">\n </mat-checkbox>\n </li>\n </mat-tree-node>\n\n <!-- This is the tree node template for expandable nodes -->\n <mat-nested-tree-node *matTreeNodeDef=\"let node; when: hasChild\">\n <div class=\"mat-tree-node\">\n <button mat-icon-button\n (click)=\"onToggleClick(node)\">\n <mat-icon [svgIcon]=\"treeControl.isExpanded(node) ? 'chevron-down' : 'chevron-right'\"></mat-icon>\n </button>\n {{node.name}}\n <mat-checkbox class=\"tree-check-2\" (change)=\"$event ? childrensToggle(node) : null\"\n [checked]=\"isAllSelected(node)\"\n [indeterminate]=\"hasChildrenSelected(node) && !isAllSelected(node)\">\n </mat-checkbox>\n </div>\n <ul class=\"tree-ul\" [class.example-tree-invisible]=\"!treeControl.isExpanded(node)\">\n <ng-container matTreeNodeOutlet></ng-container>\n </ul>\n </mat-nested-tree-node>\n\n </mat-tree>\n</div>\n\n<div class=\"buttons\">\n\n <button *ngIf=\"isPredefined()\" mat-raised-button class=\"clear-search-button\" [disabled]=\"disabledClearSearch()\"\n (click)=\"clearSearch()\">\n {{'igo.geo.spatialFilter.clearSearch' | translate}}\n </button>\n\n <button *ngIf=\"isPolygon() || isPoint()\" mat-raised-button class=\"clear-form-button\" [disabled]=\"this.formControl.value === null\"\n (click)=\"clearDrawZone()\">\n {{'igo.geo.spatialFilter.clearForm' | translate}}\n </button>\n\n <button mat-raised-button class=\"search-button\" [disabled]=\"disableSearchButton()\" color=\"primary\"\n (click)=\"toggleSearchButton()\">\n {{'igo.geo.spatialFilter.goSearch' | translate}}\n </button>\n\n <button mat-raised-button class=\"remove-button\" [disabled]=\"allLayers.length === 0\" (click)=\"clearButton()\">\n {{'igo.geo.spatialFilter.removeLayer' | translate}}\n </button>\n\n <button mat-raised-button class=\"export-button\" [disabled]=\"!store.entities$.getValue().length\" (click)=\"export.emit()\">\n {{'igo.geo.spatialFilter.exportLayer' | translate}}\n </button>\n\n</div>\n\n<button\n class=\"chevron-down\"\n *ngIf=\"store.all().length && tableTemplate && !listIsVisible\"\n mat-icon-button\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.spatialFilter.showSearchResults' | translate\"\n (click)=\"toggleVisibleList()\">\n <mat-icon svgIcon=\"chevron-down\"></mat-icon>\n</button>\n\n<div class=\"results\" *ngIf=\"store.all().length && tableTemplate && listIsVisible\">\n <button\n *ngIf=\"listIsVisible\"\n mat-icon-button\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.spatialFilter.hideSearchResults' | translate\"\n (click)=\"toggleVisibleList()\">\n <mat-icon svgIcon=\"chevron-up\"></mat-icon>\n </button>\n <igo-entity-table\n class=\"results-list\"\n [template]=\"tableTemplate\"\n [store]=\"store\"\n (entitySelectChange)=\"entityChange.emit($event)\">\n </igo-entity-table>\n</div>\n", styles: [".header{margin-top:5px;width:100%}.mat-slide-toggle{padding:5px;margin-bottom:15px;width:98%}.mat-slide-toggle ::ng-deep .mat-slide-toggle-content{width:calc(100% - 20px)}.title{margin-left:5px;font-size:medium;font-size:initial}.mat-radio-group{display:flex;flex-direction:column;padding-top:10px}.mat-radio-button{display:inline-flex;position:relative;margin-left:16px;margin-top:10px}.mat-form-field{margin-top:5px}.mat-column-select{overflow:auto}.buttons{margin-top:15px}.search-button{left:15px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.search-button{left:10px;width:45%;min-height:35px;white-space:normal;line-height:normal}}.export-button{left:15px;width:46%;margin-bottom:5px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.export-button{left:10px;margin-top:10px;width:45%;min-height:35px;white-space:normal;line-height:normal}}.remove-button{margin-top:12px;left:5px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.remove-button{margin:0;width:45%;min-height:35px;white-space:normal;line-height:normal}}.clear-form-button{left:5px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.clear-form-button{width:45%;min-height:35px;white-space:normal;line-height:normal}}.clear-search-button{left:5px;width:46%}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.clear-search-button{width:45%;min-height:35px;white-space:normal;line-height:normal}}.thematics{max-height:35%;overflow:auto;margin-top:5px;width:98%}.results{overflow:auto;max-height:250px;width:98%}.mat-column-typeResults{max-width:100px;margin-right:5px}.buffer-unit,.radius-unit{display:flex;width:100%;margin-left:2px;padding:5px}.radius,.buffer{display:flex;flex-flow:column nowrap;width:110%}.unit-field{width:110px;margin-left:30px}.example-tree-invisible{display:none}.tree-ul{margin:0;padding:0 0 0 20px;list-style-type:none}.tree-check,.tree-check-2{position:relative;margin-left:auto;margin-right:5px}.thematics-header{max-width:250px}.checks-header{padding:none;max-width:calc(100% - 316px);overflow:hidden}.mat-checkbox{padding:5px}.mat-tree-node{position:relative;min-height:42px;width:280px}.mat-header-cell{height:56px}.results{max-height:45%;width:98%}.results igo-entity-table ::ng-deep div.table-container{overflow:visible;overflow:initial}\n"] }]
29230
30122
  }], function () { return [{ type: i0.ChangeDetectorRef }, { type: SpatialFilterService }, { type: i2$1.MessageService }, { type: i2$1.LanguageService }]; }, { map: [{
29231
30123
  type: Input
29232
30124
  }], type: [{
@@ -29263,6 +30155,8 @@ SpatialFilterItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
29263
30155
  type: Output
29264
30156
  }], freehandControl: [{
29265
30157
  type: Output
30158
+ }], predefinedRadius: [{
30159
+ type: Output
29266
30160
  }], clearButtonEvent: [{
29267
30161
  type: Output
29268
30162
  }], clearSearchEvent: [{
@@ -29550,7 +30444,7 @@ function OgcFilterTimeComponent_div_3_div_2_div_13_Template(rf, ctx) {
29550
30444
  i0.ɵɵadvance(2);
29551
30445
  i0.ɵɵproperty("for", _r35)("disabled", ctx_r25.filterStateDisable);
29552
30446
  i0.ɵɵadvance(1);
29553
- i0.ɵɵproperty("matDatepicker", _r35)("placeholder", i0.ɵɵpipeBind1(5, 14, "igo.geo.timeFilter.endDate"))("matDatepickerFilter", ctx_r25.dateFilter.bind(ctx_r25, "end"))("value", ctx_r25.endValue ? ctx_r25.endValue : ctx_r25.handleDate(ctx_r25.datasource.options.maxDate))("min", ctx_r25.beginValue ? ctx_r25.beginValue : ctx_r25.handleDate(ctx_r25.datasource.options.minDate))("max", ctx_r25.handleDate(ctx_r25.datasource.options.maxDate))("disabled", ctx_r25.filterStateDisable);
30447
+ i0.ɵɵproperty("matDatepicker", _r35)("placeholder", i0.ɵɵpipeBind1(5, 14, "igo.geo.timeFilter.endDate"))("matDatepickerFilter", ctx_r25.filterEndFunction)("value", ctx_r25.endValue ? ctx_r25.endValue : ctx_r25.handleDate(ctx_r25.datasource.options.maxDate))("min", ctx_r25.beginValue ? ctx_r25.beginValue : ctx_r25.handleDate(ctx_r25.datasource.options.minDate))("max", ctx_r25.handleDate(ctx_r25.datasource.options.maxDate))("disabled", ctx_r25.filterStateDisable);
29554
30448
  i0.ɵɵattribute("disabled", !ctx_r25.currentFilter.active);
29555
30449
  i0.ɵɵadvance(4);
29556
30450
  i0.ɵɵproperty("startView", ctx_r25.calendarView())("startAt", ctx_r25.endValue);
@@ -29594,7 +30488,7 @@ function OgcFilterTimeComponent_div_3_div_2_Template(rf, ctx) {
29594
30488
  i0.ɵɵadvance(3);
29595
30489
  i0.ɵɵproperty("for", _r22)("disabled", ctx_r9.filterStateDisable);
29596
30490
  i0.ɵɵadvance(1);
29597
- i0.ɵɵproperty("matDatepicker", _r22)("placeholder", i0.ɵɵpipeBind1(6, 20, "igo.geo.timeFilter.startDate"))("matDatepickerFilter", ctx_r9.dateFilter.bind(ctx_r9, "begin"))("value", ctx_r9.beginValue ? ctx_r9.beginValue : ctx_r9.handleDate(ctx_r9.datasource.options.minDate))("min", ctx_r9.handleDate(ctx_r9.datasource.options.minDate))("max", ctx_r9.endValue && !ctx_r9.restrictedToStep() ? ctx_r9.endValue : ctx_r9.handleDate(ctx_r9.datasource.options.maxDate))("disabled", ctx_r9.filterStateDisable);
30491
+ i0.ɵɵproperty("matDatepicker", _r22)("placeholder", i0.ɵɵpipeBind1(6, 20, "igo.geo.timeFilter.startDate"))("matDatepickerFilter", ctx_r9.filterBeginFunction)("value", ctx_r9.beginValue ? ctx_r9.beginValue : ctx_r9.handleDate(ctx_r9.datasource.options.minDate))("min", ctx_r9.handleDate(ctx_r9.datasource.options.minDate))("max", ctx_r9.endValue && !ctx_r9.restrictedToStep() ? ctx_r9.endValue : ctx_r9.handleDate(ctx_r9.datasource.options.maxDate))("disabled", ctx_r9.filterStateDisable);
29598
30492
  i0.ɵɵattribute("disabled", !ctx_r9.currentFilter.active);
29599
30493
  i0.ɵɵadvance(4);
29600
30494
  i0.ɵɵproperty("startView", ctx_r9.calendarView())("startAt", ctx_r9.beginValue);
@@ -29691,6 +30585,8 @@ class OgcFilterTimeComponent {
29691
30585
  this.updateHoursMinutesArray();
29692
30586
  // update value for now value
29693
30587
  this.updateValues();
30588
+ this.dateFilter(this.filterBeginFunction, 'begin');
30589
+ this.dateFilter(this.filterEndFunction, 'end');
29694
30590
  }
29695
30591
  parseFilter(filter) {
29696
30592
  if (!filter) {
@@ -29851,10 +30747,12 @@ class OgcFilterTimeComponent {
29851
30747
  if (type === 'end') {
29852
30748
  const dateValuePlus1 = moment(dateValue).add(1, 'd');
29853
30749
  const monthDiffPlus1 = moment(dateValuePlus1).diff(moment(this.handleMin()), 'years', true);
29854
- return (monthDiffPlus1 % moment.duration(this.step).asYears()) === 0;
30750
+ this.filterEndFunction = (monthDiffPlus1 % moment.duration(this.step).asYears()) === 0;
30751
+ return;
29855
30752
  }
29856
30753
  else if (type === 'begin') {
29857
- return (monthDiff % moment.duration(this.step).asYears()) === 0;
30754
+ this.filterBeginFunction = (monthDiff % moment.duration(this.step).asYears()) === 0;
30755
+ return;
29858
30756
  }
29859
30757
  }
29860
30758
  else if (this.ogcFilterTimeService.stepIsMonthDuration(this.step)) {
@@ -29862,10 +30760,12 @@ class OgcFilterTimeComponent {
29862
30760
  if (type === 'end') {
29863
30761
  const dateValuePlus1 = moment(dateValue).add(1, 'd');
29864
30762
  const monthDiffPlus1 = moment(dateValuePlus1).diff(moment(this.handleMin()), 'months', true);
29865
- return (monthDiffPlus1 % moment.duration(this.step).asMonths()) === 0;
30763
+ this.filterEndFunction = (monthDiffPlus1 % moment.duration(this.step).asMonths()) === 0;
30764
+ return;
29866
30765
  }
29867
30766
  else if (type === 'begin') {
29868
- return (monthDiff % moment.duration(this.step).asMonths()) === 0;
30767
+ this.filterBeginFunction = (monthDiff % moment.duration(this.step).asMonths()) === 0;
30768
+ return;
29869
30769
  }
29870
30770
  }
29871
30771
  else if (this.ogcFilterTimeService.stepIsWeekDuration(this.step)) {
@@ -29873,10 +30773,12 @@ class OgcFilterTimeComponent {
29873
30773
  if (type === 'end') {
29874
30774
  const dateValuePlus1 = moment(dateValue).add(1, 'd');
29875
30775
  const weekDiffPlus1 = moment(dateValuePlus1).diff(moment(this.handleMin()), 'weeks', true);
29876
- return (weekDiffPlus1 % moment.duration(this.step).asWeeks()) === 0;
30776
+ this.filterEndFunction = (weekDiffPlus1 % moment.duration(this.step).asWeeks()) === 0;
30777
+ return;
29877
30778
  }
29878
30779
  else if (type === 'begin') {
29879
- return (weekDiff % moment.duration(this.step).asWeeks()) === 0;
30780
+ this.filterBeginFunction = (weekDiff % moment.duration(this.step).asWeeks()) === 0;
30781
+ return;
29880
30782
  }
29881
30783
  }
29882
30784
  else if (this.ogcFilterTimeService.stepIsDayDuration(this.step)) {
@@ -29885,21 +30787,40 @@ class OgcFilterTimeComponent {
29885
30787
  const dateValuePlus1 = moment(dateValue).add(1, 'd');
29886
30788
  const dayDiffPlus1 = moment(dateValuePlus1).diff(moment(this.handleMin()), 'days', true);
29887
30789
  const _mod = (dayDiffPlus1 % moment.duration(this.step).asDays());
29888
- return (_mod < 0.0000001 && _mod > -0.0000001) || _mod === 0; // 1 millisecond = 1.1574074074074076e-8
30790
+ this.filterEndFunction = (_mod < 0.0000001 && _mod > -0.0000001) || _mod === 0; // 1 millisecond = 1.1574074074074076e-8
30791
+ return;
29889
30792
  }
29890
30793
  else if (type === 'begin') {
29891
30794
  const _mod = ((dayDiff % moment.duration(this.step).asDays()) + 1);
29892
- return (_mod < 0.0000001 && _mod > -0.0000001 && _mod !== 0) || _mod === 1; // 1 millisecond = 1.1574074074074076e-8
30795
+ this.filterBeginFunction = (_mod < 0.0000001 && _mod > -0.0000001 && _mod !== 0) || _mod === 1; // 1 millisecond = 1.1574074074074076e-8
30796
+ return;
29893
30797
  }
29894
30798
  }
29895
30799
  else if (this.ogcFilterTimeService.stepIsHourDuration(this.step)) {
29896
- const hourDiff = moment(dateValue).diff(moment(this.handleMin()), 'hours', true);
29897
- return (hourDiff % moment.duration(this.step).asHours()) === 0;
30800
+ if (type === 'end') {
30801
+ const hourDiff = moment(dateValue).diff(moment(this.handleMin()), 'hours', true);
30802
+ this.filterEndFunction = (hourDiff % moment.duration(this.step).asHours()) === 0;
30803
+ return;
30804
+ }
30805
+ else if (type === 'begin') {
30806
+ const hourDiff = moment(dateValue).diff(moment(this.handleMin()), 'hours', true);
30807
+ this.filterBeginFunction = (hourDiff % moment.duration(this.step).asHours()) === 0;
30808
+ return;
30809
+ }
29898
30810
  }
29899
30811
  else if (this.ogcFilterTimeService.stepIsMinuteDuration(this.step)) {
29900
- return true;
30812
+ if (type === 'end') {
30813
+ this.filterEndFunction = true;
30814
+ return;
30815
+ }
30816
+ else if (type === 'begin') {
30817
+ this.filterBeginFunction = true;
30818
+ return;
30819
+ }
29901
30820
  }
29902
- return diff % this.stepMilliseconds === 0;
30821
+ this.filterEndFunction = diff % this.stepMilliseconds === 0;
30822
+ this.filterBeginFunction = diff % this.stepMilliseconds === 0;
30823
+ return;
29903
30824
  }
29904
30825
  getDateTime(date, pos) {
29905
30826
  const valuetmp = new Date(date);
@@ -30169,7 +31090,7 @@ OgcFilterTimeComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OgcF
30169
31090
  (function () {
30170
31091
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OgcFilterTimeComponent, [{
30171
31092
  type: Component,
30172
- args: [{ selector: 'igo-ogc-filter-time', template: "<div class=\"datetime-container\">\n <mat-slide-toggle \n *ngIf=\"this.currentFilter.sliderOptions?.enabled\"\n [(ngModel)]=\"sliderMode\"\n (change)=\"modeChange($event)\">\n {{'igo.geo.filter.sliderModeTitle' | translate}}\n </mat-slide-toggle>\n\n <div class=\"slider-container\" *ngIf=\"sliderMode\">\n <igo-ogc-filter-time-slider\n [begin]=\"beginValue\"\n [max]=\"this.restrictedToStep() ? this.maxDate : this.endValue\"\n [currentFilter]=\"currentFilter\" \n [datasource]=\"datasource\"\n (changeProperty)=\"changePropertyByPass($event)\"\n >\n </igo-ogc-filter-time-slider>\n \n </div>\n\n <div *ngIf=\"!sliderMode\">\n\n <div class=\"year-input-container\" *ngIf=\"calendarTypeYear\">\n <!-- to emulate a year-picker, 2 input: first input to show user just year and second input hiden and bind \n with the datepicker -->\n <mat-form-field class=\"year-input\">\n <mat-label>{{'igo.geo.timeFilter.startYear'| translate}}</mat-label>\n <input\n matInput\n class=\"year-input-only-year\"\n value=\"{{onlyYearBegin}}\"\n (change)= \"yearOnlyInputChange($event, beginDatepicker, 'begin')\"\n [disabled]= \"filterStateDisable\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"beginDatepicker\" [disabled]=\"filterStateDisable\"></mat-datepicker-toggle>\n \n <mat-datepicker\n panelClass=\"datepicker-year\"\n #beginDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"beginValue\"\n (yearSelected)=\"yearSelected($event, beginDatepicker, 'begin')\"\n >\n </mat-datepicker>\n\n <input #beginYear\n class= \"year-input-hide\"\n matInput\n [matDatepicker]=\"beginDatepicker\"\n enabled= false\n readonly= true\n [value]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [min]=\"handleDate(datasource.options.minDate)\"\n [max]=\"(endValue && (!restrictedToStep()))?endValue:handleDate(datasource.options.maxDate)\"\n >\n </mat-form-field>\n\n <mat-form-field class=\"year-input\">\n <mat-label>{{'igo.geo.timeFilter.endYear'| translate}}</mat-label>\n <input\n matInput\n class=\"year-input-only-year\"\n value=\"{{onlyYearEnd}}\"\n (change)= \"yearOnlyInputChange($event, endDatepicker, 'end')\"\n [disabled] = \"filterStateDisable\">\n <mat-datepicker-toggle matSuffix [for]=\"endDatepicker\" [disabled]=\"filterStateDisable\"></mat-datepicker-toggle>\n <mat-datepicker\n panelClass=\"datepicker-year\"\n #endDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"endValue\"\n (yearSelected)=\"yearSelected($event, endDatepicker, 'end')\"\n >\n </mat-datepicker>\n\n <input #endYear\n class= \"year-input-hide\"\n matInput\n [matDatepicker]=\"endDatepicker\"\n enabled= false\n readonly= true\n [value]=\"endValue?endValue:handleDate(datasource.options.maxDate)\"\n [min]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [max]=\"handleDate(datasource.options.maxDate)\"\n >\n </mat-form-field>\n <button class=\"reset-button\" \n mat-icon-button\n color=\"primary\" \n (click)=\"resetFilter()\" \n [matTooltip]=\"'igo.geo.filter.resetFilters' | translate\" \n [disabled]= \"filterStateDisable\">\n <mat-icon svgIcon=\"{{resetIcon}}\"></mat-icon>\n </button>\n <mat-slide-toggle \n class='toggle-filter-state' \n (change)=\"toggleFilterState()\" \n [matTooltip]=\"'igo.geo.filter.toggleFilterState' | translate\" \n tooltip-position=\"below\" \n matTooltipShowDelay=\"500\"\n [checked]=\"!filterStateDisable\">\n </mat-slide-toggle>\n\n </div>\n\n <div class=\"datetime-input-container\" *ngIf=\"calendarType()!=='year'\">\n <div class=\"datetime-input\">\n <mat-form-field class=\"date-input\">\n <mat-datepicker-toggle matSuffix [for]=\"beginDatepicker\" [disabled]= \"filterStateDisable\"></mat-datepicker-toggle>\n <input #begin\n matInput\n [matDatepicker]=\"beginDatepicker\"\n [placeholder]=\"'igo.geo.timeFilter.startDate' | translate\"\n [attr.disabled]=\"!currentFilter.active\"\n (dateChange)=\"changeTemporalProperty(begin.value, 1)\"\n [matDatepickerFilter]=\"dateFilter.bind(this, 'begin')\"\n [value]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [min]=\"handleDate(datasource.options.minDate)\"\n [max]=\"(endValue && (!restrictedToStep()))?endValue:handleDate(datasource.options.maxDate)\" \n [disabled]= \"filterStateDisable\">\n <span class=\"filler\"></span>\n <mat-datepicker\n #beginDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"beginValue\"\n (yearSelected)=\"yearSelected($event, beginDatepicker, 'begin')\"\n (monthSelected)=\"monthSelected($event, beginDatepicker, 'begin')\">\n </mat-datepicker>\n </mat-form-field>\n\n <div class=\"time-input\">\n <mat-form-field class=\"hour-input\" *ngIf=\"calendarType()==='datetime'\">\n <mat-label>{{'igo.geo.timeFilter.hour' | translate}}</mat-label>\n <mat-select\n [formControl]=\"beginHourFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(begin.value, 1)\">\n <mat-option *ngFor=\"let hour of beginHours\" [value]=\"hour\">{{hour}}</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class=\"minute-input\" *ngIf=\"calendarType()==='datetime'\">\n <mat-label>{{'igo.geo.timeFilter.minute' | translate}}</mat-label>\n <mat-select\n [formControl]=\"beginMinuteFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(begin.value, 1)\">\n <mat-option *ngFor=\"let minute of beginMinutes\" [value]=\"minute\">{{minute}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"datetime-input\" *ngIf=\"!restrictedToStep()\">\n <mat-form-field class=\"date-input\">\n <mat-datepicker-toggle matSuffix [for]=\"endDatepicker\" [disabled]= \"filterStateDisable\"></mat-datepicker-toggle>\n <input #end\n matInput\n [matDatepicker]=\"endDatepicker\"\n [placeholder]=\"'igo.geo.timeFilter.endDate' | translate\"\n [attr.disabled]=\"!currentFilter.active\"\n (dateChange)=\"changeTemporalProperty(end.value, 2)\"\n [matDatepickerFilter]=\"dateFilter.bind(this, 'end')\"\n [value]=\"endValue?endValue:handleDate(datasource.options.maxDate)\"\n [min]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [max]=\"handleDate(datasource.options.maxDate)\" \n [disabled]= \"filterStateDisable\">\n <span class=\"filler\"></span>\n <mat-datepicker #endDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"endValue\"\n (yearSelected)=\"yearSelected($event, endDatepicker, 'end')\"\n (monthSelected)=\"monthSelected($event, endDatepicker, 'end')\">\n </mat-datepicker>\n </mat-form-field>\n\n <div class=\"time-input\">\n <mat-form-field class=\"hour-input\" *ngIf=\"calendarType()==='datetime'\" >\n <mat-label>{{'igo.geo.timeFilter.hour' | translate}}</mat-label>\n <mat-select\n [formControl]=\"endHourFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(end.value, 2)\">\n <mat-option *ngFor=\"let hour of endHours\" [value]=\"hour\">{{hour}}</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class=\"minute-input\" *ngIf=\"calendarType()==='datetime'\">\n <mat-label>{{'igo.geo.timeFilter.minute' | translate}}</mat-label>\n <mat-select\n [formControl]=\"endMinuteFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(end.value, 2)\">\n <mat-option *ngFor=\"let minute of endMinutes\" [value]=\"minute\">{{minute}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <button class=\"reset-button\" \n mat-icon-button color=\"primary\"\n (click)=\"resetFilter()\" \n [matTooltip]=\"'igo.geo.filter.resetFilters' | translate\" \n [disabled]= \"filterStateDisable\">\n <mat-icon svgIcon=\"{{resetIcon}}\"></mat-icon>\n </button>\n <mat-slide-toggle \n class=\"toggle-filter-state\" \n (change)=\"toggleFilterState()\" \n tooltip-position=\"below\" \n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.filter.toggleFilterState' | translate\" \n [checked]= \"!filterStateDisable\">\n </mat-slide-toggle>\n </div>\n </div>\n</div>\n", styles: ["::ng-deep input{text-align:center!important;margin:auto 5px!important}.slider-container{text-align:center}.datetime-input{display:inline-block;width:100px;margin:10px 0 5px 10px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.datetime-input{width:36%;margin:0}}.date-input{width:100px;margin-right:25px}.time-input{margin-right:25px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.time-input{margin-right:5px}}.hour-input,.minute-input{width:35px;margin-left:7px}.year-input{width:98px;margin:10px 14px 5px 4px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.year-input{width:32%;margin:0 0 0 10px}}.year-input-hide{width:120px;margin-right:25px;display:none}.year-input-only-year{width:120px;margin-right:25px}.reset-button{width:25px;padding-left:8px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.reset-button{padding-left:8px}}.toggle-filter-state{padding-left:20px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.toggle-filter-state{padding-left:12px}}::ng-deep .datepicker-year ::ng-deep .mat-calendar-arrow{display:none}::ng-deep .datepicker-year ::ng-deep .mat-calendar-period-button{pointer-events:none}::ng-deep .datepicker-year ::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover{background-color:#0000001f;border-radius:999px}\n"] }]
31093
+ args: [{ selector: 'igo-ogc-filter-time', template: "<div class=\"datetime-container\">\n <mat-slide-toggle \n *ngIf=\"this.currentFilter.sliderOptions?.enabled\"\n [(ngModel)]=\"sliderMode\"\n (change)=\"modeChange($event)\">\n {{'igo.geo.filter.sliderModeTitle' | translate}}\n </mat-slide-toggle>\n\n <div class=\"slider-container\" *ngIf=\"sliderMode\">\n <igo-ogc-filter-time-slider\n [begin]=\"beginValue\"\n [max]=\"this.restrictedToStep() ? this.maxDate : this.endValue\"\n [currentFilter]=\"currentFilter\" \n [datasource]=\"datasource\"\n (changeProperty)=\"changePropertyByPass($event)\"\n >\n </igo-ogc-filter-time-slider>\n \n </div>\n\n <div *ngIf=\"!sliderMode\">\n\n <div class=\"year-input-container\" *ngIf=\"calendarTypeYear\">\n <!-- to emulate a year-picker, 2 input: first input to show user just year and second input hiden and bind \n with the datepicker -->\n <mat-form-field class=\"year-input\">\n <mat-label>{{'igo.geo.timeFilter.startYear'| translate}}</mat-label>\n <input\n matInput\n class=\"year-input-only-year\"\n value=\"{{onlyYearBegin}}\"\n (change)= \"yearOnlyInputChange($event, beginDatepicker, 'begin')\"\n [disabled]= \"filterStateDisable\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"beginDatepicker\" [disabled]=\"filterStateDisable\"></mat-datepicker-toggle>\n \n <mat-datepicker\n panelClass=\"datepicker-year\"\n #beginDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"beginValue\"\n (yearSelected)=\"yearSelected($event, beginDatepicker, 'begin')\"\n >\n </mat-datepicker>\n\n <input #beginYear\n class= \"year-input-hide\"\n matInput\n [matDatepicker]=\"beginDatepicker\"\n enabled= false\n readonly= true\n [value]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [min]=\"handleDate(datasource.options.minDate)\"\n [max]=\"(endValue && (!restrictedToStep()))?endValue:handleDate(datasource.options.maxDate)\"\n >\n </mat-form-field>\n\n <mat-form-field class=\"year-input\">\n <mat-label>{{'igo.geo.timeFilter.endYear'| translate}}</mat-label>\n <input\n matInput\n class=\"year-input-only-year\"\n value=\"{{onlyYearEnd}}\"\n (change)= \"yearOnlyInputChange($event, endDatepicker, 'end')\"\n [disabled] = \"filterStateDisable\">\n <mat-datepicker-toggle matSuffix [for]=\"endDatepicker\" [disabled]=\"filterStateDisable\"></mat-datepicker-toggle>\n <mat-datepicker\n panelClass=\"datepicker-year\"\n #endDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"endValue\"\n (yearSelected)=\"yearSelected($event, endDatepicker, 'end')\"\n >\n </mat-datepicker>\n\n <input #endYear\n class= \"year-input-hide\"\n matInput\n [matDatepicker]=\"endDatepicker\"\n enabled= false\n readonly= true\n [value]=\"endValue?endValue:handleDate(datasource.options.maxDate)\"\n [min]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [max]=\"handleDate(datasource.options.maxDate)\"\n >\n </mat-form-field>\n <button class=\"reset-button\" \n mat-icon-button\n color=\"primary\" \n (click)=\"resetFilter()\" \n [matTooltip]=\"'igo.geo.filter.resetFilters' | translate\" \n [disabled]= \"filterStateDisable\">\n <mat-icon svgIcon=\"{{resetIcon}}\"></mat-icon>\n </button>\n <mat-slide-toggle \n class='toggle-filter-state' \n (change)=\"toggleFilterState()\" \n [matTooltip]=\"'igo.geo.filter.toggleFilterState' | translate\" \n tooltip-position=\"below\" \n matTooltipShowDelay=\"500\"\n [checked]=\"!filterStateDisable\">\n </mat-slide-toggle>\n\n </div>\n\n <div class=\"datetime-input-container\" *ngIf=\"calendarType()!=='year'\">\n <div class=\"datetime-input\">\n <mat-form-field class=\"date-input\">\n <mat-datepicker-toggle matSuffix [for]=\"beginDatepicker\" [disabled]= \"filterStateDisable\"></mat-datepicker-toggle>\n <input #begin\n matInput\n [matDatepicker]=\"beginDatepicker\"\n [placeholder]=\"'igo.geo.timeFilter.startDate' | translate\"\n [attr.disabled]=\"!currentFilter.active\"\n (dateChange)=\"changeTemporalProperty(begin.value, 1)\"\n [matDatepickerFilter]=\"filterBeginFunction\"\n [value]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [min]=\"handleDate(datasource.options.minDate)\"\n [max]=\"(endValue && (!restrictedToStep()))?endValue:handleDate(datasource.options.maxDate)\" \n [disabled]= \"filterStateDisable\">\n <span class=\"filler\"></span>\n <mat-datepicker\n #beginDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"beginValue\"\n (yearSelected)=\"yearSelected($event, beginDatepicker, 'begin')\"\n (monthSelected)=\"monthSelected($event, beginDatepicker, 'begin')\">\n </mat-datepicker>\n </mat-form-field>\n\n <div class=\"time-input\">\n <mat-form-field class=\"hour-input\" *ngIf=\"calendarType()==='datetime'\">\n <mat-label>{{'igo.geo.timeFilter.hour' | translate}}</mat-label>\n <mat-select\n [formControl]=\"beginHourFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(begin.value, 1)\">\n <mat-option *ngFor=\"let hour of beginHours\" [value]=\"hour\">{{hour}}</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class=\"minute-input\" *ngIf=\"calendarType()==='datetime'\">\n <mat-label>{{'igo.geo.timeFilter.minute' | translate}}</mat-label>\n <mat-select\n [formControl]=\"beginMinuteFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(begin.value, 1)\">\n <mat-option *ngFor=\"let minute of beginMinutes\" [value]=\"minute\">{{minute}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"datetime-input\" *ngIf=\"!restrictedToStep()\">\n <mat-form-field class=\"date-input\">\n <mat-datepicker-toggle matSuffix [for]=\"endDatepicker\" [disabled]= \"filterStateDisable\"></mat-datepicker-toggle>\n <input #end\n matInput\n [matDatepicker]=\"endDatepicker\"\n [placeholder]=\"'igo.geo.timeFilter.endDate' | translate\"\n [attr.disabled]=\"!currentFilter.active\"\n (dateChange)=\"changeTemporalProperty(end.value, 2)\"\n [matDatepickerFilter]=\"filterEndFunction\"\n [value]=\"endValue?endValue:handleDate(datasource.options.maxDate)\"\n [min]=\"beginValue?beginValue:handleDate(datasource.options.minDate)\"\n [max]=\"handleDate(datasource.options.maxDate)\" \n [disabled]= \"filterStateDisable\">\n <span class=\"filler\"></span>\n <mat-datepicker #endDatepicker\n [startView]=\"calendarView()\"\n [startAt]=\"endValue\"\n (yearSelected)=\"yearSelected($event, endDatepicker, 'end')\"\n (monthSelected)=\"monthSelected($event, endDatepicker, 'end')\">\n </mat-datepicker>\n </mat-form-field>\n\n <div class=\"time-input\">\n <mat-form-field class=\"hour-input\" *ngIf=\"calendarType()==='datetime'\" >\n <mat-label>{{'igo.geo.timeFilter.hour' | translate}}</mat-label>\n <mat-select\n [formControl]=\"endHourFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(end.value, 2)\">\n <mat-option *ngFor=\"let hour of endHours\" [value]=\"hour\">{{hour}}</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class=\"minute-input\" *ngIf=\"calendarType()==='datetime'\">\n <mat-label>{{'igo.geo.timeFilter.minute' | translate}}</mat-label>\n <mat-select\n [formControl]=\"endMinuteFormControl\"\n [attr.disabled]=\"!currentFilter.active\"\n (selectionChange)=\"changeTemporalProperty(end.value, 2)\">\n <mat-option *ngFor=\"let minute of endMinutes\" [value]=\"minute\">{{minute}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <button class=\"reset-button\" \n mat-icon-button color=\"primary\"\n (click)=\"resetFilter()\" \n [matTooltip]=\"'igo.geo.filter.resetFilters' | translate\" \n [disabled]= \"filterStateDisable\">\n <mat-icon svgIcon=\"{{resetIcon}}\"></mat-icon>\n </button>\n <mat-slide-toggle \n class=\"toggle-filter-state\" \n (change)=\"toggleFilterState()\" \n tooltip-position=\"below\" \n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.geo.filter.toggleFilterState' | translate\" \n [checked]= \"!filterStateDisable\">\n </mat-slide-toggle>\n </div>\n </div>\n</div>\n", styles: ["::ng-deep input{text-align:center!important;margin:auto 5px!important}.slider-container{text-align:center}.datetime-input{display:inline-block;width:100px;margin:10px 0 5px 10px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.datetime-input{width:36%;margin:0}}.date-input{width:100px;margin-right:25px}.time-input{margin-right:25px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.time-input{margin-right:5px}}.hour-input,.minute-input{width:35px;margin-left:7px}.year-input{width:98px;margin:10px 14px 5px 4px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.year-input{width:32%;margin:0 0 0 10px}}.year-input-hide{width:120px;margin-right:25px;display:none}.year-input-only-year{width:120px;margin-right:25px}.reset-button{width:25px;padding-left:8px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.reset-button{padding-left:8px}}.toggle-filter-state{padding-left:20px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.toggle-filter-state{padding-left:12px}}::ng-deep .datepicker-year ::ng-deep .mat-calendar-arrow{display:none}::ng-deep .datepicker-year ::ng-deep .mat-calendar-period-button{pointer-events:none}::ng-deep .datepicker-year ::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover{background-color:#0000001f;border-radius:999px}\n"] }]
30173
31094
  }], function () { return [{ type: OGCFilterTimeService }]; }, { datasource: [{
30174
31095
  type: Input
30175
31096
  }], currentFilter: [{
@@ -30574,15 +31495,15 @@ IgoFilterModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [TimeFi
30574
31495
  i0.ɵɵsetComponentScope(TimeFilterButtonComponent, [i1$1.NgIf, i2.MatIcon, i3.MatButton, i4.MatTooltip, i5$1.ListItemDirective, i7$1.MatBadge, TimeFilterItemComponent], [i7.TranslatePipe]);
30575
31496
  i0.ɵɵsetComponentScope(TimeFilterItemComponent, [i1$1.NgClass, i1$1.NgIf, i1$1.NgStyle, i2.MatIcon, i3.MatButton, i5.MatListItem, i5.MatListAvatarCssMatStyler, i9.MatLine, i4.MatTooltip, LayerLegendComponent, i5$1.CollapseDirective, TimeFilterFormComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
30576
31497
  i0.ɵɵsetComponentScope(TimeFilterListComponent, [i1$1.NgForOf, i5$1.ListItemDirective, i5$1.ListComponent, TimeFilterItemComponent], [FilterableDataSourcePipe]);
30577
- i0.ɵɵsetComponentScope(OgcFilterFormComponent, [i1$1.NgClass, i1$1.NgForOf, i1$1.NgIf, i11$1.MatAutocomplete, i11$1.MatAutocompleteTrigger, i9.MatOption, i2.MatIcon, i3.MatButton, i12$1.MatCheckbox, i13.MatFormField, i13.MatSuffix, i14.MatInput, i15.MatSelect, i4.MatTooltip, OgcFilterTimeComponent], [i1$1.AsyncPipe, i7.TranslatePipe, i5$1.KeyValuePipe]);
31498
+ i0.ɵɵsetComponentScope(OgcFilterFormComponent, [i1$1.NgClass, i1$1.NgForOf, i1$1.NgIf, i11$1.MatAutocomplete, i11$1.MatAutocompleteTrigger, i9.MatOption, i2.MatIcon, i3.MatButton, i12.MatCheckbox, i13.MatFormField, i13.MatSuffix, i14.MatInput, i15.MatSelect, i4.MatTooltip, OgcFilterTimeComponent], [i1$1.AsyncPipe, i7.TranslatePipe, i5$1.KeyValuePipe]);
30578
31499
  i0.ɵɵsetComponentScope(OgcFilterButtonComponent, [i1$1.NgIf, i2.MatIcon, i3.MatButton, i4.MatTooltip, i5$1.ListItemDirective, i7$1.MatBadge, OgcFilterableItemComponent], [i7.TranslatePipe]);
30579
- i0.ɵɵsetComponentScope(OgcFilterSelectionComponent, [i1$1.NgForOf, i1$1.NgIf, i1$1.NgStyle, i2$2.ɵNgNoValidate, i2$2.DefaultValueAccessor, i2$2.NgControlStatus, i2$2.NgControlStatusGroup, i2$2.NgModel, i2$2.FormGroupDirective, i2$2.FormControlName, i11$1.MatAutocomplete, i11$1.MatAutocompleteTrigger, i9.MatOption, i2.MatIcon, i17.MatRadioGroup, i17.MatRadioButton, i18.MatButtonToggleGroup, i18.MatButtonToggle, i12$1.MatCheckbox, i13.MatFormField, i14.MatInput, i15.MatSelect, i11.MatDivider, i4.MatTooltip, OgcFilterTimeComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
31500
+ i0.ɵɵsetComponentScope(OgcFilterSelectionComponent, [i1$1.NgForOf, i1$1.NgIf, i1$1.NgStyle, i2$2.ɵNgNoValidate, i2$2.DefaultValueAccessor, i2$2.NgControlStatus, i2$2.NgControlStatusGroup, i2$2.NgModel, i2$2.FormGroupDirective, i2$2.FormControlName, i11$1.MatAutocomplete, i11$1.MatAutocompleteTrigger, i9.MatOption, i2.MatIcon, i17.MatRadioGroup, i17.MatRadioButton, i18.MatButtonToggleGroup, i18.MatButtonToggle, i12.MatCheckbox, i13.MatFormField, i14.MatInput, i15.MatSelect, i11.MatDivider, i4.MatTooltip, OgcFilterTimeComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
30580
31501
  i0.ɵɵsetComponentScope(OgcFilterableFormComponent, [i1$1.NgForOf, i1$1.NgIf, i5$1.ListItemDirective, OgcFilterFormComponent,
30581
31502
  OgcFilterSelectionComponent], []);
30582
- i0.ɵɵsetComponentScope(OgcFilterableItemComponent, [i1$1.NgClass, i1$1.NgIf, i1$1.NgStyle, i2$2.NgControlStatus, i2$2.NgModel, i2.MatIcon, i3.MatButton, i12$1.MatCheckbox, i5.MatListItem, i5.MatListAvatarCssMatStyler, i9.MatLine, i11.MatDivider, i4.MatTooltip, LayerLegendComponent, i5$1.CollapseDirective, OgcFilterableFormComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
31503
+ i0.ɵɵsetComponentScope(OgcFilterableItemComponent, [i1$1.NgClass, i1$1.NgIf, i1$1.NgStyle, i2$2.NgControlStatus, i2$2.NgModel, i2.MatIcon, i3.MatButton, i12.MatCheckbox, i5.MatListItem, i5.MatListAvatarCssMatStyler, i9.MatLine, i11.MatDivider, i4.MatTooltip, LayerLegendComponent, i5$1.CollapseDirective, OgcFilterableFormComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
30583
31504
  i0.ɵɵsetComponentScope(OgcFilterableListComponent, [i1$1.NgForOf, i1$1.NgIf, i5$1.ListItemDirective, i5$1.ListComponent, OgcFilterableItemComponent], [i7.TranslatePipe, FilterableDataSourcePipe]);
30584
31505
  i0.ɵɵsetComponentScope(SpatialFilterTypeComponent, [i1$1.NgForOf, i9.MatOption, i2.MatIcon, i20.MatTabGroup, i20.MatTab, i18.MatButtonToggleGroup, i18.MatButtonToggle, i13.MatFormField, i13.MatLabel, i15.MatSelect, i4.MatTooltip, SpatialFilterListComponent], [i7.TranslatePipe]);
30585
- i0.ɵɵsetComponentScope(SpatialFilterItemComponent, [i1$1.NgForOf, i1$1.NgIf, i2$2.ɵNgNoValidate, i2$2.DefaultValueAccessor, i2$2.NumberValueAccessor, i2$2.NgControlStatus, i2$2.NgControlStatusGroup, i2$2.NgForm, i2$2.FormControlDirective, i9.MatOption, i2.MatIcon, i3.MatButton, i17.MatRadioGroup, i17.MatRadioButton, i21.MatTable, i21.MatHeaderCellDef, i21.MatHeaderRowDef, i21.MatColumnDef, i21.MatRowDef, i21.MatHeaderCell, i21.MatHeaderRow, i21.MatRow, i22.MatNestedTreeNode, i22.MatTreeNodeDef, i22.MatTreeNodeToggle, i22.MatTree, i22.MatTreeNode, i22.MatTreeNodeOutlet, i12$1.MatCheckbox, i23.MatSlideToggle, i13.MatFormField, i13.MatLabel, i14.MatInput, i15.MatSelect, i4.MatTooltip, i5$1.EntityTableComponent, GeometryFormFieldInputComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
31506
+ i0.ɵɵsetComponentScope(SpatialFilterItemComponent, [i1$1.NgForOf, i1$1.NgIf, i2$2.ɵNgNoValidate, i2$2.DefaultValueAccessor, i2$2.NumberValueAccessor, i2$2.NgControlStatus, i2$2.NgControlStatusGroup, i2$2.NgForm, i2$2.FormControlDirective, i9.MatOption, i2.MatIcon, i3.MatButton, i17.MatRadioGroup, i17.MatRadioButton, i21.MatTable, i21.MatHeaderCellDef, i21.MatHeaderRowDef, i21.MatColumnDef, i21.MatRowDef, i21.MatHeaderCell, i21.MatHeaderRow, i21.MatRow, i22.MatNestedTreeNode, i22.MatTreeNodeDef, i22.MatTreeNodeToggle, i22.MatTree, i22.MatTreeNode, i22.MatTreeNodeOutlet, i12.MatCheckbox, i23.MatSlideToggle, i13.MatFormField, i13.MatLabel, i14.MatInput, i15.MatSelect, i4.MatTooltip, i5$1.EntityTableComponent, GeometryFormFieldInputComponent], [i1$1.AsyncPipe, i7.TranslatePipe]);
30586
31507
  i0.ɵɵsetComponentScope(OgcFilterTimeComponent, [i1$1.NgForOf, i1$1.NgIf, i2$2.NgControlStatus, i2$2.NgModel, i2$2.FormControlDirective, i9.MatOption, i2.MatIcon, i3.MatButton, i23.MatSlideToggle, i13.MatFormField, i13.MatLabel, i13.MatSuffix, i14.MatInput, i15.MatSelect, i4.MatTooltip, i25.MatDatepicker, i25.MatDatepickerInput, i25.MatDatepickerToggle, OgcFilterTimeSliderComponent], [i7.TranslatePipe]);
30587
31508
 
30588
31509
  function ExportButtonComponent_button_0_Template(rf, ctx) {
@@ -30856,7 +31777,7 @@ class ExportService {
30856
31777
  outputName = `${title}.csv`;
30857
31778
  }
30858
31779
  outputName = outputName.replace(' ', '_');
30859
- outputName = outputName.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
31780
+ outputName = outputName.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(/’/g, "'");
30860
31781
  outputNameField.setAttribute('type', 'hidden');
30861
31782
  outputNameField.setAttribute('name', 'outputName');
30862
31783
  outputNameField.setAttribute('value', outputName);
@@ -31178,21 +32099,34 @@ class ImportService {
31178
32099
  constructor(http, config) {
31179
32100
  this.http = http;
31180
32101
  this.config = config;
31181
- this.ogreUrl = this.config.getConfig('importExport.url');
31182
- const configFileSizeMb = this.config.getConfig('importExport.clientSideFileSizeMaxMb');
32102
+ const importConfig = this.config.getConfig('importExport');
32103
+ this.ogreUrl = importConfig.url;
32104
+ const configFileSizeMb = importConfig.clientSideFileSizeMaxMb;
31183
32105
  this.clientSideFileSizeMax = (configFileSizeMb ? configFileSizeMb : 30) * Math.pow(1024, 2);
32106
+ if (importConfig.formats) {
32107
+ ImportService.allowedExtensions = importConfig.formats
32108
+ .map(format => ImportService.formatExtensionAssociation[format])
32109
+ .filter(e => e);
32110
+ if (ImportService.allowedExtensions.includes('geojson')) {
32111
+ ImportService.allowedExtensions.push('json');
32112
+ }
32113
+ }
31184
32114
  }
31185
32115
  import(file, projectionIn = 'EPSG:4326', projectionOut = 'EPSG:4326') {
31186
32116
  return this.importAsync(file, projectionIn, projectionOut);
31187
32117
  }
31188
32118
  getFileImporter(file) {
31189
32119
  const extension = getFileExtension(file);
32120
+ const allowedExtensions = ImportService.allowedExtensions;
32121
+ let zipMimeTypes = [];
32122
+ if (allowedExtensions.includes('zip')) {
32123
+ zipMimeTypes = ImportService.allowedZipMimeTypes;
32124
+ }
31190
32125
  const mimeType = file.type;
31191
32126
  const allowedMimeTypes = [
31192
32127
  ...ImportService.allowedMimeTypes,
31193
- ...ImportService.allowedZipMimeTypes
32128
+ ...zipMimeTypes
31194
32129
  ];
31195
- const allowedExtensions = ImportService.allowedExtensions;
31196
32130
  if (allowedMimeTypes.indexOf(mimeType) < 0 &&
31197
32131
  allowedExtensions.indexOf(extension) < 0) {
31198
32132
  return undefined;
@@ -31338,6 +32272,13 @@ class ImportService {
31338
32272
  return features;
31339
32273
  }
31340
32274
  }
32275
+ ImportService.formatExtensionAssociation = {
32276
+ GeoJSON: 'geojson',
32277
+ GML: 'gml',
32278
+ GPX: 'gpx',
32279
+ KML: 'kml',
32280
+ Shapefile: 'zip'
32281
+ };
31341
32282
  ImportService.allowedMimeTypes = [
31342
32283
  'application/gml+xml',
31343
32284
  'application/vnd.google-earth.kml+xml',
@@ -31349,7 +32290,7 @@ ImportService.allowedZipMimeTypes = [
31349
32290
  'application/x-zip-compressed',
31350
32291
  'application/x-zip'
31351
32292
  ];
31352
- ImportService.allowedExtensions = ['geojson', 'kml', 'gpx', 'json', 'gml'];
32293
+ ImportService.allowedExtensions = ['geojson', 'kml', 'gpx', 'json', 'gml', 'zip'];
31353
32294
  ImportService.ɵfac = function ImportService_Factory(t) { return new (t || ImportService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(i2$1.ConfigService)); };
31354
32295
  ImportService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ImportService, factory: ImportService.ɵfac, providedIn: 'root' });
31355
32296
  (function () {
@@ -33336,6 +34277,64 @@ IgoOverlayModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
33336
34277
  })();
33337
34278
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoOverlayModule, { declarations: [OverlayDirective], exports: [OverlayDirective] }); })();
33338
34279
 
34280
+ /*
34281
+ * The MIT License (MIT)
34282
+ *
34283
+ * Copyright (c) 2016-2017 Dan "Ducky" Little
34284
+ *
34285
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
34286
+ * of this software and associated documentation files (the "Software"), to deal
34287
+ * in the Software without restriction, including without limitation the rights
34288
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34289
+ * copies of the Software, and to permit persons to whom the Software is
34290
+ * furnished to do so, subject to the following conditions:
34291
+ *
34292
+ * The above copyright notice and this permission notice shall be included in all
34293
+ * copies or substantial portions of the Software.
34294
+ *
34295
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34296
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34297
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34298
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34299
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34300
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34301
+ * SOFTWARE.
34302
+ */
34303
+ function jsGeoPdfPlugin(jsPDFAPI) {
34304
+ const setGeoArea = function (pdfExt, geoExt) {
34305
+ const bbox = pdfExt.join(' ');
34306
+ // the ordering may seem odd here but PDF
34307
+ // flips the Y axis upside down and this accounts for that
34308
+ // change.
34309
+ const minx = geoExt[0];
34310
+ const maxx = geoExt[2];
34311
+ const maxy = geoExt[1];
34312
+ const miny = geoExt[3];
34313
+ const bounds = [miny, minx, maxy, minx, maxy, maxx, miny, maxx].join(' ');
34314
+ const bbox_obj = this.internal.newAdditionalObject();
34315
+ const bounds_obj = this.internal.newAdditionalObject();
34316
+ const proj_obj = this.internal.newAdditionalObject();
34317
+ proj_obj.content = '<< /EPSG 3857 /Type /PROJCS /WKT (PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere"' +
34318
+ ',GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0]' +
34319
+ ',UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0]' +
34320
+ ',PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0]' +
34321
+ ',PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]) >>';
34322
+ bounds_obj.content = '<< /Bounds [ 0 1 0 0 1 0 1 1 ] /GCS ' +
34323
+ proj_obj.objId + ' 0 R /GPTS [ ' + bounds + ' ] /LPTS [ 0 1 0 0 1 0 1 1 ] /Subtype /GEO /Type /Measure >>';
34324
+ bbox_obj.content = '<< /BBox [ ' + bbox + ' ] /Measure ' + bounds_obj.objId + ' 0 R /Name (Layer) /Type /Viewport >>';
34325
+ const title_obj = this.internal.newAdditionalObject();
34326
+ const date = new Date().toLocaleDateString('en-CA');
34327
+ title_obj.content = '<< /Name IGO2 /Type /OCG /Date ' + date + ' >>';
34328
+ return bbox_obj.objId;
34329
+ };
34330
+ jsPDFAPI.setGeoArea = function (pdfExt, geoExt) {
34331
+ this.internal.events.subscribe('putPage', function () {
34332
+ const bbox_id = setGeoArea.call(this, pdfExt, geoExt);
34333
+ this.internal.write('/VP [ ' + bbox_id + ' 0 R ]');
34334
+ });
34335
+ };
34336
+ }
34337
+
33339
34338
  class PrintService {
33340
34339
  constructor(http, messageService, activityService, languageService, configService) {
33341
34340
  this.http = http;
@@ -33343,6 +34342,15 @@ class PrintService {
33343
34342
  this.activityService = activityService;
33344
34343
  this.languageService = languageService;
33345
34344
  this.configService = configService;
34345
+ this.TEXTPDFFONT = {
34346
+ titleFont: 'Times',
34347
+ titleFontStyle: 'bold',
34348
+ subtitleFont: 'Times',
34349
+ subtitleFontStyle: 'bold',
34350
+ commentFont: 'courier',
34351
+ commentFontStyle: 'normal',
34352
+ commentFontSize: 16
34353
+ };
33346
34354
  }
33347
34355
  print(map, options) {
33348
34356
  const status$ = new Subject();
@@ -33351,9 +34359,11 @@ class PrintService {
33351
34359
  const orientation = options.orientation;
33352
34360
  const legendPostion = options.legendPosition;
33353
34361
  this.activityId = this.activityService.register();
33354
- const doc = new jspdf({
34362
+ jsGeoPdfPlugin(jsPDF.API);
34363
+ const doc = new jsPDF({
33355
34364
  orientation,
33356
- format: paperFormat.toLowerCase()
34365
+ format: paperFormat.toLowerCase(),
34366
+ unit: 'mm' // default
33357
34367
  });
33358
34368
  const dimensions = [
33359
34369
  doc.internal.pageSize.width,
@@ -33363,17 +34373,21 @@ class PrintService {
33363
34373
  const width = dimensions[0] - margins[3] - margins[1];
33364
34374
  const height = dimensions[1] - margins[0] - margins[2];
33365
34375
  const size = [width, height];
33366
- let titleSizeResults = [0, 0];
34376
+ let titleSizes;
34377
+ let subtitleSizes;
34378
+ // PDF title
33367
34379
  if (options.title !== undefined) {
33368
- titleSizeResults = this.getTitleSize(options.title, width, height, doc); // return : size(pt) and left margin (mm)
33369
- this.addTitle(doc, options.title, titleSizeResults[0], margins[3] + titleSizeResults[1], titleSizeResults[0] * (25.4 / 72));
34380
+ const fontSizeInPt = Math.round(2 * (height + 145) * 0.05) / 2; //calculate the fontSize title from the page height.
34381
+ titleSizes = this.getTextPdfObjectSizeAndMarg(options.title, margins, this.TEXTPDFFONT.titleFont, fontSizeInPt, this.TEXTPDFFONT.titleFontStyle, doc);
34382
+ this.addTextInPdfDoc(doc, options.title, this.TEXTPDFFONT.titleFont, this.TEXTPDFFONT.titleFontStyle, titleSizes.fontSize, titleSizes.marginLeft + margins[3], margins[0]);
34383
+ margins[0] = titleSizes.height + margins[0]; // cumulative margin top for next elem to place in pdf doc
33370
34384
  }
34385
+ // PDF subtitle
33371
34386
  if (options.subtitle !== undefined) {
33372
- let subtitleSizeResult = 0;
33373
- const titleH = titleSizeResults[0];
33374
- subtitleSizeResult = this.getSubTitleSize(options.subtitle, width, height, doc); // return : size(pt) and left margin (mm)
33375
- this.addSubTitle(doc, options.subtitle, titleH * 0.7, margins[3] + subtitleSizeResult, titleH * 1.7 * (25.4 / 72));
33376
- margins[0] = margins[0] + titleSizeResults[0] * 0.7 * (25.4 / 72);
34387
+ subtitleSizes = this.getTextPdfObjectSizeAndMarg(options.subtitle, margins, this.TEXTPDFFONT.subtitleFont, titleSizes.fontSize * 0.7, // 70% size of title
34388
+ this.TEXTPDFFONT.subtitleFontStyle, doc);
34389
+ this.addTextInPdfDoc(doc, options.subtitle, this.TEXTPDFFONT.subtitleFont, this.TEXTPDFFONT.subtitleFontStyle, subtitleSizes.fontSize, subtitleSizes.marginLeft + margins[3], margins[0]);
34390
+ margins[0] += 5; // cumulative marg top for next elem to place in pdf doc. 5 is a fix it could be adjust
33377
34391
  }
33378
34392
  if (options.showProjection === true || options.showScale === true) {
33379
34393
  this.addProjScale(doc, map, resolution, options.showProjection, options.showScale);
@@ -33385,6 +34399,10 @@ class PrintService {
33385
34399
  if (status === SubjectStatus.Done) {
33386
34400
  yield this.addScale(doc, map, margins);
33387
34401
  yield this.handleMeasureLayer(doc, map, margins);
34402
+ const width = this.imgSizeAdded[0];
34403
+ const height = this.imgSizeAdded[1];
34404
+ const res = 1;
34405
+ this.addGeoRef(doc, map, width, height, res, margins);
33388
34406
  if (options.legendPosition !== 'none') {
33389
34407
  if (['topleft', 'topright', 'bottomleft', 'bottomright'].indexOf(options.legendPosition) > -1) {
33390
34408
  yield this.addLegendSamePage(doc, map, margins, resolution, options.legendPosition);
@@ -33404,6 +34422,20 @@ class PrintService {
33404
34422
  }));
33405
34423
  return status$;
33406
34424
  }
34425
+ // ref GeoMoose https://github.com/geomoose/gm3/tree/main/src/gm3/components/print
34426
+ addGeoRef(doc, map, width, height, resolution, margins) {
34427
+ const unit = 'mm';
34428
+ const docHeight = doc.internal.pageSize.getHeight();
34429
+ // x,y = margin left-bottom corner for img in pdf doc
34430
+ const x = margins[3];
34431
+ const y = docHeight - margins[0] - height;
34432
+ let pdf_extents = [x, y, x + width, y + height];
34433
+ for (let i = 0; i < pdf_extents.length; i++) {
34434
+ pdf_extents[i] = this.pdf_units2points(pdf_extents[i], unit);
34435
+ }
34436
+ const mapExtent = map.viewController.getExtent('EPSG:3857');
34437
+ doc.setGeoArea(pdf_extents, mapExtent);
34438
+ }
33407
34439
  /**
33408
34440
  * Add measure overlay on the map on the document when the measure layer is present
33409
34441
  * @param doc - Pdf document where measure tooltip will be added
@@ -33527,66 +34559,46 @@ class PrintService {
33527
34559
  return status$;
33528
34560
  });
33529
34561
  }
33530
- getTitleSize(title, pageWidth, pageHeight, doc) {
34562
+ getTextPdfObjectSizeAndMarg(text, margins, font, fontSizeInPt, fontStyle, doc) {
33531
34563
  const pdfResolution = 96;
33532
- const titleSize = Math.round(2 * (pageHeight + 145) * 0.05) / 2;
33533
- doc.setFont('Times', 'bold');
33534
- const width = doc.getTextWidth(title);
33535
- const titleWidth = doc.getStringUnitWidth(title) * titleSize / doc.internal.scaleFactor;
33536
- const titleTailleMinimale = Math.round(2 * (pageHeight + 150) * 0.037) / 2;
33537
- let titleFontSize = 0;
33538
- let titleMarginLeft;
33539
- if (titleWidth >= (pageWidth)) {
33540
- titleMarginLeft = 0;
33541
- titleFontSize = Math.round(((pageWidth / title.length) * pdfResolution) / 25.4);
33542
- // If the formula to find the font size gives below the defined minimum size
33543
- if (titleFontSize < titleTailleMinimale) {
33544
- titleFontSize = titleTailleMinimale;
33545
- }
33546
- }
33547
- else {
33548
- titleMarginLeft = (pageWidth - titleWidth) / 2;
33549
- titleFontSize = titleSize;
33550
- }
33551
- return [titleFontSize, titleMarginLeft];
33552
- }
33553
- getSubTitleSize(subtitle, pageWidth, pageHeight, doc) {
33554
- const subtitleSize = 0.7 * Math.round(2 * (pageHeight + 145) * 0.05) / 2; // 70% of the title's font size
33555
- doc.setFont('Times', 'bold');
33556
- const subtitleWidth = doc.getStringUnitWidth(subtitle) * subtitleSize / doc.internal.scaleFactor;
33557
- let subtitleMarginLeft;
33558
- if (subtitleWidth >= (pageWidth)) {
33559
- subtitleMarginLeft = 0;
34564
+ const docWidth = doc.internal.pageSize.getWidth();
34565
+ const pageWidth = docWidth - margins[1] - margins[3];
34566
+ // important to set it first, the textDimension change when font change!
34567
+ doc.setFont(font, fontStyle);
34568
+ doc.setFontSize(fontSizeInPt);
34569
+ let textDimensions = doc.getTextDimensions(text);
34570
+ let textMarginLeft;
34571
+ if (textDimensions.w > pageWidth) {
34572
+ // if the text is to long, reduce fontSize 70% and the overflow with be cut in print...
34573
+ textMarginLeft = 0;
34574
+ fontSizeInPt = fontSizeInPt * 0.7;
34575
+ doc.setFontSize(fontSizeInPt);
34576
+ textDimensions = doc.getTextDimensions(text);
33560
34577
  }
33561
34578
  else {
33562
- subtitleMarginLeft = (pageWidth - subtitleWidth) / 2;
34579
+ textMarginLeft = (pageWidth - textDimensions.w) / 2;
33563
34580
  }
33564
- return subtitleMarginLeft;
33565
- }
33566
- addTitle(doc, title, titleFontSize, titleMarginLeft, titleMarginTop) {
33567
- doc.setFont('Times', 'bold');
33568
- doc.setFontSize(titleFontSize);
33569
- doc.text(title, titleMarginLeft, titleMarginTop);
33570
- }
33571
- addSubTitle(doc, subtitle, subtitleFontSize, subtitleMarginLeft, subtitleMarginTop) {
33572
- doc.setFont('Times', 'bold');
33573
- doc.setFontSize(subtitleFontSize);
33574
- doc.text(subtitle, subtitleMarginLeft, subtitleMarginTop);
34581
+ return {
34582
+ 'fontSize': fontSizeInPt,
34583
+ 'marginLeft': textMarginLeft,
34584
+ 'height': textDimensions.h
34585
+ };
33575
34586
  }
33576
34587
  /**
33577
34588
  * Add comment to the document
33578
34589
  * * @param doc - pdf document
33579
34590
  * * @param comment - Comment to add in the document
33580
- * * @param size - Size of the document
33581
34591
  */
33582
34592
  addComment(doc, comment) {
33583
- const commentSize = 16;
33584
- const commentMarginLeft = 20;
33585
- const marginBottom = 5;
33586
- const heightPixels = doc.internal.pageSize.height - marginBottom;
33587
- doc.setFont('courier');
33588
- doc.setFontSize(commentSize);
33589
- doc.text(comment, commentMarginLeft, heightPixels);
34593
+ const commentMarginLeft = 20; //margin left and bottom is fix
34594
+ const commentMarginBottom = 5;
34595
+ const marginTop = doc.internal.pageSize.height - commentMarginBottom;
34596
+ this.addTextInPdfDoc(doc, comment, this.TEXTPDFFONT.commentFont, this.TEXTPDFFONT.commentFontStyle, this.TEXTPDFFONT.commentFontSize, commentMarginLeft, marginTop);
34597
+ }
34598
+ addTextInPdfDoc(doc, textToAdd, textFont, textFontStyle, textFontSize, textMarginLeft, textMarginTop) {
34599
+ doc.setFont(textFont, textFontStyle);
34600
+ doc.setFontSize(textFontSize);
34601
+ doc.text(textToAdd, textMarginLeft, textMarginTop);
33590
34602
  }
33591
34603
  /**
33592
34604
  * Add projection and/or scale to the document
@@ -33764,9 +34776,14 @@ class PrintService {
33764
34776
  image = canvas.toDataURL('image/png');
33765
34777
  }
33766
34778
  if (image !== undefined) {
34779
+ if (image.length < 20) { // img is corrupt todo: fix addScale in mobile make a corrupt img
34780
+ console.log('Warning: An image cannot be print in pdf file');
34781
+ return;
34782
+ }
33767
34783
  const imageSize = this.getImageSizeToFitPdf(doc, canvas, margins);
33768
34784
  doc.addImage(image, 'PNG', margins[3], margins[0], imageSize[0], imageSize[1]);
33769
34785
  doc.rect(margins[3], margins[0], imageSize[0], imageSize[1]);
34786
+ this.imgSizeAdded = imageSize; // keep img size for georef later
33770
34787
  }
33771
34788
  }
33772
34789
  // TODO fix printing with image resolution
@@ -34001,7 +35018,7 @@ class PrintService {
34001
35018
  */
34002
35019
  saveDoc(doc) {
34003
35020
  return __awaiter(this, void 0, void 0, function* () {
34004
- yield doc.save('map.pdf', { returnPromise: true });
35021
+ yield doc.save('map_georef.pdf', { returnPromise: true });
34005
35022
  });
34006
35023
  }
34007
35024
  /**
@@ -34014,8 +35031,8 @@ class PrintService {
34014
35031
  // Define variable to calculate best size to fit in one page
34015
35032
  const pageHeight = doc.internal.pageSize.getHeight() - (margins[0] + margins[2]);
34016
35033
  const pageWidth = doc.internal.pageSize.getWidth() - (margins[1] + margins[3]);
34017
- const canHeight = canvas.height;
34018
- const canWidth = canvas.width;
35034
+ const canHeight = this.pdf_units2points(canvas.height, 'mm');
35035
+ const canWidth = this.pdf_units2points(canvas.width, 'mm');
34019
35036
  const heightRatio = canHeight / pageHeight;
34020
35037
  const widthRatio = canWidth / pageWidth;
34021
35038
  const maxRatio = heightRatio > widthRatio ? heightRatio : widthRatio;
@@ -34131,6 +35148,41 @@ class PrintService {
34131
35148
  delete that.zipFile;
34132
35149
  });
34133
35150
  }
35151
+ pdf_units2points(n, unit) {
35152
+ let k = 1;
35153
+ // this code is borrowed from jsPDF
35154
+ // as it does not expose a public API
35155
+ // for converting units to points.
35156
+ switch (unit) {
35157
+ case 'pt':
35158
+ k = 1;
35159
+ break;
35160
+ case 'mm':
35161
+ k = 72 / 25.4;
35162
+ break;
35163
+ case 'cm':
35164
+ k = 72 / 2.54;
35165
+ break;
35166
+ case 'in':
35167
+ k = 72;
35168
+ break;
35169
+ case 'px':
35170
+ k = 96 / 72;
35171
+ break;
35172
+ case 'pc':
35173
+ k = 12;
35174
+ break;
35175
+ case 'em':
35176
+ k = 12;
35177
+ break;
35178
+ case 'ex':
35179
+ k = 6;
35180
+ break;
35181
+ default:
35182
+ throw new Error('Invalid unit: ' + unit);
35183
+ }
35184
+ return n * k;
35185
+ }
34134
35186
  }
34135
35187
  PrintService.ɵfac = function PrintService_Factory(t) { return new (t || PrintService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(i2$1.MessageService), i0.ɵɵinject(i2$1.ActivityService), i0.ɵɵinject(i2$1.LanguageService), i0.ɵɵinject(i2$1.ConfigService)); };
34136
35188
  PrintService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PrintService, factory: PrintService.ɵfac, providedIn: 'root' });
@@ -35714,6 +36766,7 @@ function featureToSearchResult(feature, source) {
35714
36766
  delete feature.properties.SHAPE_P;
35715
36767
  delete feature.properties.the_geom;
35716
36768
  delete feature.properties.geom;
36769
+ delete feature.properties.geom32198;
35717
36770
  }
35718
36771
  feature.sourceId = source.getId();
35719
36772
  return {
@@ -36854,6 +37907,30 @@ class IChercheSearchSource extends SearchSource {
36854
37907
  enabled: types.indexOf('anciennes-adresses') !== -1,
36855
37908
  hashtags: ['anciennes-adresses']
36856
37909
  },
37910
+ {
37911
+ title: 'igo.geo.search.icherche.type.oldCity',
37912
+ value: 'anciennes-municipalites',
37913
+ enabled: types.indexOf('anciennes-municipalites') !== -1,
37914
+ hashtags: ['anciennes-municipalites']
37915
+ },
37916
+ {
37917
+ title: 'igo.geo.search.icherche.type.cn',
37918
+ value: 'bornes-cn',
37919
+ enabled: types.indexOf('bornes-cn') !== -1,
37920
+ hashtags: ['borne', 'bornes', 'cn']
37921
+ },
37922
+ {
37923
+ title: 'igo.geo.search.icherche.type.sumi',
37924
+ value: 'bornes-sumi',
37925
+ enabled: types.indexOf('bornes-sumi') !== -1,
37926
+ hashtags: ['borne', 'bornes', 'sumi']
37927
+ },
37928
+ {
37929
+ title: 'igo.geo.search.icherche.type.cadastre',
37930
+ value: 'cadastre',
37931
+ enabled: types.indexOf('cadastre') !== -1,
37932
+ hashtags: ['cadastre']
37933
+ },
36857
37934
  {
36858
37935
  title: 'igo.geo.search.icherche.type.postalCode',
36859
37936
  value: 'codes-postaux',
@@ -36861,10 +37938,29 @@ class IChercheSearchSource extends SearchSource {
36861
37938
  hashtags: ['code-postal']
36862
37939
  },
36863
37940
  {
36864
- title: 'igo.geo.search.icherche.type.road',
36865
- value: 'routes',
36866
- enabled: types.indexOf('routes') !== -1,
36867
- hashtags: ['route']
37941
+ title: 'igo.geo.search.icherche.type.entreprise',
37942
+ value: 'entreprises',
37943
+ enabled: types.indexOf('entreprises') !== -1,
37944
+ available: false,
37945
+ hashtags: ['entreprise']
37946
+ },
37947
+ {
37948
+ title: 'igo.geo.search.icherche.type.cycleStop',
37949
+ value: 'haltes_cyclables',
37950
+ enabled: types.indexOf('haltes_cyclables') !== -1,
37951
+ hashtags: ['haltevelo', 'haltes_cyclables']
37952
+ },
37953
+ {
37954
+ title: 'igo.geo.search.icherche.type.restArea',
37955
+ value: 'haltes_routieres',
37956
+ enabled: types.indexOf('haltes_routieres') !== -1,
37957
+ hashtags: ['halteroute', 'haltes_routieres']
37958
+ },
37959
+ {
37960
+ title: 'igo.geo.search.icherche.type.hq',
37961
+ value: 'hq',
37962
+ enabled: types.indexOf('hq') !== -1,
37963
+ hashtags: ['hq']
36868
37964
  },
36869
37965
  {
36870
37966
  title: 'igo.geo.search.icherche.type.intersection',
@@ -36873,16 +37969,10 @@ class IChercheSearchSource extends SearchSource {
36873
37969
  hashtags: ['intersection', '+']
36874
37970
  },
36875
37971
  {
36876
- title: 'igo.geo.search.icherche.type.city',
36877
- value: 'municipalites',
36878
- enabled: types.indexOf('municipalites') !== -1,
36879
- hashtags: ['municipalité', 'mun']
36880
- },
36881
- {
36882
- title: 'igo.geo.search.icherche.type.oldCity',
36883
- value: 'anciennes-municipalites',
36884
- enabled: types.indexOf('anciennes-municipalites') !== -1,
36885
- hashtags: ['anciennes-municipalites']
37972
+ title: 'igo.geo.search.icherche.type.place',
37973
+ value: 'lieux',
37974
+ enabled: types.indexOf('lieux') !== -1,
37975
+ hashtags: ['lieu']
36886
37976
  },
36887
37977
  {
36888
37978
  title: 'igo.geo.search.icherche.type.mrc',
@@ -36890,37 +37980,18 @@ class IChercheSearchSource extends SearchSource {
36890
37980
  enabled: types.indexOf('mrc') !== -1,
36891
37981
  hashtags: ['mrc']
36892
37982
  },
37983
+ {
37984
+ title: 'igo.geo.search.icherche.type.city',
37985
+ value: 'municipalites',
37986
+ enabled: types.indexOf('municipalites') !== -1,
37987
+ hashtags: ['municipalité', 'mun']
37988
+ },
36893
37989
  {
36894
37990
  title: 'igo.geo.search.icherche.type.regadmin',
36895
37991
  value: 'regadmin',
36896
37992
  enabled: types.indexOf('regadmin') !== -1,
36897
37993
  hashtags: ['région-administrative', 'regadmin']
36898
37994
  },
36899
- {
36900
- title: 'igo.geo.search.icherche.type.entreprise',
36901
- value: 'entreprises',
36902
- enabled: types.indexOf('entreprises') !== -1,
36903
- available: false,
36904
- hashtags: ['entreprise']
36905
- },
36906
- {
36907
- title: 'igo.geo.search.icherche.type.place',
36908
- value: 'lieux',
36909
- enabled: types.indexOf('lieux') !== -1,
36910
- hashtags: ['lieu']
36911
- },
36912
- {
36913
- title: 'igo.geo.search.icherche.type.exit',
36914
- value: 'sorties-autoroute',
36915
- enabled: types.indexOf('sorties-autoroute') !== -1,
36916
- hashtags: ['sortie', 'sorties', 'exit']
36917
- },
36918
- {
36919
- title: 'igo.geo.search.icherche.type.km',
36920
- value: 'bornes-km',
36921
- enabled: types.indexOf('bornes-km') !== -1,
36922
- hashtags: ['borne', 'bornes', 'repère', 'km']
36923
- },
36924
37995
  {
36925
37996
  title: 'igo.geo.search.icherche.type.gcc',
36926
37997
  value: 'bornes-gcc',
@@ -36928,28 +37999,22 @@ class IChercheSearchSource extends SearchSource {
36928
37999
  hashtags: ['borne', 'bornes', 'repère', 'gcc', 'ccg']
36929
38000
  },
36930
38001
  {
36931
- title: 'igo.geo.search.icherche.type.cn',
36932
- value: 'bornes-cn',
36933
- enabled: types.indexOf('bornes-cn') !== -1,
36934
- hashtags: ['borne', 'bornes', 'cn']
36935
- },
36936
- {
36937
- title: 'igo.geo.search.icherche.type.sumi',
36938
- value: 'bornes-sumi',
36939
- enabled: types.indexOf('bornes-sumi') !== -1,
36940
- hashtags: ['borne', 'bornes', 'sumi']
38002
+ title: 'igo.geo.search.icherche.type.km',
38003
+ value: 'bornes-km',
38004
+ enabled: types.indexOf('bornes-km') !== -1,
38005
+ hashtags: ['borne', 'bornes', 'repère', 'km']
36941
38006
  },
36942
38007
  {
36943
- title: 'igo.geo.search.icherche.type.hq',
36944
- value: 'hq',
36945
- enabled: types.indexOf('hq') !== -1,
36946
- hashtags: ['hq']
38008
+ title: 'igo.geo.search.icherche.type.road',
38009
+ value: 'routes',
38010
+ enabled: types.indexOf('routes') !== -1,
38011
+ hashtags: ['route']
36947
38012
  },
36948
38013
  {
36949
- title: 'igo.geo.search.icherche.type.cadastre',
36950
- value: 'cadastre',
36951
- enabled: types.indexOf('cadastre') !== -1,
36952
- hashtags: ['cadastre']
38014
+ title: 'igo.geo.search.icherche.type.exit',
38015
+ value: 'sorties-autoroute',
38016
+ enabled: types.indexOf('sorties-autoroute') !== -1,
38017
+ hashtags: ['sortie', 'sorties', 'exit']
36953
38018
  }
36954
38019
  ]
36955
38020
  },
@@ -38669,7 +39734,7 @@ SearchSettingsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Sea
38669
39734
  i0.ɵɵadvance(1);
38670
39735
  i0.ɵɵproperty("ngIf", ctx.hasPointerReverseSearchSource && !ctx.isTouchScreen);
38671
39736
  }
38672
- }, dependencies: [i1$1.NgForOf, i1$1.NgIf, i1$1.NgSwitch, i1$1.NgSwitchCase, i4.MatTooltip, i2.MatIcon, i3.MatButton, i7$2.MatMenu, i7$2.MatMenuItem, i7$2.MatMenuTrigger, i17.MatRadioGroup, i17.MatRadioButton, i12$1.MatCheckbox, i11.MatDivider, i23.MatSlideToggle, i7.TranslatePipe], styles: [".checkAllButton[_ngcontent-%COMP%]{text-align:center;padding:0 5px}.igo-search-settings-button[_ngcontent-%COMP%] div.mat-button-ripple-round{border-radius:0}.igo-search-settings-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column}.igo-search-settings-radio-group[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]{margin:5px}.igo-search-settings-checkbox[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]{display:flex}.igo-search-settings-search-source[_ngcontent-%COMP%]{display:flex;width:100%}.igo-search-settings-search-source[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:flex;margin-left:5px;margin-right:5px}.pointer-summary-option[_ngcontent-%COMP%]{display:block;margin-right:10px;margin-bottom:15px}.pointer-summary-slide-toggle-container[_ngcontent-%COMP%]{overflow-x:hidden}.pointer-summary-slide-toggle-container[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{margin:10px}"], changeDetection: 0 });
39737
+ }, dependencies: [i1$1.NgForOf, i1$1.NgIf, i1$1.NgSwitch, i1$1.NgSwitchCase, i4.MatTooltip, i2.MatIcon, i3.MatButton, i7$2.MatMenu, i7$2.MatMenuItem, i7$2.MatMenuTrigger, i17.MatRadioGroup, i17.MatRadioButton, i12.MatCheckbox, i11.MatDivider, i23.MatSlideToggle, i7.TranslatePipe], styles: [".checkAllButton[_ngcontent-%COMP%]{text-align:center;padding:0 5px}.igo-search-settings-button[_ngcontent-%COMP%] div.mat-button-ripple-round{border-radius:0}.igo-search-settings-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column}.igo-search-settings-radio-group[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]{margin:5px}.igo-search-settings-checkbox[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]{display:flex}.igo-search-settings-search-source[_ngcontent-%COMP%]{display:flex;width:100%}.igo-search-settings-search-source[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:flex;margin-left:5px;margin-right:5px}.pointer-summary-option[_ngcontent-%COMP%]{display:block;margin-right:10px;margin-bottom:15px}.pointer-summary-slide-toggle-container[_ngcontent-%COMP%]{overflow-x:hidden}.pointer-summary-slide-toggle-container[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{margin:10px}"], changeDetection: 0 });
38673
39738
  (function () {
38674
39739
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchSettingsComponent, [{
38675
39740
  type: Component,
@@ -38756,29 +39821,27 @@ function SearchBarComponent_mat_label_3_Template(rf, ctx) {
38756
39821
  }
38757
39822
  function SearchBarComponent_button_11_Template(rf, ctx) {
38758
39823
  if (rf & 1) {
39824
+ const _r7 = i0.ɵɵgetCurrentView();
38759
39825
  i0.ɵɵelementStart(0, "button", 10);
38760
- i0.ɵɵelement(1, "mat-icon", 11);
39826
+ i0.ɵɵlistener("click", function SearchBarComponent_button_11_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.onClearButtonClick()); });
39827
+ i0.ɵɵpipe(1, "translate");
39828
+ i0.ɵɵelement(2, "mat-icon", 11);
38761
39829
  i0.ɵɵelementEnd();
38762
39830
  }
38763
39831
  if (rf & 2) {
38764
39832
  const ctx_r2 = i0.ɵɵnextContext();
38765
- i0.ɵɵproperty("color", ctx_r2.color);
38766
- i0.ɵɵadvance(1);
38767
- i0.ɵɵpropertyInterpolate("svgIcon", ctx_r2.searchIcon);
39833
+ i0.ɵɵproperty("color", ctx_r2.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.geo.search.clearSearch"));
38768
39834
  }
38769
39835
  }
38770
- function SearchBarComponent_button_12_Template(rf, ctx) {
39836
+ function SearchBarComponent_button_13_Template(rf, ctx) {
38771
39837
  if (rf & 1) {
38772
- const _r7 = i0.ɵɵgetCurrentView();
38773
39838
  i0.ɵɵelementStart(0, "button", 12);
38774
- i0.ɵɵlistener("click", function SearchBarComponent_button_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.onClearButtonClick()); });
38775
- i0.ɵɵpipe(1, "translate");
38776
- i0.ɵɵelement(2, "mat-icon", 13);
39839
+ i0.ɵɵelement(1, "mat-icon", 13);
38777
39840
  i0.ɵɵelementEnd();
38778
39841
  }
38779
39842
  if (rf & 2) {
38780
39843
  const ctx_r3 = i0.ɵɵnextContext();
38781
- i0.ɵɵproperty("color", ctx_r3.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.geo.search.clearSearch"));
39844
+ i0.ɵɵproperty("color", ctx_r3.color);
38782
39845
  }
38783
39846
  }
38784
39847
  function SearchBarComponent_igo_search_selector_14_Template(rf, ctx) {
@@ -38814,8 +39877,8 @@ const _c2$1 = function (a0) { return { "hasSearchIcon": a0 }; };
38814
39877
  * into that store. An event is always emitted when a research is completed.
38815
39878
  */
38816
39879
  class SearchBarComponent {
38817
- constructor(languageService, searchService, searchSourceService) {
38818
- this.languageService = languageService;
39880
+ constructor(configService, searchService, searchSourceService) {
39881
+ this.configService = configService;
38819
39882
  this.searchService = searchService;
38820
39883
  this.searchSourceService = searchSourceService;
38821
39884
  this.placeholder$ = new BehaviorSubject('igo.geo.search.placeholder');
@@ -38824,6 +39887,10 @@ class SearchBarComponent {
38824
39887
  * Search term stream
38825
39888
  */
38826
39889
  this.stream$ = new BehaviorSubject('');
39890
+ /**
39891
+ * whether to show search button or not
39892
+ */
39893
+ this.showSearchButton = false;
38827
39894
  /**
38828
39895
  * List of available search types
38829
39896
  */
@@ -38935,12 +40002,14 @@ class SearchBarComponent {
38935
40002
  this.empty$.next(term === undefined || term.length === 0);
38936
40003
  });
38937
40004
  this.stream$$ = this.stream$
38938
- .pipe(debounce((term) => (term === '' ? EMPTY : timer(this.debounce))))
40005
+ .pipe(debounce(() => timer(this.debounce)))
38939
40006
  .subscribe((term) => this.onSetTerm(term));
38940
40007
  this.handlePlaceholder();
38941
40008
  this.searchType$$ = this.searchType$
38942
40009
  .pipe(distinctUntilChanged())
38943
40010
  .subscribe((searchType) => this.onSetSearchType(searchType));
40011
+ const configValue = this.configService.getConfig("searchBar.showSearchButton");
40012
+ this.showSearchButton = configValue !== undefined ? configValue : false;
38944
40013
  }
38945
40014
  /**
38946
40015
  * Unsubscribe to the search term stream
@@ -39128,7 +40197,7 @@ SearchBarComponent.invalidKeys = [
39128
40197
  'ArrowRight',
39129
40198
  'ArrowLeft'
39130
40199
  ];
39131
- SearchBarComponent.ɵfac = function SearchBarComponent_Factory(t) { return new (t || SearchBarComponent)(i0.ɵɵdirectiveInject(i2$1.LanguageService), i0.ɵɵdirectiveInject(SearchService), i0.ɵɵdirectiveInject(SearchSourceService)); };
40200
+ SearchBarComponent.ɵfac = function SearchBarComponent_Factory(t) { return new (t || SearchBarComponent)(i0.ɵɵdirectiveInject(i2$1.ConfigService), i0.ɵɵdirectiveInject(SearchService), i0.ɵɵdirectiveInject(SearchSourceService)); };
39132
40201
  SearchBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchBarComponent, selectors: [["igo-search-bar"]], viewQuery: function SearchBarComponent_Query(rf, ctx) {
39133
40202
  if (rf & 1) {
39134
40203
  i0.ɵɵviewQuery(_c0$3, 7);
@@ -39137,7 +40206,7 @@ SearchBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchBa
39137
40206
  let _t;
39138
40207
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.input = _t.first);
39139
40208
  }
39140
- }, inputs: { searchTypes: "searchTypes", searchType: "searchType", term: "term", disabled: "disabled", pointerSummaryEnabled: "pointerSummaryEnabled", searchResultsGeometryEnabled: "searchResultsGeometryEnabled", floatLabel: "floatLabel", appearance: "appearance", placeholder: "placeholder", label: "label", color: "color", termSplitter: "termSplitter", debounce: "debounce", minLength: "minLength", searchIcon: "searchIcon", searchSelector: "searchSelector", searchSettings: "searchSettings", forceNA: "forceNA", store: "store" }, outputs: { pointerSummaryStatus: "pointerSummaryStatus", searchResultsGeometryStatus: "searchResultsGeometryStatus", searchTermChange: "searchTermChange", search: "search", searchTypeChange: "searchTypeChange", clearFeature: "clearFeature", searchSettingsChange: "searchSettingsChange" }, decls: 16, vars: 28, consts: [[1, "igo-search-bar-container", 3, "ngClass"], [3, "floatLabel", "appearance"], [4, "ngIf"], ["matInput", "", "autocomplete", "off", 3, "ngClass", "disabled", "placeholder", "value", "keyup", "touchend"], ["input", ""], [1, "search-bar-buttons"], ["mat-icon-button", "", 3, "color", 4, "ngIf"], ["mat-icon-button", "", 3, "color", "matTooltip", "click", 4, "ngIf"], [3, "searchTypes", "searchType", "searchTypeChange", 4, "ngIf"], [3, "pointerSummaryEnabled", "searchResultsGeometryEnabled", "pointerSummaryStatus", "searchResultsGeometryStatus", "searchSourceChange", 4, "ngIf"], ["mat-icon-button", "", 3, "color"], [3, "svgIcon"], ["mat-icon-button", "", 3, "color", "matTooltip", "click"], ["svgIcon", "close"], [3, "searchTypes", "searchType", "searchTypeChange"], [3, "pointerSummaryEnabled", "searchResultsGeometryEnabled", "pointerSummaryStatus", "searchResultsGeometryStatus", "searchSourceChange"]], template: function SearchBarComponent_Template(rf, ctx) {
40209
+ }, inputs: { searchTypes: "searchTypes", searchType: "searchType", term: "term", disabled: "disabled", pointerSummaryEnabled: "pointerSummaryEnabled", searchResultsGeometryEnabled: "searchResultsGeometryEnabled", floatLabel: "floatLabel", appearance: "appearance", placeholder: "placeholder", label: "label", color: "color", termSplitter: "termSplitter", debounce: "debounce", minLength: "minLength", searchSelector: "searchSelector", searchSettings: "searchSettings", forceNA: "forceNA", store: "store" }, outputs: { pointerSummaryStatus: "pointerSummaryStatus", searchResultsGeometryStatus: "searchResultsGeometryStatus", searchTermChange: "searchTermChange", search: "search", searchTypeChange: "searchTypeChange", clearFeature: "clearFeature", searchSettingsChange: "searchSettingsChange" }, decls: 16, vars: 28, consts: [[1, "igo-search-bar-container", 3, "ngClass"], [3, "floatLabel", "appearance"], [4, "ngIf"], ["matInput", "", "autocomplete", "off", 3, "ngClass", "disabled", "placeholder", "value", "keyup", "touchend"], ["input", ""], [1, "search-bar-buttons"], ["mat-icon-button", "", 3, "color", "matTooltip", "click", 4, "ngIf"], ["mat-icon-button", "", 3, "color", 4, "ngIf"], [3, "searchTypes", "searchType", "searchTypeChange", 4, "ngIf"], [3, "pointerSummaryEnabled", "searchResultsGeometryEnabled", "pointerSummaryStatus", "searchResultsGeometryStatus", "searchSourceChange", 4, "ngIf"], ["mat-icon-button", "", 3, "color", "matTooltip", "click"], ["svgIcon", "close"], ["mat-icon-button", "", 3, "color"], ["svgIcon", "magnify"], [3, "searchTypes", "searchType", "searchTypeChange"], [3, "pointerSummaryEnabled", "searchResultsGeometryEnabled", "pointerSummaryStatus", "searchResultsGeometryStatus", "searchSourceChange"]], template: function SearchBarComponent_Template(rf, ctx) {
39141
40210
  if (rf & 1) {
39142
40211
  i0.ɵɵelementStart(0, "div", 0);
39143
40212
  i0.ɵɵpipe(1, "async");
@@ -39151,9 +40220,9 @@ SearchBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchBa
39151
40220
  i0.ɵɵpipe(9, "async");
39152
40221
  i0.ɵɵelementEnd()();
39153
40222
  i0.ɵɵelementStart(10, "div", 5);
39154
- i0.ɵɵtemplate(11, SearchBarComponent_button_11_Template, 2, 2, "button", 6);
39155
- i0.ɵɵtemplate(12, SearchBarComponent_button_12_Template, 3, 4, "button", 7);
39156
- i0.ɵɵpipe(13, "async");
40223
+ i0.ɵɵtemplate(11, SearchBarComponent_button_11_Template, 3, 4, "button", 6);
40224
+ i0.ɵɵpipe(12, "async");
40225
+ i0.ɵɵtemplate(13, SearchBarComponent_button_13_Template, 2, 1, "button", 7);
39157
40226
  i0.ɵɵtemplate(14, SearchBarComponent_igo_search_selector_14_Template, 2, 4, "igo-search-selector", 8);
39158
40227
  i0.ɵɵtemplate(15, SearchBarComponent_igo_search_settings_15_Template, 1, 2, "igo-search-settings", 9);
39159
40228
  i0.ɵɵelementEnd()();
@@ -39165,12 +40234,12 @@ SearchBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchBa
39165
40234
  i0.ɵɵadvance(1);
39166
40235
  i0.ɵɵproperty("ngIf", ctx.label);
39167
40236
  i0.ɵɵadvance(1);
39168
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(26, _c2$1, ctx.searchIcon))("disabled", i0.ɵɵpipeBind1(6, 14, ctx.disabled$))("placeholder", ctx.placeholder ? ctx.placeholder : i0.ɵɵpipeBind1(7, 16, ctx.placeholder$) ? i0.ɵɵpipeBind1(8, 18, ctx.placeholder$.value) : undefined)("value", i0.ɵɵpipeBind1(9, 20, ctx.term$));
40237
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(26, _c2$1, ctx.showSearchButton))("disabled", i0.ɵɵpipeBind1(6, 14, ctx.disabled$))("placeholder", ctx.placeholder ? ctx.placeholder : i0.ɵɵpipeBind1(7, 16, ctx.placeholder$) ? i0.ɵɵpipeBind1(8, 18, ctx.placeholder$.value) : undefined)("value", i0.ɵɵpipeBind1(9, 20, ctx.term$));
39169
40238
  i0.ɵɵadvance(7);
39170
- i0.ɵɵproperty("ngIf", ctx.searchIcon !== undefined);
39171
- i0.ɵɵadvance(1);
39172
- i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(13, 22, ctx.empty$) === false);
40239
+ i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(12, 22, ctx.empty$) === false);
39173
40240
  i0.ɵɵadvance(2);
40241
+ i0.ɵɵproperty("ngIf", ctx.showSearchButton);
40242
+ i0.ɵɵadvance(1);
39174
40243
  i0.ɵɵproperty("ngIf", ctx.searchSelector);
39175
40244
  i0.ɵɵadvance(1);
39176
40245
  i0.ɵɵproperty("ngIf", ctx.searchSettings);
@@ -39179,8 +40248,8 @@ SearchBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchBa
39179
40248
  (function () {
39180
40249
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchBarComponent, [{
39181
40250
  type: Component,
39182
- args: [{ selector: 'igo-search-bar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"igo-search-bar-container\" [ngClass]=\"{empty: empty$ | async}\">\n <mat-form-field [floatLabel]=\"floatLabel\" [appearance]=\"appearance\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input\n #input\n matInput\n autocomplete=\"off\"\n [ngClass]=\"{'hasSearchIcon': searchIcon}\"\n [disabled]=\"disabled$ | async\"\n [placeholder]=\"placeholder ? placeholder : (placeholder$ | async) ? (placeholder$.value | translate) : undefined\"\n [value]=\"term$ | async\"\n (keyup)=\"onKeyup($event)\"\n (touchend)=\"onKeyup($event)\">\n </mat-form-field>\n\n <div class=\"search-bar-buttons\">\n <button\n mat-icon-button\n [color]=\"color\"\n *ngIf=\"searchIcon !== undefined\">\n <mat-icon svgIcon=\"{{searchIcon}}\"></mat-icon>\n </button>\n\n <button\n *ngIf=\"(empty$ | async)===false\"\n mat-icon-button\n [color]=\"color\"\n (click)=\"onClearButtonClick()\"\n [matTooltip]=\"'igo.geo.search.clearSearch' | translate\">\n <mat-icon svgIcon=\"close\"></mat-icon>\n </button>\n\n <igo-search-selector\n *ngIf=\"searchSelector\"\n [searchTypes]=\"searchTypes\"\n [searchType]=\"searchType$ | async\"\n (searchTypeChange)=\"onSearchTypeChange($event)\">\n </igo-search-selector>\n\n <igo-search-settings\n *ngIf=\"searchSettings\"\n [pointerSummaryEnabled]=\"pointerSummaryEnabled\"\n (pointerSummaryStatus)=\"pointerSummaryStatus.emit($event)\"\n [searchResultsGeometryEnabled]=\"searchResultsGeometryEnabled\"\n (searchResultsGeometryStatus)=\"searchResultsGeometryStatus.emit($event)\"\n (searchSourceChange)=\"onSearchSettingsChange()\">\n </igo-search-settings>\n </div>\n</div>\n", styles: [":host ::ng-deep .mat-form-field{padding:0 5px}:host ::ng-deep .mat-form-field-wrapper{margin-bottom:-1.5em}:host ::ng-deep span.mat-form-field-label-wrapper{top:-20px}:host ::ng-deep div.mat-form-field-infix{left:5px;right:5px;padding:0 0 12px!important}:host ::ng-deep div.mat-form-field-underline{display:none}.igo-search-bar-container{position:relative;width:100%;display:inline-flex;overflow:hidden}.igo-search-bar-container>mat-form-field{width:calc(100% - 80px)}.igo-search-bar-container.empty>mat-form-field{width:calc(100% - 40px)}.search-bar-buttons{position:relative;right:0px;display:inline-flex;top:0}.search-bar-buttons>button:nth-child(2):before{content:\"\";left:0px;top:5px;border-right:1px solid #ddd;height:28px}igo-search-selector{background-color:#fff;top:0;border-radius:0}igo-search-settings{background-color:#fff;top:0;border-radius:0}\n"] }]
39183
- }], function () { return [{ type: i2$1.LanguageService }, { type: SearchService }, { type: SearchSourceService }]; }, { searchTypes: [{
40251
+ args: [{ selector: 'igo-search-bar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"igo-search-bar-container\" [ngClass]=\"{empty: empty$ | async}\">\n <mat-form-field [floatLabel]=\"floatLabel\" [appearance]=\"appearance\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input\n #input\n matInput\n autocomplete=\"off\"\n [ngClass]=\"{'hasSearchIcon': showSearchButton}\"\n [disabled]=\"disabled$ | async\"\n [placeholder]=\"placeholder ? placeholder : (placeholder$ | async) ? (placeholder$.value | translate) : undefined\"\n [value]=\"term$ | async\"\n (keyup)=\"onKeyup($event)\"\n (touchend)=\"onKeyup($event)\">\n </mat-form-field>\n\n <div class=\"search-bar-buttons\">\n <button *ngIf=\"(empty$ | async)===false\"\n mat-icon-button\n [color]=\"color\"\n (click)=\"onClearButtonClick()\"\n [matTooltip]=\"'igo.geo.search.clearSearch' | translate\">\n <mat-icon svgIcon=\"close\"></mat-icon>\n </button>\n \n <button *ngIf=\"showSearchButton\"\n mat-icon-button\n [color]=\"color\">\n <mat-icon svgIcon=\"magnify\"></mat-icon>\n </button>\n\n <igo-search-selector\n *ngIf=\"searchSelector\"\n [searchTypes]=\"searchTypes\"\n [searchType]=\"searchType$ | async\"\n (searchTypeChange)=\"onSearchTypeChange($event)\">\n </igo-search-selector>\n\n <igo-search-settings\n *ngIf=\"searchSettings\"\n [pointerSummaryEnabled]=\"pointerSummaryEnabled\"\n (pointerSummaryStatus)=\"pointerSummaryStatus.emit($event)\"\n [searchResultsGeometryEnabled]=\"searchResultsGeometryEnabled\"\n (searchResultsGeometryStatus)=\"searchResultsGeometryStatus.emit($event)\"\n (searchSourceChange)=\"onSearchSettingsChange()\">\n </igo-search-settings>\n </div>\n</div>\n", styles: [":host ::ng-deep .mat-form-field{padding:0 5px}:host ::ng-deep .mat-form-field-wrapper{margin-bottom:-1.5em}:host ::ng-deep span.mat-form-field-label-wrapper{top:-20px}:host ::ng-deep div.mat-form-field-infix{left:5px;right:5px;padding:0 0 12px!important}:host ::ng-deep div.mat-form-field-underline{display:none}.igo-search-bar-container{position:relative;width:100%;display:inline-flex;overflow:hidden}.igo-search-bar-container>mat-form-field{width:calc(100% - 80px)}.igo-search-bar-container.empty>mat-form-field{width:calc(100% - 40px)}.search-bar-buttons{position:relative;right:0px;display:inline-flex;top:0}.search-bar-buttons>button:nth-child(2):before{content:\"\";left:0px;top:5px;border-right:1px solid #ddd;height:28px}igo-search-selector{background-color:#fff;top:0;border-radius:0}igo-search-settings{background-color:#fff;top:0;border-radius:0}\n"] }]
40252
+ }], function () { return [{ type: i2$1.ConfigService }, { type: SearchService }, { type: SearchSourceService }]; }, { searchTypes: [{
39184
40253
  type: Input
39185
40254
  }], searchType: [{
39186
40255
  type: Input
@@ -39212,8 +40281,6 @@ SearchBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchBa
39212
40281
  type: Input
39213
40282
  }], minLength: [{
39214
40283
  type: Input
39215
- }], searchIcon: [{
39216
- type: Input
39217
40284
  }], searchSelector: [{
39218
40285
  type: Input
39219
40286
  }], searchSettings: [{
@@ -39572,9 +40639,11 @@ var SearchResultMode;
39572
40639
  * This component is dumb and only emits events.
39573
40640
  */
39574
40641
  class SearchResultsComponent {
39575
- constructor(cdRef, searchService) {
40642
+ constructor(cdRef, searchService, configService) {
39576
40643
  this.cdRef = cdRef;
39577
40644
  this.searchService = searchService;
40645
+ this.configService = configService;
40646
+ this.showResultsCount = true;
39578
40647
  /**
39579
40648
  * Reference to the SearchResultMode enum
39580
40649
  * @internal
@@ -39639,6 +40708,9 @@ class SearchResultsComponent {
39639
40708
  this.settingsChange$$ = this.settingsChange$.subscribe(() => {
39640
40709
  this.pageIterator = [];
39641
40710
  });
40711
+ if (this.configService.getConfig('searchSources.showResultsCount') === false) {
40712
+ this.showResultsCount = false;
40713
+ }
39642
40714
  }
39643
40715
  /**
39644
40716
  * Unbind the search results store from the watcher
@@ -39657,7 +40729,7 @@ class SearchResultsComponent {
39657
40729
  computeGroupTitle(group) {
39658
40730
  const parts = [group.source.title];
39659
40731
  const count = group.results.length;
39660
- if (count > 1) {
40732
+ if (count > 1 && this.showResultsCount) {
39661
40733
  parts.push(`(${count})`);
39662
40734
  }
39663
40735
  return parts.join(' ');
@@ -39721,11 +40793,15 @@ class SearchResultsComponent {
39721
40793
  });
39722
40794
  }
39723
40795
  isMoreResults(group) {
39724
- // getStrategyOfType is to avoid display more result based on a filtered state
40796
+ var _a;
39725
40797
  const stategy = this.store.getStrategyOfType(EntityStoreFilterCustomFuncStrategy);
39726
40798
  const active = (stategy === null || stategy === void 0 ? void 0 : stategy.active) || false;
39727
- return !active && group.results &&
39728
- group.results[group.results.length - 1].meta.nextPage === true;
40799
+ if (!active) {
40800
+ return group.results && group.results[group.results.length - 1].meta.nextPage === true;
40801
+ }
40802
+ else {
40803
+ return ((_a = group.results) === null || _a === void 0 ? void 0 : _a.length) % +group.source.params.limit === 0 && +group.source.params.page < 30;
40804
+ }
39729
40805
  }
39730
40806
  displayMoreResults(group) {
39731
40807
  const options = {
@@ -39755,7 +40831,7 @@ class SearchResultsComponent {
39755
40831
  return;
39756
40832
  }
39757
40833
  }
39758
- SearchResultsComponent.ɵfac = function SearchResultsComponent_Factory(t) { return new (t || SearchResultsComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(SearchService)); };
40834
+ SearchResultsComponent.ɵfac = function SearchResultsComponent_Factory(t) { return new (t || SearchResultsComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(SearchService), i0.ɵɵdirectiveInject(i2$1.ConfigService)); };
39759
40835
  SearchResultsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultsComponent, selectors: [["igo-search-results"]], contentQueries: function SearchResultsComponent_ContentQueries(rf, ctx, dirIndex) {
39760
40836
  if (rf & 1) {
39761
40837
  i0.ɵɵcontentQuery(dirIndex, _c0$1, 5);
@@ -39781,7 +40857,7 @@ SearchResultsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Sear
39781
40857
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultsComponent, [{
39782
40858
  type: Component,
39783
40859
  args: [{ selector: 'igo-search-results', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-list [navigation]=\"true\">\n <ng-template\n #groupTemplate\n ngFor let-group\n [ngForOf]=\"results$ | async\">\n\n <igo-collapsible [class]=\"group.source.getId()\"\n *ngIf=\"mode === searchResultMode.Grouped; else flatTemplate\"\n [title]=\"computeGroupTitle(group)\"\n [collapsed]=\"collapsed[group.source.title]\"\n (toggle)=\"collapsed[group.source.title] = $event\">\n <ng-container *ngTemplateOutlet=\"storeItemTemplate; context: {results: group.results}\"></ng-container>\n </igo-collapsible>\n\n <ng-template #flatTemplate>\n <ng-container *ngTemplateOutlet=\"storeItemTemplate; context: {results: group.results}\"></ng-container>\n </ng-template>\n\n <ng-template #storeItemTemplate let-results=\"results\">\n <ng-template ngFor let-result [ngForOf]=\"results\">\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map\"\n [result]=\"result\"\n [showIcons]=\"showIcons\"\n [withZoomButton]=\"withZoomButton\"\n [focused]=\"store.state.get(result).focused\"\n [selected]=\"store.state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\">\n\n <ng-container igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar\"\n [ngTemplateOutletContext]=\"{result: result}\">\n </ng-container>\n\n </igo-search-results-item>\n </ng-template>\n <span class=\"moreResults mat-typography\" *ngIf=\"isMoreResults(group)\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n </ng-template>\n\n </ng-template>\n\n</igo-list>\n", styles: [".moreResults{cursor:pointer;color:#00f;float:right;margin-right:10px;margin-top:5px}igo-list ::ng-deep mat-list{height:100%}\n"] }]
39784
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: SearchService }]; }, { map: [{
40860
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: SearchService }, { type: i2$1.ConfigService }]; }, { map: [{
39785
40861
  type: Input
39786
40862
  }], store: [{
39787
40863
  type: Input
@@ -41440,6 +42516,8 @@ class EditionWorkspaceService {
41440
42516
  this.relationLayers$ = new BehaviorSubject(undefined);
41441
42517
  this.rowsInMapExtentCheckCondition$ = new BehaviorSubject(true);
41442
42518
  this.loading = false;
42519
+ this.wktFormat = new olFormatWKT();
42520
+ this.geoJsonFormat = new OlGeoJSON();
41443
42521
  }
41444
42522
  get zoomAuto() {
41445
42523
  return this.storageService.get('zoomAuto');
@@ -41766,11 +42844,10 @@ class EditionWorkspaceService {
41766
42844
  }
41767
42845
  addFeature(feature, workspace, url, headers) {
41768
42846
  var _a, _b;
41769
- // TODO: adapt to any kind of geometry
41770
42847
  if (workspace.layer.dataSource.options.edition.hasGeometry) {
41771
- //feature.properties[geom] = feature.geometry;
41772
- feature.properties["longitude"] = feature.geometry.coordinates[0];
41773
- feature.properties["latitude"] = feature.geometry.coordinates[1];
42848
+ const projDest = workspace.layer.options.sourceOptions.edition.geomDatabaseProj;
42849
+ feature.properties[workspace.layer.dataSource.options.params.fieldNameGeometry] =
42850
+ 'SRID=' + projDest.replace("EPSG:", "") + ';' + this.wktFormat.writeGeometry(this.geoJsonFormat.readFeature(feature.geometry).getGeometry().transform('EPSG:4326', projDest), { dataProjection: projDest });
41774
42851
  }
41775
42852
  for (const property in feature.properties) {
41776
42853
  for (const sf of workspace.layer.dataSource.options.sourceFields) {
@@ -41852,11 +42929,12 @@ class EditionWorkspaceService {
41852
42929
  }
41853
42930
  modifyFeature(feature, workspace, url, headers, protocole = 'patch') {
41854
42931
  var _a, _b;
41855
- //TODO: adapt to any kind of geometry
41856
42932
  if (workspace.layer.dataSource.options.edition.hasGeometry) {
41857
- //feature.properties[geom] = feature.geometry;
41858
- feature.properties["longitude"] = feature.geometry.coordinates[0];
41859
- feature.properties["latitude"] = feature.geometry.coordinates[1];
42933
+ const projDest = workspace.layer.options.sourceOptions.edition.geomDatabaseProj;
42934
+ // Remove 3e dimension
42935
+ feature.geometry.coordinates = removeZ(feature.geometry.coordinates);
42936
+ feature.properties[workspace.layer.dataSource.options.params.fieldNameGeometry] =
42937
+ 'SRID=' + projDest.replace("EPSG:", "") + ';' + this.wktFormat.writeGeometry(this.geoJsonFormat.readFeature(feature.geometry).getGeometry().transform('EPSG:4326', projDest), { dataProjection: projDest });
41860
42938
  }
41861
42939
  for (const property in feature.properties) {
41862
42940
  for (const sf of workspace.layer.dataSource.options.sourceFields) {
@@ -42058,6 +43136,13 @@ function getColumnKeyWithoutPropertiesTag(column) {
42058
43136
  return column.split('.')[1];
42059
43137
  }
42060
43138
  return column;
43139
+ }
43140
+ function removeZ(coords) {
43141
+ if (coords.length === 0)
43142
+ return coords;
43143
+ if (typeof coords[0] === 'number')
43144
+ return coords.slice(0, 2);
43145
+ return coords.map(removeZ);
42061
43146
  }
42062
43147
 
42063
43148
  class FeatureWorkspace extends Workspace {
@@ -42842,142 +43927,6 @@ function provideOsrmDirectionsSource() {
42842
43927
  };
42843
43928
  }
42844
43929
 
42845
- /**
42846
- * Cadastre search source
42847
- */
42848
- class CadastreSearchSource extends SearchSource {
42849
- constructor(http, languageService, storageService, options) {
42850
- super(options, storageService);
42851
- this.http = http;
42852
- this.languageService = languageService;
42853
- }
42854
- getId() {
42855
- return CadastreSearchSource.id;
42856
- }
42857
- getType() {
42858
- return CadastreSearchSource.type;
42859
- }
42860
- /*
42861
- * Source : https://wiki.openstreetmap.org/wiki/Key:amenity
42862
- */
42863
- getDefaultOptions() {
42864
- return {
42865
- title: 'Cadastre (Québec)',
42866
- searchUrl: 'https://carto.cptaq.gouv.qc.ca/php/find_lot_v1.php?'
42867
- };
42868
- }
42869
- /**
42870
- * Search a place by name
42871
- * @param term Place name
42872
- * @returns Observable of <SearchResult<Feature>[]
42873
- */
42874
- search(term, options) {
42875
- term = term.endsWith(',') ? term.slice(0, -1) : term;
42876
- term = term.startsWith(',') ? term.substr(1) : term;
42877
- term = term.replace(/ /g, '');
42878
- const params = this.computeSearchRequestParams(term, options || {});
42879
- if (!params.get('numero') || !params.get('numero').match(/^[0-9,]+$/g)) {
42880
- return of([]);
42881
- }
42882
- return this.http
42883
- .get(this.searchUrl, { params, responseType: 'text' })
42884
- .pipe(map((response) => this.extractResults(response, term)));
42885
- }
42886
- computeSearchRequestParams(term, options) {
42887
- return new HttpParams({
42888
- fromObject: Object.assign({
42889
- numero: term,
42890
- epsg: '4326'
42891
- }, this.params, options.params || {})
42892
- });
42893
- }
42894
- extractResults(response, term) {
42895
- return response
42896
- .split('<br />')
42897
- .filter((lot) => lot.length > 0)
42898
- .map((lot) => this.dataToResult(lot, term));
42899
- }
42900
- dataToResult(data, term) {
42901
- const lot = data.split(';');
42902
- const numero = lot[0];
42903
- const wkt = lot[7];
42904
- const geometry = this.computeGeometry(wkt);
42905
- const properties = {
42906
- NoLot: numero,
42907
- Route: '<span class="routing"> <u>' + this.languageService.translate.instant('igo.geo.seeRouting') + '</u> </span>'
42908
- };
42909
- const id = [this.getId(), 'cadastre', numero].join('.');
42910
- return {
42911
- source: this,
42912
- meta: {
42913
- dataType: FEATURE,
42914
- id,
42915
- title: numero,
42916
- score: computeTermSimilarity(term.trim(), numero),
42917
- icon: 'map-marker'
42918
- },
42919
- data: {
42920
- type: FEATURE,
42921
- projection: 'EPSG:4326',
42922
- geometry,
42923
- properties,
42924
- meta: {
42925
- id,
42926
- title: numero
42927
- }
42928
- }
42929
- };
42930
- }
42931
- computeGeometry(wkt) {
42932
- const feature = new olWKT().readFeature(wkt, {
42933
- dataProjection: 'EPSG:4326',
42934
- featureProjection: 'EPSG:4326'
42935
- });
42936
- return {
42937
- type: feature.getGeometry().getType(),
42938
- coordinates: feature.getGeometry().getCoordinates()
42939
- };
42940
- }
42941
- }
42942
- CadastreSearchSource.id = 'cadastre';
42943
- CadastreSearchSource.type = FEATURE;
42944
- CadastreSearchSource.ɵfac = function CadastreSearchSource_Factory(t) { return new (t || CadastreSearchSource)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(i2$1.LanguageService), i0.ɵɵinject(i2$1.StorageService), i0.ɵɵinject('options')); };
42945
- CadastreSearchSource.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CadastreSearchSource, factory: CadastreSearchSource.ɵfac });
42946
- __decorate([
42947
- Cacheable({
42948
- maxCacheCount: 20
42949
- })
42950
- ], CadastreSearchSource.prototype, "search", null);
42951
- (function () {
42952
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CadastreSearchSource, [{
42953
- type: Injectable
42954
- }], function () {
42955
- return [{ type: i1$2.HttpClient }, { type: i2$1.LanguageService }, { type: i2$1.StorageService }, { type: undefined, decorators: [{
42956
- type: Inject,
42957
- args: ['options']
42958
- }] }];
42959
- }, { search: [] });
42960
- })();
42961
-
42962
- /**
42963
- * Cadastre search source factory
42964
- * @ignore
42965
- */
42966
- function cadastreSearchSourceFactory(http, languageService, storageService, config) {
42967
- return new CadastreSearchSource(http, languageService, storageService, config.getConfig(`searchSources.${CadastreSearchSource.id}`));
42968
- }
42969
- /**
42970
- * Function that returns a provider for the Cadastre search source
42971
- */
42972
- function provideCadastreSearchSource() {
42973
- return {
42974
- provide: SearchSource,
42975
- useFactory: cadastreSearchSourceFactory,
42976
- multi: true,
42977
- deps: [HttpClient, LanguageService, StorageService, ConfigService]
42978
- };
42979
- }
42980
-
42981
43930
  /**
42982
43931
  * Nominatim search source
42983
43932
  */
@@ -43749,7 +44698,7 @@ class ConfigFileToGeoDBService {
43749
44698
  }
43750
44699
  if (currentDate >= geoData.triggerDate) {
43751
44700
  if (geoData.action === 'update') {
43752
- const insertEvent = `${geoData.source || 'automatedDataUpdate'} (${geoData.triggerDate})`;
44701
+ const insertEvent = `${geoData.source || InsertSourceInsertDBEnum.System} (${geoData.triggerDate})`;
43753
44702
  geoData.urls.map((url) => {
43754
44703
  datas$.push(this.geoDBService.getByID(url).pipe(concatMap((res) => {
43755
44704
  if ((res === null || res === void 0 ? void 0 : res.insertEvent) !== insertEvent) {
@@ -43758,8 +44707,31 @@ class ConfigFileToGeoDBService {
43758
44707
  .info('igo.geo.indexedDb.data-download-start', undefined, { disableTimeOut: true, progressBar: false, closeButton: true, tapToDismiss: false });
43759
44708
  firstDownload = false;
43760
44709
  }
43761
- return this.http.get(url)
43762
- .pipe(concatMap(r => this.geoDBService.update(url, url, r, 'system', insertEvent)));
44710
+ let responseType = 'json';
44711
+ const isZip = this.isZip(url);
44712
+ if (isZip) {
44713
+ responseType = 'arraybuffer';
44714
+ }
44715
+ return this.http.get(url, { responseType }).pipe(concatMap(r => {
44716
+ if (isZip) {
44717
+ const observables$ = [this.geoDBService.update(url, url, {}, InsertSourceInsertDBEnum.System, insertEvent)];
44718
+ JSZip.loadAsync(r)
44719
+ .then((zipped) => {
44720
+ zipped.forEach((relativePath) => {
44721
+ if (relativePath.toLocaleLowerCase().endsWith('.geojson')) {
44722
+ zipped.file(relativePath).async("base64").then((r) => {
44723
+ const geojson = JSON.parse(atob(r));
44724
+ const subUrl = geoData.zippedBaseUrl || '';
44725
+ const zippedUrl = subUrl + (subUrl.endsWith('/') ? '' : '/') + relativePath;
44726
+ observables$.push(this.geoDBService.update(zippedUrl, url, geojson, InsertSourceInsertDBEnum.System, insertEvent));
44727
+ });
44728
+ }
44729
+ });
44730
+ });
44731
+ return zip(observables$);
44732
+ }
44733
+ return this.geoDBService.update(url, url, r, InsertSourceInsertDBEnum.System, insertEvent);
44734
+ }));
43763
44735
  }
43764
44736
  else {
43765
44737
  return of(false);
@@ -43785,6 +44757,10 @@ class ConfigFileToGeoDBService {
43785
44757
  }
43786
44758
  });
43787
44759
  }
44760
+ isZip(value) {
44761
+ const regex = /(zip)$/;
44762
+ return typeof value === 'string' && regex.test(value.toLowerCase());
44763
+ }
43788
44764
  }
43789
44765
  ConfigFileToGeoDBService.ɵfac = function ConfigFileToGeoDBService_Factory(t) { return new (t || ConfigFileToGeoDBService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(GeoDBService), i0.ɵɵinject(i2$1.MessageService)); };
43790
44766
  ConfigFileToGeoDBService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ConfigFileToGeoDBService, factory: ConfigFileToGeoDBService.ɵfac, providedIn: 'root' });
@@ -43805,5 +44781,5 @@ ConfigFileToGeoDBService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token:
43805
44781
  * Generated bundle index. Do not edit.
43806
44782
  */
43807
44783
 
43808
- export { AddCatalogDialogComponent, ArcGISRestDataSource, BaseLayersSwitcherComponent, CadastreSearchSource, CapabilitiesService, CartoDataSource, Catalog, CatalogBrowserComponent, CatalogFactory, CatalogItemType, CatalogLibaryComponent, CatalogService, ClusterDataSource, CompositeCatalog, ConfigFileToGeoDBService, ConfirmationPopupComponent, CoordinatesReverseSearchSource, CoordinatesReverseSearchSourceFactory, CoordinatesSearchResultFormatter, DataService, DataSource, DataSourceService, DirectionRelativePositionType, DirectionType, DirectionsButtonsComponent, DirectionsComponent, DirectionsFormat, DirectionsInputsComponent, DirectionsResultsComponent, DirectionsService, DirectionsSource, DownloadButtonComponent, DownloadService, DrawComponent, DrawControl, DrawIconService, DrawStyleService, DropGeoFileDirective, EditionWorkspace, EditionWorkspaceService, EncodingFormat, EsriStyleGenerator, ExportButtonComponent, ExportError, ExportFormat, ExportInvalidFileError, ExportNothingToExportError, ExportService, FEATURE, FeatureDataSource, FeatureDetailsComponent, FeatureDetailsDirective, FeatureFormComponent, FeatureMotion, FeatureStore, FeatureStoreInMapExtentStrategy, FeatureStoreInMapResolutionStrategy, FeatureStoreLoadingLayerStrategy, FeatureStoreLoadingStrategy, FeatureStoreSelectionStrategy, FeatureWorkspace, FeatureWorkspaceService, FilterableDataSourcePipe, FontType, GeoDBService, GeoNetworkService, GeolocateButtonComponent, GeometryFormFieldComponent, GeometryFormFieldInputComponent, GeometrySliceError, GeometrySliceLineStringError, GeometrySliceMultiPolygonError, GeometrySliceTooManyIntersectionError, GeometryType, GoogleLinks, HomeExtentButtonComponent, HoverFeatureDirective, IChercheReverseSearchSource, IChercheSearchResultFormatter, IChercheSearchSource, ILayerSearchResultFormatter, ILayerSearchSource, IgoCatalogBrowserModule, IgoCatalogLibraryModule, IgoCatalogModule, IgoConfirmationPopupModule, IgoDataSourceModule, IgoDirectionsModule, IgoDownloadModule, IgoDrawModule, IgoDrawingToolModule, IgoFeatureDetailsModule, IgoFeatureFormModule, IgoFeatureModule, IgoFilterModule, IgoGeoModule, IgoGeoWorkspaceModule, IgoGeometryFormFieldModule, IgoGeometryModule, IgoHttpParameterCodec, IgoImportExportModule, IgoLayerModule, IgoMap, IgoMapModule, IgoMeasureModule, IgoMeasurerModule, IgoMetadataModule, IgoOgcFilterModule, IgoOverlayModule, IgoPrintModule, IgoQueryModule, IgoSearchBarModule, IgoSearchModule, IgoSearchResultsModule, IgoSearchSelectorModule, IgoSearchSettingsModule, IgoStyleListModule, IgoToastModule, IgoWktModule, IgoWorkspaceSelectorModule, IgoWorkspaceUpdatorModule, ImageArcGISRestDataSource, ImageLayer, ImageWatcher, ImportError, ImportExportComponent, ImportInvalidFileError, ImportNothingToImportError, ImportOgreServerError, ImportSRSError, ImportService, ImportSizeError, ImportUnreadableFileError, InfoSectionComponent, InsertSourceInsertDBEnum, LAYER, Layer, LayerItemComponent, LayerLegendComponent, LayerLegendItemComponent, LayerLegendListBindingDirective, LayerLegendListComponent, LayerListBindingDirective, LayerListComponent, LayerListControlsEnum, LayerListDisplacement, LayerListSelectVisibleEnum, LayerListToolComponent, LayerListToolControlsEnum, LayerListToolService, LayerService, LinkedProperties, MEASURE_UNIT_AUTO, MVTDataSource, 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, OlDragSelectInteraction, OptionsApiService, OptionsService, OsmLinks, OsrmDirectionsSource, Overlay, OverlayAction, OverlayDirective, OverlayService, PointerPositionDirective, PrintComponent, PrintFormComponent, PrintLegendPosition, PrintOrientation, PrintOutputFormat, PrintPaperFormat, PrintResolution, PrintSaveImageFormat, PrintService, ProjectionService, ProposalType, QueryDirective, QueryFormat, QueryFormatMimeType, QueryHtmlTarget, QuerySearchSource, QueryService, ResponseType, RotationButtonComponent, RoutesFeatureStore, SEARCH_TYPES, STYLELIST_OPTIONS, SearchBarComponent, SearchPointerSummaryDirective, SearchResultAddButtonComponent, SearchResultMode, SearchResultsComponent, SearchResultsItemComponent, SearchSelectorComponent, SearchService, SearchSettingsComponent, SearchSource, SearchSourceService, SliceControl, SourceDirectionsType, SpatialFilterItemComponent, SpatialFilterItemType, SpatialFilterListComponent, SpatialFilterQueryType, SpatialFilterService, SpatialFilterType, SpatialFilterTypeComponent, StepFeatureStore, StopsFeatureStore, StopsStore, StoredQueriesReverseSearchSource, StoredQueriesSearchSource, StyleListService, StyleModalComponent, 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, WorkspaceSelectorDirective, WorkspaceUpdatorDirective, XYZDataSource, ZoomButtonComponent, addDirectionToRoutesFeatureStore, addLayerAndFeaturesStyledToMap, addLayerAndFeaturesToMap, addLinearRingToOlPolygon, addStopToStopsFeatureStore, addStopToStore, buildUrl, cadastreSearchSourceFactory, checkWfsParams, clearOlGeometryMidpoints, computeBestAreaUnit, computeBestLengthUnit, computeLayerTitleFromFile, computeMVTOptionsOnHover, computeOlFeatureExtent, computeOlFeaturesDiff, computeOlFeaturesExtent, computeProjectionsConstraints, computeRelativePosition, computeStopsPosition, computeTermSimilarity, convertDDToDMS, createDefaultTileGrid, createDrawHoleInteractionStyle, createDrawInteractionStyle, createInteractionStyle, createMeasureInteractionStyle, createMeasureLayerStyle, createOlTooltipAtPoint, createOlTooltipDrawAtPoint, createOverlayDefaultStyle, createOverlayLayer, createOverlayMarkerStyle, ctrlKeyDown, defaultCoordinatesSearchResultFormatterFactory, defaultEpsg, defaultFieldNameGeometry, defaultIChercheSearchResultFormatterFactory, defaultMaxFeatures, defaultWfsVersion, directionsStyle, entitiesToRowData, exportToCSV, featureFromOl, featureToOl, featureToSearchResult, featuresAreOutOfView, featuresAreTooDeepInView, findDiff, formatDistance, formatDuration, formatInstruction, formatMeasure, formatScale, formatWFSQueryString, generateArcgisRestIdFromSourceOptions, generateFeatureIdFromSourceOptions, generateId, generateIdFromSourceOptions, generateWMSIdFromSourceOptions, generateWMTSIdFromSourceOptions, generateWfsIdFromSourceOptions, generateXYZIdFromSourceOptions, getAllChildLayersByDeletion, getAllChildLayersByProperty, getCommonVectorSelectedStyle, getCommonVectorStyle, getDirectChildLayersByDeletion, getDirectChildLayersByProperty, getDirectParentLayerByDeletion, getDirectParentLayerByProperty, getFileExtension, getFormatFromOptions, getIgoLayerByLinkId, getLayersLegends, getLinkedLayersOptions, getMousePositionFromOlGeometryEvent, getOlTooltipAtCenter, getOlTooltipsAtMidpoints, getResolutionFromScale, getRootParentByDeletion, getRootParentByProperty, getRowsInMapExtent, getScaleFromResolution, getSelectedOnly, getTooltipsOfOlGeometry, gmlRegex, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleLayerPropertyChange, handleNothingToExportError, handleNothingToImportError, handleOgreServerImportError, handleSRSImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hideOlFeature, hoverFeatureMarker, ichercheReverseSearchSourceFactory, ichercheSearchSourceFactory, ilayerSearchResultFormatterFactory, ilayerSearchSourceFactory, initLayerSyncFromRootParentLayers, initRoutesFeatureStore, initStepFeatureStore, initStopsFeatureStore, jsonRegex, layerFeatureIsQueryable, layerHasLinkDeletion, layerHasLinkWithProperty, layerIsQueryable, lonLatConversion, mapExtentStrategyActiveToolTip, measureOlGeometry, measureOlGeometryArea, measureOlGeometryLength, metersToFeet, metersToKilometers, metersToMiles, metersToUnit, moveToOlFeatures, mtmZoneFromLonLat, noElementSelected, nominatimSearchSourceFactory, ogcFilterWidgetFactory, olLayerFeatureIsQueryable, olLayerIsQueryable, optionsApiFactory, osrmDirectionsSourcesFactory, pointerPositionSummaryMarker, provideCadastreSearchSource, provideCoordinatesReverseSearchSource, provideDefaultCoordinatesSearchResultFormatter, provideDefaultIChercheSearchResultFormatter, provideIChercheReverseSearchSource, provideIChercheSearchSource, provideILayerSearchResultFormatter, provideILayerSearchSource, provideNominatimSearchSource, provideOgcFilterWidget, provideOptionsApi, provideOsrmDirectionsSource, provideSearchSourceService, provideStoredQueriesReverseSearchSource, provideStoredQueriesSearchSource, provideStyleListLoader, provideStyleListOptions, removeStopFromStore, renderFeatureFromOl, roundCoordTo, scaleExtent, searchSourceServiceFactory, setRowsInMapExtent, setSelectedOnly, sliceOlGeometry, sliceOlLineString, sliceOlPolygon, sourceCanReverseSearch, sourceCanReverseSearchAsSummary, sourceCanSearch, squareMetersToAcres, squareMetersToHectares, squareMetersToSquareFeet, squareMetersToSquareKilometers, squareMetersToSquareMiles, squareMetersToUnit, standardizeUrl, storedqueriesReverseSearchSourceFactory, storedqueriesSearchSourceFactory, stringToLonLat, styleListFactory, translateBearing, translateModifier, tryAddLoadingStrategy, tryAddSelectionStrategy, tryBindStoreLayer, updateOlGeometryCenter, updateOlGeometryMidpoints, updateOlTooltipAtCenter, updateOlTooltipDrawAtCenter, updateOlTooltipsAtMidpoints, updateOlTooltipsDrawAtMidpoints, updateStoreSorting, utmZoneFromLonLat, viewStatesAreEqual, zoneMtm, zoneUtm };
44784
+ export { AddCatalogDialogComponent, ArcGISRestDataSource, BaseLayersSwitcherComponent, CapabilitiesService, CartoDataSource, Catalog, CatalogBrowserComponent, CatalogFactory, CatalogItemType, CatalogLibaryComponent, CatalogService, ClusterDataSource, CompositeCatalog, ConfigFileToGeoDBService, ConfirmationPopupComponent, CoordinatesReverseSearchSource, CoordinatesReverseSearchSourceFactory, CoordinatesSearchResultFormatter, CoordinatesUnit, DDtoDMS, DataService, DataSource, DataSourceService, DirectionRelativePositionType, DirectionType, DirectionsButtonsComponent, DirectionsComponent, DirectionsFormat, DirectionsInputsComponent, DirectionsResultsComponent, DirectionsService, DirectionsSource, DownloadButtonComponent, DownloadService, DrawComponent, DrawControl, DrawIconService, DrawStyleService, DropGeoFileDirective, EditionWorkspace, EditionWorkspaceService, EncodingFormat, EsriStyleGenerator, ExportButtonComponent, ExportError, ExportFormat, ExportInvalidFileError, ExportNothingToExportError, ExportService, FEATURE, FeatureDataSource, FeatureDetailsComponent, FeatureDetailsDirective, FeatureFormComponent, FeatureMotion, FeatureStore, FeatureStoreInMapExtentStrategy, FeatureStoreInMapResolutionStrategy, FeatureStoreLoadingLayerStrategy, FeatureStoreLoadingStrategy, FeatureStoreSelectionStrategy, FeatureWorkspace, FeatureWorkspaceService, FilterableDataSourcePipe, FontType, GeoDBService, GeoNetworkService, GeolocateButtonComponent, GeometryFormFieldComponent, GeometryFormFieldInputComponent, GeometrySliceError, GeometrySliceLineStringError, GeometrySliceMultiPolygonError, GeometrySliceTooManyIntersectionError, GeometryType, GoogleLinks, HomeExtentButtonComponent, HoverFeatureDirective, IChercheReverseSearchSource, IChercheSearchResultFormatter, IChercheSearchSource, ILayerSearchResultFormatter, ILayerSearchSource, IgoCatalogBrowserModule, IgoCatalogLibraryModule, IgoCatalogModule, IgoConfirmationPopupModule, IgoDataSourceModule, IgoDirectionsModule, IgoDownloadModule, IgoDrawModule, IgoDrawingToolModule, IgoFeatureDetailsModule, IgoFeatureFormModule, IgoFeatureModule, IgoFilterModule, IgoGeoModule, IgoGeoWorkspaceModule, IgoGeometryFormFieldModule, IgoGeometryModule, IgoHttpParameterCodec, IgoImportExportModule, IgoLayerModule, IgoMap, IgoMapModule, IgoMeasureModule, IgoMeasurerModule, IgoMetadataModule, IgoOgcFilterModule, IgoOverlayModule, IgoPrintModule, IgoQueryModule, IgoSearchBarModule, IgoSearchModule, IgoSearchResultsModule, IgoSearchSelectorModule, IgoSearchSettingsModule, IgoStyleListModule, IgoToastModule, IgoWktModule, IgoWorkspaceSelectorModule, IgoWorkspaceUpdatorModule, ImageArcGISRestDataSource, ImageLayer, ImageWatcher, ImportError, ImportExportComponent, ImportInvalidFileError, ImportNothingToImportError, ImportOgreServerError, ImportSRSError, ImportService, ImportSizeError, ImportUnreadableFileError, InfoSectionComponent, InsertSourceInsertDBEnum, LAYER, LabelType, Layer, LayerItemComponent, LayerLegendComponent, LayerLegendItemComponent, LayerLegendListBindingDirective, LayerLegendListComponent, LayerListBindingDirective, LayerListComponent, LayerListControlsEnum, LayerListDisplacement, LayerListSelectVisibleEnum, LayerListToolComponent, LayerListToolControlsEnum, LayerListToolService, LayerService, LinkedProperties, MEASURE_UNIT_AUTO, MVTDataSource, 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, OlDragSelectInteraction, OptionsApiService, OptionsService, OsmLinks, OsrmDirectionsSource, Overlay, OverlayAction, OverlayDirective, OverlayService, PointerPositionDirective, PrintComponent, PrintFormComponent, PrintLegendPosition, PrintOrientation, PrintOutputFormat, PrintPaperFormat, PrintResolution, PrintSaveImageFormat, PrintService, ProjectionService, ProposalType, QueryDirective, QueryFormat, QueryFormatMimeType, QueryHtmlTarget, QuerySearchSource, QueryService, ResponseType, RotationButtonComponent, RoutesFeatureStore, SEARCH_TYPES, STYLELIST_OPTIONS, SearchBarComponent, SearchPointerSummaryDirective, SearchResultAddButtonComponent, SearchResultMode, SearchResultsComponent, SearchResultsItemComponent, SearchSelectorComponent, SearchService, SearchSettingsComponent, SearchSource, SearchSourceService, SliceControl, SourceDirectionsType, SpatialFilterItemComponent, SpatialFilterItemType, SpatialFilterListComponent, SpatialFilterQueryType, SpatialFilterService, SpatialFilterType, SpatialFilterTypeComponent, StepFeatureStore, StopsFeatureStore, StopsStore, StoredQueriesReverseSearchSource, StoredQueriesSearchSource, StyleListService, StyleModalComponent, 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, WorkspaceSelectorDirective, WorkspaceUpdatorDirective, XYZDataSource, ZoomButtonComponent, addDirectionToRoutesFeatureStore, addLayerAndFeaturesStyledToMap, addLayerAndFeaturesToMap, addLinearRingToOlPolygon, addStopToStopsFeatureStore, addStopToStore, buildUrl, checkWfsParams, clearOlGeometryMidpoints, computeBestAreaUnit, computeBestLengthUnit, computeLayerTitleFromFile, computeMVTOptionsOnHover, computeOlFeatureExtent, computeOlFeaturesDiff, computeOlFeaturesExtent, computeProjectionsConstraints, computeRelativePosition, computeStopsPosition, computeTermSimilarity, convertDDToDMS, createDefaultTileGrid, createDrawHoleInteractionStyle, createDrawInteractionStyle, createInteractionStyle, createMeasureInteractionStyle, createMeasureLayerStyle, createOlTooltipAtPoint, createOlTooltipDrawAtPoint, createOverlayDefaultStyle, createOverlayLayer, createOverlayMarkerStyle, ctrlKeyDown, defaultCoordinatesSearchResultFormatterFactory, defaultEpsg, defaultFieldNameGeometry, defaultIChercheSearchResultFormatterFactory, defaultMaxFeatures, defaultWfsVersion, directionsStyle, entitiesToRowData, exportToCSV, featureFromOl, featureToOl, featureToSearchResult, featuresAreOutOfView, featuresAreTooDeepInView, findDiff, formatDistance, formatDuration, formatInstruction, formatMeasure, formatScale, formatWFSQueryString, generateArcgisRestIdFromSourceOptions, generateFeatureIdFromSourceOptions, generateId, generateIdFromSourceOptions, generateWMSIdFromSourceOptions, generateWMTSIdFromSourceOptions, generateWfsIdFromSourceOptions, generateXYZIdFromSourceOptions, getAllChildLayersByDeletion, getAllChildLayersByProperty, getCommonVectorSelectedStyle, getCommonVectorStyle, getDirectChildLayersByDeletion, getDirectChildLayersByProperty, getDirectParentLayerByDeletion, getDirectParentLayerByProperty, getFileExtension, getFormatFromOptions, getIgoLayerByLinkId, getLayersLegends, getLinkedLayersOptions, getMousePositionFromOlGeometryEvent, getOlTooltipAtCenter, getOlTooltipsAtMidpoints, getResolutionFromScale, getRootParentByDeletion, getRootParentByProperty, getRowsInMapExtent, getScaleFromResolution, getSelectedOnly, getTooltipsOfOlGeometry, gmlRegex, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleLayerPropertyChange, handleNothingToExportError, handleNothingToImportError, handleOgreServerImportError, handleSRSImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hideOlFeature, hoverFeatureMarker, ichercheReverseSearchSourceFactory, ichercheSearchSourceFactory, ilayerSearchResultFormatterFactory, ilayerSearchSourceFactory, initLayerSyncFromRootParentLayers, initRoutesFeatureStore, initStepFeatureStore, initStopsFeatureStore, jsonRegex, layerFeatureIsQueryable, layerHasLinkDeletion, layerHasLinkWithProperty, layerIsQueryable, lonLatConversion, mapExtentStrategyActiveToolTip, measureOlGeometry, measureOlGeometryArea, measureOlGeometryLength, metersToFeet, metersToKilometers, metersToMiles, metersToUnit, moveToOlFeatures, mtmZoneFromLonLat, noElementSelected, nominatimSearchSourceFactory, ogcFilterWidgetFactory, olLayerFeatureIsQueryable, olLayerIsQueryable, optionsApiFactory, osrmDirectionsSourcesFactory, pointerPositionSummaryMarker, provideCoordinatesReverseSearchSource, provideDefaultCoordinatesSearchResultFormatter, provideDefaultIChercheSearchResultFormatter, provideIChercheReverseSearchSource, provideIChercheSearchSource, provideILayerSearchResultFormatter, provideILayerSearchSource, provideNominatimSearchSource, provideOgcFilterWidget, provideOptionsApi, provideOsrmDirectionsSource, provideSearchSourceService, provideStoredQueriesReverseSearchSource, provideStoredQueriesSearchSource, provideStyleListLoader, provideStyleListOptions, removeStopFromStore, renderFeatureFromOl, roundCoordTo, roundCoordToString, scaleExtent, searchSourceServiceFactory, setRowsInMapExtent, setSelectedOnly, sliceOlGeometry, sliceOlLineString, sliceOlPolygon, sourceCanReverseSearch, sourceCanReverseSearchAsSummary, sourceCanSearch, squareMetersToAcres, squareMetersToHectares, squareMetersToSquareFeet, squareMetersToSquareKilometers, squareMetersToSquareMiles, squareMetersToUnit, standardizeUrl, storedqueriesReverseSearchSourceFactory, storedqueriesSearchSourceFactory, stringToLonLat, styleListFactory, translateBearing, translateModifier, tryAddLoadingStrategy, tryAddSelectionStrategy, tryBindStoreLayer, updateOlGeometryCenter, updateOlGeometryMidpoints, updateOlTooltipAtCenter, updateOlTooltipDrawAtCenter, updateOlTooltipsAtMidpoints, updateOlTooltipsDrawAtMidpoints, updateStoreSorting, utmZoneFromLonLat, viewStatesAreEqual, zoneMtm, zoneUtm };
43809
44785
  //# sourceMappingURL=igo2-geo.mjs.map