adb-shared 22.0.0-beta.0 → 22.0.0-beta.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.
@@ -2,7 +2,7 @@ import * as i1$2 from "@angular/common";
2
2
  import { CommonModule } from "@angular/common";
3
3
  import * as i0 from "@angular/core";
4
4
  import { ChangeDetectionStrategy, Component, ElementRef, Inject, Injectable, InjectionToken, Input, NgModule, afterRenderEffect, computed, effect, forwardRef, inject, input, output, signal } from "@angular/core";
5
- import * as i4 from "@angular/forms";
5
+ import * as i3 from "@angular/forms";
6
6
  import { FormArray, FormControl, FormGroup, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule, Validators } from "@angular/forms";
7
7
  import GeoJSON from "ol/format/GeoJSON.js";
8
8
  import Draw from "ol/interaction/Draw.js";
@@ -30,13 +30,14 @@ import Feature from "ol/Feature.js";
30
30
  import { extend, getCenter, getForViewAndSize, isEmpty } from "ol/extent.js";
31
31
  import { finalize } from "rxjs/operators";
32
32
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
33
- import * as i3 from "@angular/common/http";
33
+ import * as i2 from "@angular/common/http";
34
+ import { HttpClient } from "@angular/common/http";
35
+ import { Subscription, combineLatest, debounceTime, map } from "rxjs";
34
36
  import LineString from "ol/geom/LineString.js";
35
37
  import MultiPolygon from "ol/geom/MultiPolygon.js";
36
38
  import * as i1$1 from "adb-shared";
37
39
  import { AdbButtonsModule, AdbDatePickerModule, AdbDirectivesModule, AdbFilterSectionModule, AdbPickerModule, AdbPipesModule } from "adb-shared";
38
40
  import { addYears, endOfDay, endOfYear, parseISO, startOfDay, startOfYear } from "date-fns";
39
- import { Subscription, combineLatest, debounceTime, map } from "rxjs";
40
41
  const DateTypes = {
41
42
  THIS_YEAR: "1",
42
43
  LAST_YEAR: "2",
@@ -548,17 +549,15 @@ var AdbMapConfigService = class AdbMapConfigService {
548
549
  observationFeatures;
549
550
  taxaListsApi;
550
551
  dynamic;
551
- gridOnly;
552
552
  enableClusterSelection;
553
553
  dataProviderIds;
554
554
  constructor(config) {
555
555
  this.dynamic = config.dynamic ?? false;
556
- this.gridOnly = config.gridOnly ?? false;
557
556
  this.dataProviderIds = config.dataProviderIds === void 0 ? void 0 : Object.freeze([...config.dataProviderIds]);
558
557
  this.enableClusterSelection = config.enableClusterSelection ?? false;
559
558
  this.artfaktaTaxonLists = config.artfaktaTaxonLists ?? "https://artfakta.se/metadata/listor";
560
559
  this.taxaListsApi = config.api + "/taxalists";
561
- this.observationFeatures = "https://sos-search-st.wt.artdata.slu.se/observations/internal/adaptivesearchlocations";
560
+ this.observationFeatures = config.api + "/observation-features";
562
561
  }
563
562
  static ɵfac = i0.ɵɵngDeclareFactory({
564
563
  minVersion: "12.0.0",
@@ -686,86 +685,73 @@ i0.ɵɵngDeclareClassMetadata({
686
685
  }],
687
686
  propDecorators: { nodes: [{ type: Input }] }
688
687
  });
689
- var TempUtils = class {
690
- static euRegulation = 5;
691
- static createQParams(qParams, mpp) {
688
+ var AdbBffMapDataSource = class AdbBffMapDataSource {
689
+ http = inject(HttpClient);
690
+ load(request) {
692
691
  const params = {
693
- returnInputBBox: true,
694
- cluster: true,
695
- createPolygons: "WhenNeeded",
696
- useCache: true,
697
- maxGridCells: 1e3,
698
- maxZoom: 19,
699
- clusterRadiusPx: 20,
700
- minLocationCountBeforeClustering: 0,
701
- disablePixelClusteringAtMetersPerPixel: 2,
702
- detailClusterRadiusPx: 10,
703
- metersPerPixel: mpp,
704
- adaptiveSearchStrategy: "Auto",
705
- locationAggregationLimit: 1e3,
706
- observationsLimit: 5e3,
707
- includeFilterAreasInResult: true
708
- };
709
- if (qParams.cutoff) params.cutoffYear = qParams.cutoff;
710
- if (qParams.bbox) params.bbox = qParams.bbox;
711
- return params;
712
- }
713
- static createObservationsBody(queryParams) {
714
- const params = queryParams;
715
- const body = { geographics: {} };
716
- const startDate = params.startAt ?? params.startDate;
717
- const endDate = params.endAt ?? params.endDate;
718
- if (startDate) body.date = {
719
- startDate,
720
- ...endDate && { endDate }
692
+ ...request.params,
693
+ mpp: request.metersPerPixel
721
694
  };
722
- if (params.taxonId) body.taxon = {
723
- Ids: [+params.taxonId],
724
- includeUnderlyingTaxa: true
725
- };
726
- const taxonListIds = this.getTaxonListIds(params);
727
- if (taxonListIds.length) {
728
- body.taxon ??= {};
729
- body.taxon.taxonListIds = taxonListIds;
730
- body.taxon.taxonListOperator = "Filter";
731
- }
732
- if (params.area) body.geographics = { areas: (Array.isArray(params.area) ? params.area : [params.area]).map((area) => {
733
- const [areaType, featureId] = area.split("-");
695
+ const array = (value) => value == null ? [] : Array.isArray(value) ? value : [value];
696
+ const sources = request.dataProviderIds?.length ? [...request.dataProviderIds] : params["ds"] ?? params["source"];
697
+ if (sources != null) params["source"] = sources;
698
+ const lists = [
699
+ ...array(params["list"]),
700
+ ...array(params["rc"]),
701
+ ...array(params["rlc"]),
702
+ ...params["eu"] ? [5] : []
703
+ ];
704
+ if (lists.length) params["list"] = lists;
705
+ for (const key of [
706
+ "ds",
707
+ "rc",
708
+ "rlc",
709
+ "eu",
710
+ "presentationMode"
711
+ ]) delete params[key];
712
+ for (const key of Object.keys(params)) if (params[key] == null) delete params[key];
713
+ return this.http.get(request.url, { params }).pipe(map((response) => {
714
+ const geoJson = response?.geoJson;
715
+ if (!geoJson || geoJson.type !== "FeatureCollection") throw new Error("Invalid BFF GeoJSON response");
734
716
  return {
735
- areaType,
736
- featureId
717
+ ...geoJson,
718
+ properties: {
719
+ ...geoJson.properties,
720
+ count: response.observationsTotalCount ?? geoJson.properties?.count
721
+ }
737
722
  };
738
- }) };
739
- if (params.geo) body.geographics.geometries = [{
740
- type: "Polygon",
741
- coordinates: [JSON.parse(params.geo)]
742
- }];
743
- if (params.locationId) body.geographics.locationIds = Array.isArray(params.locationId) ? params.locationId : [params.locationId];
744
- if (params.ds) body.dataProvider = { ids: this.toNumberArray(params.ds) };
745
- return {
746
- occurrenceStatus: params.noted === "true" ? "Present" : "BothPresentAndAbsent",
747
- notRecoveredFilter: "NoFilter",
748
- determinationFilter: "NotUnsureDetermination",
749
- extendedFilter: {
750
- notPresentFilter: "DontIncludeNotPresent",
751
- ...params.activities && { activityIds: JSON.parse(params.activities).map(Number) }
752
- },
753
- ...body
754
- };
755
- }
756
- static getTaxonListIds(params) {
757
- return [
758
- ...this.toNumberArray(params.rc),
759
- ...this.toNumberArray(params.rlc),
760
- ...this.toNumberArray(params.list),
761
- ...params.eu ? [this.euRegulation] : []
762
- ];
763
- }
764
- static toNumberArray(value) {
765
- if (!value) return [];
766
- return (Array.isArray(value) ? value : [value]).map(Number);
723
+ }));
767
724
  }
725
+ static ɵfac = i0.ɵɵngDeclareFactory({
726
+ minVersion: "12.0.0",
727
+ version: "22.2.4",
728
+ ngImport: i0,
729
+ type: AdbBffMapDataSource,
730
+ deps: [],
731
+ target: i0.ɵɵFactoryTarget.Injectable
732
+ });
733
+ static ɵprov = i0.ɵɵngDeclareInjectable({
734
+ minVersion: "12.0.0",
735
+ version: "22.2.4",
736
+ ngImport: i0,
737
+ type: AdbBffMapDataSource,
738
+ providedIn: "root"
739
+ });
768
740
  };
741
+ i0.ɵɵngDeclareClassMetadata({
742
+ minVersion: "12.0.0",
743
+ version: "22.2.4",
744
+ ngImport: i0,
745
+ type: AdbBffMapDataSource,
746
+ decorators: [{
747
+ type: Injectable,
748
+ args: [{ providedIn: "root" }]
749
+ }]
750
+ });
751
+ const ADB_MAP_DATA_SOURCE = new InjectionToken("ADB_MAP_DATA_SOURCE", {
752
+ providedIn: "root",
753
+ factory: () => inject(AdbBffMapDataSource)
754
+ });
769
755
  var MapFeaturePickerComponent = class MapFeaturePickerComponent {
770
756
  locationOptions = input.required(...ngDevMode ? [{ debugName: "locationOptions" }] : /* istanbul ignore next */ []);
771
757
  featureChosen = output();
@@ -1060,7 +1046,6 @@ var AdbMapComponent = class AdbMapComponent {
1060
1046
  activatedRoute;
1061
1047
  config;
1062
1048
  router;
1063
- http;
1064
1049
  showLegend = input(true, ...ngDevMode ? [{ debugName: "showLegend" }] : /* istanbul ignore next */ []);
1065
1050
  showHeader = input(true, ...ngDevMode ? [{ debugName: "showHeader" }] : /* istanbul ignore next */ []);
1066
1051
  allowPresentationMode = input(false, ...ngDevMode ? [{ debugName: "allowPresentationMode" }] : /* istanbul ignore next */ []);
@@ -1071,6 +1056,7 @@ var AdbMapComponent = class AdbMapComponent {
1071
1056
  if (this.allowPresentationMode() && (mode === "locations" || mode === "observations")) return mode;
1072
1057
  return this.presentationMode();
1073
1058
  }, ...ngDevMode ? [{ debugName: "activePresentationMode" }] : /* istanbul ignore next */ []);
1059
+ dataSource = inject(ADB_MAP_DATA_SOURCE);
1074
1060
  requestedParams = "";
1075
1061
  settingsOpen = signal(false, ...ngDevMode ? [{ debugName: "settingsOpen" }] : /* istanbul ignore next */ []);
1076
1062
  savingSettings = signal(false, ...ngDevMode ? [{ debugName: "savingSettings" }] : /* istanbul ignore next */ []);
@@ -1106,11 +1092,10 @@ var AdbMapComponent = class AdbMapComponent {
1106
1092
  map;
1107
1093
  mapReady = signal(false, ...ngDevMode ? [{ debugName: "mapReady" }] : /* istanbul ignore next */ []);
1108
1094
  queryParams = {};
1109
- constructor(activatedRoute, config, router, http) {
1095
+ constructor(activatedRoute, config, router) {
1110
1096
  this.activatedRoute = activatedRoute;
1111
1097
  this.config = config;
1112
1098
  this.router = router;
1113
- this.http = http;
1114
1099
  this.route.set(this.activatedRoute.snapshot);
1115
1100
  this.settingsForm.controls.presentationMode.valueChanges.pipe(takeUntilDestroyed()).subscribe((mode) => {
1116
1101
  const cutoff = this.settingsForm.controls.cutoff;
@@ -1296,30 +1281,15 @@ var AdbMapComponent = class AdbMapComponent {
1296
1281
  const fitView = !this.preserveViewOnNextLoad && (!qParams["bbox"] || qParams["bbox"] !== this.currentBbox());
1297
1282
  this.preserveViewOnNextLoad = false;
1298
1283
  const requestedView = this.viewKey();
1299
- const body = TempUtils.createObservationsBody(qParams);
1300
- const allowedIds = this.config.dataProviderIds;
1301
- if (allowedIds?.length) body.dataProvider = { ids: [...allowedIds] };
1302
- qParams = TempUtils.createQParams(qParams, this.getMetersPerPixel(qParams));
1303
- if (this.config.gridOnly) {
1304
- qParams["adaptiveSearchStrategy"] = "ObservationsThenGrid";
1305
- qParams["observationsLimit"] = 0;
1306
- qParams["cluster"] = false;
1307
- }
1308
- const url = this.config.observationFeatures;
1309
- this.requestSubscription = this.http.request("POST", url, {
1310
- observe: "response",
1311
- body,
1312
- params: qParams
1284
+ this.requestSubscription = this.dataSource.load({
1285
+ url: this.config.observationFeatures,
1286
+ params: qParams,
1287
+ metersPerPixel: this.getMetersPerPixel(qParams),
1288
+ dataProviderIds: this.config.dataProviderIds
1313
1289
  }).pipe(finalize(() => {
1314
1290
  this.mapLoading.set(false);
1315
1291
  })).subscribe({
1316
- next: (response) => {
1317
- if (!response.body) throw new Error("No GeoJson body");
1318
- const geo = response.body;
1319
- geo.properties = {
1320
- ...geo.properties,
1321
- count: response.headers.get("X-Observations-TotalCount") ?? geo.properties?.count
1322
- };
1292
+ next: (geo) => {
1323
1293
  this.buildMap(geo, fitView && requestedView === this.viewKey());
1324
1294
  },
1325
1295
  error: (err) => {
@@ -1424,8 +1394,7 @@ var AdbMapComponent = class AdbMapComponent {
1424
1394
  deps: [
1425
1395
  { token: i1.ActivatedRoute },
1426
1396
  { token: AdbMapConfigService },
1427
- { token: i1.Router },
1428
- { token: i3.HttpClient }
1397
+ { token: i1.Router }
1429
1398
  ],
1430
1399
  target: i0.ɵɵFactoryTarget.Component
1431
1400
  });
@@ -1474,50 +1443,50 @@ var AdbMapComponent = class AdbMapComponent {
1474
1443
  dependencies: [
1475
1444
  {
1476
1445
  kind: "directive",
1477
- type: i4.ɵNgNoValidate,
1446
+ type: i3.ɵNgNoValidate,
1478
1447
  selector: "form:not([ngNoForm]):not([ngNativeValidate])"
1479
1448
  },
1480
1449
  {
1481
1450
  kind: "directive",
1482
- type: i4.NgSelectOption,
1451
+ type: i3.NgSelectOption,
1483
1452
  selector: "option",
1484
1453
  inputs: ["ngValue", "value"]
1485
1454
  },
1486
1455
  {
1487
1456
  kind: "directive",
1488
- type: i4.ɵNgSelectMultipleOption,
1457
+ type: i3.ɵNgSelectMultipleOption,
1489
1458
  selector: "option",
1490
1459
  inputs: ["ngValue", "value"]
1491
1460
  },
1492
1461
  {
1493
1462
  kind: "directive",
1494
- type: i4.DefaultValueAccessor,
1463
+ type: i3.DefaultValueAccessor,
1495
1464
  selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
1496
1465
  },
1497
1466
  {
1498
1467
  kind: "directive",
1499
- type: i4.CheckboxControlValueAccessor,
1468
+ type: i3.CheckboxControlValueAccessor,
1500
1469
  selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]"
1501
1470
  },
1502
1471
  {
1503
1472
  kind: "directive",
1504
- type: i4.SelectControlValueAccessor,
1473
+ type: i3.SelectControlValueAccessor,
1505
1474
  selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]",
1506
1475
  inputs: ["compareWith"]
1507
1476
  },
1508
1477
  {
1509
1478
  kind: "directive",
1510
- type: i4.NgControlStatus,
1479
+ type: i3.NgControlStatus,
1511
1480
  selector: "[formControlName],[ngModel],[formControl]"
1512
1481
  },
1513
1482
  {
1514
1483
  kind: "directive",
1515
- type: i4.NgControlStatusGroup,
1484
+ type: i3.NgControlStatusGroup,
1516
1485
  selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
1517
1486
  },
1518
1487
  {
1519
1488
  kind: "directive",
1520
- type: i4.FormGroupDirective,
1489
+ type: i3.FormGroupDirective,
1521
1490
  selector: "[formGroup]",
1522
1491
  inputs: ["formGroup"],
1523
1492
  outputs: ["ngSubmit"],
@@ -1525,7 +1494,7 @@ var AdbMapComponent = class AdbMapComponent {
1525
1494
  },
1526
1495
  {
1527
1496
  kind: "directive",
1528
- type: i4.FormControlName,
1497
+ type: i3.FormControlName,
1529
1498
  selector: "[formControlName]",
1530
1499
  inputs: [
1531
1500
  "formControlName",
@@ -1583,8 +1552,7 @@ i0.ɵɵngDeclareClassMetadata({
1583
1552
  ctorParameters: () => [
1584
1553
  { type: i1.ActivatedRoute },
1585
1554
  { type: AdbMapConfigService },
1586
- { type: i1.Router },
1587
- { type: i3.HttpClient }
1555
+ { type: i1.Router }
1588
1556
  ],
1589
1557
  propDecorators: {
1590
1558
  showLegend: [{
@@ -1966,7 +1934,7 @@ var AdbMapFilters = class AdbMapFilters {
1966
1934
  deps: [
1967
1935
  { token: i0.ChangeDetectorRef },
1968
1936
  { token: AdbMapConfigService },
1969
- { token: i3.HttpClient },
1937
+ { token: i2.HttpClient },
1970
1938
  { token: i1.Router },
1971
1939
  { token: i1.ActivatedRoute }
1972
1940
  ],
@@ -1999,45 +1967,45 @@ var AdbMapFilters = class AdbMapFilters {
1999
1967
  dependencies: [
2000
1968
  {
2001
1969
  kind: "directive",
2002
- type: i4.ɵNgNoValidate,
1970
+ type: i3.ɵNgNoValidate,
2003
1971
  selector: "form:not([ngNoForm]):not([ngNativeValidate])"
2004
1972
  },
2005
1973
  {
2006
1974
  kind: "directive",
2007
- type: i4.NgSelectOption,
1975
+ type: i3.NgSelectOption,
2008
1976
  selector: "option",
2009
1977
  inputs: ["ngValue", "value"]
2010
1978
  },
2011
1979
  {
2012
1980
  kind: "directive",
2013
- type: i4.ɵNgSelectMultipleOption,
1981
+ type: i3.ɵNgSelectMultipleOption,
2014
1982
  selector: "option",
2015
1983
  inputs: ["ngValue", "value"]
2016
1984
  },
2017
1985
  {
2018
1986
  kind: "directive",
2019
- type: i4.DefaultValueAccessor,
1987
+ type: i3.DefaultValueAccessor,
2020
1988
  selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
2021
1989
  },
2022
1990
  {
2023
1991
  kind: "directive",
2024
- type: i4.CheckboxControlValueAccessor,
1992
+ type: i3.CheckboxControlValueAccessor,
2025
1993
  selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]"
2026
1994
  },
2027
1995
  {
2028
1996
  kind: "directive",
2029
- type: i4.SelectControlValueAccessor,
1997
+ type: i3.SelectControlValueAccessor,
2030
1998
  selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]",
2031
1999
  inputs: ["compareWith"]
2032
2000
  },
2033
2001
  {
2034
2002
  kind: "directive",
2035
- type: i4.NgControlStatus,
2003
+ type: i3.NgControlStatus,
2036
2004
  selector: "[formControlName],[ngModel],[formControl]"
2037
2005
  },
2038
2006
  {
2039
2007
  kind: "directive",
2040
- type: i4.NgControlStatusGroup,
2008
+ type: i3.NgControlStatusGroup,
2041
2009
  selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
2042
2010
  },
2043
2011
  {
@@ -2061,7 +2029,7 @@ var AdbMapFilters = class AdbMapFilters {
2061
2029
  },
2062
2030
  {
2063
2031
  kind: "directive",
2064
- type: i4.FormGroupDirective,
2032
+ type: i3.FormGroupDirective,
2065
2033
  selector: "[formGroup]",
2066
2034
  inputs: ["formGroup"],
2067
2035
  outputs: ["ngSubmit"],
@@ -2069,7 +2037,7 @@ var AdbMapFilters = class AdbMapFilters {
2069
2037
  },
2070
2038
  {
2071
2039
  kind: "directive",
2072
- type: i4.FormControlName,
2040
+ type: i3.FormControlName,
2073
2041
  selector: "[formControlName]",
2074
2042
  inputs: [
2075
2043
  "formControlName",
@@ -2080,13 +2048,13 @@ var AdbMapFilters = class AdbMapFilters {
2080
2048
  },
2081
2049
  {
2082
2050
  kind: "directive",
2083
- type: i4.FormGroupName,
2051
+ type: i3.FormGroupName,
2084
2052
  selector: "[formGroupName]",
2085
2053
  inputs: ["formGroupName"]
2086
2054
  },
2087
2055
  {
2088
2056
  kind: "directive",
2089
- type: i4.FormArrayName,
2057
+ type: i3.FormArrayName,
2090
2058
  selector: "[formArrayName]",
2091
2059
  inputs: ["formArrayName"]
2092
2060
  },
@@ -2176,7 +2144,7 @@ i0.ɵɵngDeclareClassMetadata({
2176
2144
  ctorParameters: () => [
2177
2145
  { type: i0.ChangeDetectorRef },
2178
2146
  { type: AdbMapConfigService },
2179
- { type: i3.HttpClient },
2147
+ { type: i2.HttpClient },
2180
2148
  { type: i1.Router },
2181
2149
  { type: i1.ActivatedRoute }
2182
2150
  ],
@@ -2304,6 +2272,6 @@ i0.ɵɵngDeclareClassMetadata({
2304
2272
  }]
2305
2273
  }]
2306
2274
  });
2307
- export { ADB_MAP_CONFIG, AdbLocationMapComponent, AdbMapComponent, AdbMapConfigService, AdbMapFilters, AdbMapModule, AdbMapUtils, PolygonDrawerInput };
2275
+ export { ADB_MAP_CONFIG, ADB_MAP_DATA_SOURCE, AdbBffMapDataSource, AdbLocationMapComponent, AdbMapComponent, AdbMapConfigService, AdbMapFilters, AdbMapModule, AdbMapUtils, PolygonDrawerInput };
2308
2276
 
2309
2277
  //# sourceMappingURL=adb-shared-map.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"adb-shared-map.mjs","names":["CircleStyle","controls","interactions","Circle","i1","i1","i1","i2","i1","i2","i2.AdbMapConfigService","i5.MapFeaturePickerComponent","i6.MapLegendComponent","i7","i8","CircleStyle","i1.AdbMapConfigService","i2","i3","i5","i6.PolygonDrawerInput","i7.TreeviewComponent","i8","i9"],"sources":["../../../projects/adb-shared/map/src/constants.ts","../../../projects/adb-shared/map/src/components/map/mapUtils.ts","../../../projects/adb-shared/map/src/components/map/polygon-drawer.component.ts","../../../projects/adb-shared/map/src/components/map/polygon-drawer.component.html","../../../projects/adb-shared/map/src/config.ts","../../../projects/adb-shared/map/src/components/treeview.ts","../../../projects/adb-shared/map/src/components/treeview.html","../../../projects/adb-shared/map/src/components/tempUtils.ts","../../../projects/adb-shared/map/src/components/map/map-feature-picker.ts","../../../projects/adb-shared/map/src/components/map/map-feature-picker.html","../../../projects/adb-shared/map/src/components/map/legend.ts","../../../projects/adb-shared/map/src/components/map/legend.html","../../../projects/adb-shared/map/src/components/map/adb-map.ts","../../../projects/adb-shared/map/src/components/map/adb-map.html","../../../projects/adb-shared/map/src/components/map/adb-location-map.ts","../../../projects/adb-shared/map/src/components/map/adb-location-map.html","../../../projects/adb-shared/map/src/components/map-filter.ts","../../../projects/adb-shared/map/src/components/map-filter.html","../../../projects/adb-shared/map/src/adb-map.module.ts"],"sourcesContent":["export const DateTypes = {\n THIS_YEAR: '1',\n LAST_YEAR: '2',\n ALL_YEAR: '3',\n LAST_5_YEAR: '4',\n LAST_25_YEAR: '5',\n CUSTOM: '6',\n}\n\nexport const MapConstants = {\n INITIAL_METERS_PER_PIXEL: 200,\n LOCATION_MARKER_BACKGROUND_COLOR: '#f3db60',\n LOCATION_MARKER_BORDER_COLOR: '#665500',\n OBSERVATION_MARKER_BACKGROUND_COLOR: '#007c91',\n CLUSTER_MARKER_BACKGROUND_COLOR: '#1e90ff',\n CLUSTER_MARKER_BORDER_COLOR: '#000',\n SELECTED_MARKER_BORDER_COLOR: '#000',\n LOCATION_POLYGON_BORDER_COLOR: '#005e67',\n GENERALIZED_POLYGON_BORDER_COLOR: '#b3261e',\n GENERALIZED_POLYGON_BACKGROUND_COLOR: 'rgba(179, 38, 30, 0.15)',\n SELECTED_COLOR: '#ff00ff',\n UNCERTAINTY_BORDER_COLOR: '#777',\n SEARCH_AREA_BORDER_COLOR: '#1e90ff',\n AFTER_CUTOFF_YEAR_COLOR: '#3366cc',\n BEFORE_CUTOFF_YEAR_COLOR: '#8a3fd0',\n MARKER_RADIUS: 6,\n CLUSTER_MARKER_RADIUS: 8,\n HOVER_RADIUS: 10\n}\n","import { GeoJson, MapOptions } from \"../../models\";\nimport Map from 'ol/Map.js';\nimport type { FeatureLike } from 'ol/Feature.js';\nimport View from 'ol/View.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport TileWMS from 'ol/source/TileWMS.js';\nimport XYZ from 'ol/source/XYZ.js';\nimport Control from 'ol/control/Control.js';\nimport ScaleLine from 'ol/control/ScaleLine.js';\nimport { defaults as controls } from 'ol/control/defaults.js';\nimport { defaults as interactions } from 'ol/interaction/defaults.js';\nimport { fromLonLat, toLonLat } from 'ol/proj.js';\nimport CircleGeometry from 'ol/geom/Circle.js';\nimport { getDistance } from 'ol/sphere.js';\nimport { Circle as CircleStyle, Fill, Stroke, Style, RegularShape, Text } from 'ol/style.js';\nimport { MapConstants } from '../../constants';\n\nexport class AdbMapUtils {\n static locationSymbol(feature: FeatureLike, selected = false, hovered = false): Style {\n const props = feature.getProperties();\n const cluster = props['groupingType'] === 'pixelCluster' || props['isCluster'];\n const point = ['Point', 'MultiPoint'].includes(feature.getGeometry()?.getType());\n const text = point && !cluster && props['observationCount'] === 1 &&\n (props['locations']?.count === 1 || !!props['location'])\n ? new Text({\n text: '1',\n offsetY: 2,\n font: 'bold 10px sans-serif',\n fill: new Fill({ color: '#000' }),\n stroke: new Stroke({ color: '#fff', width: 2 })\n }) : null;\n if (selected) {\n return new Style({\n text,\n image: new CircleStyle({\n radius: hovered ? MapConstants.HOVER_RADIUS\n : cluster ? MapConstants.CLUSTER_MARKER_RADIUS : MapConstants.MARKER_RADIUS,\n fill: new Fill({ color: MapConstants.SELECTED_COLOR }),\n stroke: new Stroke({ color: MapConstants.SELECTED_MARKER_BORDER_COLOR, width: 2 })\n }),\n stroke: new Stroke({ color: MapConstants.SELECTED_COLOR, width: 3 }),\n fill: new Fill({ color: 'transparent' })\n });\n }\n if (point) {\n return new Style({\n text,\n image: new CircleStyle({\n radius: hovered ? MapConstants.HOVER_RADIUS\n : cluster ? MapConstants.CLUSTER_MARKER_RADIUS : MapConstants.MARKER_RADIUS,\n fill: new Fill({ color: cluster ? MapConstants.CLUSTER_MARKER_BACKGROUND_COLOR : MapConstants.LOCATION_MARKER_BACKGROUND_COLOR }),\n stroke: new Stroke({ color: cluster ? MapConstants.CLUSTER_MARKER_BORDER_COLOR : MapConstants.LOCATION_MARKER_BORDER_COLOR, width: cluster ? 2 : 1 })\n })\n });\n }\n return new Style({\n fill: new Fill({ color: 'transparent' }),\n stroke: new Stroke({\n color: MapConstants.LOCATION_POLYGON_BORDER_COLOR,\n width: hovered ? 4 : 2\n })\n });\n }\n\n\n static isNotRecovered(presentation: any): boolean {\n return presentation?.status === 'NotRecovered';\n }\n\n static aggregatedSymbol(style: Style, presentation: any, cutoffYear: string, selected: boolean, geometryType: string = null): Style | Style[] {\n if (!selected && presentation?.generalized && ['Polygon', 'MultiPolygon'].includes(geometryType)) {\n style.setStroke(new Stroke({\n color: MapConstants.GENERALIZED_POLYGON_BORDER_COLOR,\n width: style.getStroke().getWidth()\n }));\n style.setFill(new Fill({ color: MapConstants.GENERALIZED_POLYGON_BACKGROUND_COLOR }));\n return style;\n }\n let symbol: Style | Style[] = style;\n const notRecovered = this.isNotRecovered(presentation);\n const notPresent = presentation?.status === 'NotPresent';\n if (notRecovered || notPresent) {\n style.setText(null);\n symbol = [style, new Style({\n image: new RegularShape({\n points: notRecovered ? 4 : 2,\n radius: 5,\n radius2: 0,\n angle: notRecovered ? Math.PI / 4 : Math.PI / 2,\n stroke: new Stroke({ color: '#000', width: 1.5, lineJoin: 'round' })\n })\n })];\n }\n if (selected || !cutoffYear) return symbol;\n const status = presentation?.cutoffYearStatus;\n if (status !== 'Until' && status !== 'After') return symbol;\n\n const before = status === 'Until';\n const color = before ? MapConstants.BEFORE_CUTOFF_YEAR_COLOR : MapConstants.AFTER_CUTOFF_YEAR_COLOR;\n const image = style.getImage();\n if (image instanceof CircleStyle) {\n image.setFill(before ? null : new Fill({ color }));\n image.setStroke(new Stroke({ color: before ? color : '#000',\n width: before ? 2 : image.getStroke().getWidth() }));\n } else {\n style.setStroke(new Stroke({ color, width: style.getStroke().getWidth() }));\n }\n return symbol;\n }\n\n static createUncertaintyCircle(center: number[], radius: number): CircleGeometry {\n const latitude = toLonLat(center)[1];\n return new CircleGeometry(center, radius / Math.cos(latitude * Math.PI / 180));\n }\n\n static readonly INITIAL_METERS_PER_PIXEL = 500;\n static readonly INITIAL_CENTER_LAT = 62;\n static readonly INITIAL_CENTER_LNG = 17;\n\n static gridLevels(result: GeoJson) {\n const counts = (result?.features ?? []).map(feature => feature.properties?.ObservationsCount)\n .filter(count => typeof count === 'number');\n if (!counts.length) return [];\n const max = Math.max(...counts);\n const first = Math.ceil(max / 3);\n const second = Math.ceil(2 * max / 3);\n return [\n { min: max === 0 ? 0 : 1, max: first, color: '#2fb3bb' },\n { min: first + 1, max: second, color: '#005e67' },\n { min: second + 1, max, color: '#00393d' }\n ].filter(level => level.min <= level.max);\n }\n\n static getMetersPerPixel(bbox: string, mapWidth: number): number {\n if (bbox && mapWidth > 0) {\n const [minLon, minLat, maxLon, maxLat] = bbox.split(',').map(Number);\n const centerLat = (minLat + maxLat) / 2;\n const widthMeters = getDistance([minLon, centerLat], [maxLon, centerLat]);\n return widthMeters / mapWidth;\n }\n return AdbMapUtils.INITIAL_METERS_PER_PIXEL;\n }\n\n static OverlayMaps = {\n 'Altitude': AdbMapUtils.wms(\"https://maps.sgu.se/lmv/hojdmodell/v1.1?SERVICE=WMS\",\n { layers: \"terrangskuggning\", format: \"image/png\", transparent: true, opacity: 0.3, maxZoom: 16, version: \"1.3.0\" }),\n 'Fjällkarta': AdbMapUtils.wms(\n 'api/maps/mountain',\n {\n minZoom: 6,\n maxZoom: 18,\n maxNativeZoom: 14,\n attribution: '© <a href=\"https://www.lantmateriet.se/\">Fjällkart</a>',\n wms: true\n }),\n 'Kommuner': AdbMapUtils.wms(\n 'https://sosgeo.artdata.slu.se/geoserver/GeoRegion/wms?',\n {\n layers: 'GeoRegion:Municipality',\n version: '1.1.0',\n transparent: true,\n format: 'image/png'\n }\n ),\n 'Län': AdbMapUtils.wms(\n 'https://sosgeo.artdata.slu.se/geoserver/GeoRegion/wms?',\n {\n layers: 'GeoRegion:County',\n version: '1.1.0',\n transparent: true,\n format: 'image/png'\n }\n )\n , 'Ortnamn': AdbMapUtils.wms(\n \"https://maps.sgu.se/lmv/topowebb-skikt/v1.1?SERVICE=WMS\",\n {\n layers: \"text\",\n format: \"image/png\",\n transparent: true,\n version: \"1.3.0\",\n }\n ),\n 'Ekonomisk zon': AdbMapUtils.wms(\n \"https://sosgeo.artdata.slu.se/geoserver/it.geosolutions/wms?\",\n {\n layers: \"it.geosolutions:Ekonomiska_zonens_yttre_avgränsningslinjer_linje\",\n format: \"image/png\",\n transparent: true,\n version: \"1.1.0\"\n }\n )\n };\n\n static Providers: MapProvider[] = [\n {\n name: 'Open Streetmap',\n id: 3,\n url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n minZoom: 0,\n maxZoom: 18,\n params: {\n maxNativeZoom: 18,\n attribution: '© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'\n },\n wms: false\n },\n {\n name: 'Sveriges gränser',\n id: 7,\n url: 'https://sosgeo.artdata.slu.se/geoserver/it.geosolutions/wms',\n minZoom: 6,\n maxZoom: 18,\n params: {\n maxNativeZoom: 14,\n attribution: '© <a href=\"https://www.lantmateriet.se/\">Sveriges gränser</a>',\n layers: 'it.geosolutions:Sverige_epsg5845', styles: 'municipality_name_yellow',\n epsg: 5845\n },\n wms: true\n }\n ]\n\n private static wms(url: string, options: any): TileLayer<TileWMS> {\n const { opacity = 1, attribution, minZoom, maxZoom, maxNativeZoom, epsg, wms, ...parameters } = options;\n const params = Object.fromEntries(Object.entries(parameters).map(([key, value]) => [key.toUpperCase(), value]));\n return new TileLayer({\n opacity, minZoom, maxZoom,\n source: new TileWMS({ url, params, attributions: attribution })\n });\n }\n\n static createMap(elementId: string, options: MapOptions = {}): Map {\n const map = new Map({\n target: elementId,\n view: new View({ center: fromLonLat([AdbMapUtils.INITIAL_CENTER_LNG, AdbMapUtils.INITIAL_CENTER_LAT]), zoom: 5, minZoom: 0, maxZoom: 20 }),\n controls: controls({ zoom: options.zoom ?? true }).extend([new ScaleLine()]),\n interactions: interactions({\n mouseWheelZoom: options.scrollZoom ?? true,\n dragPan: options.zoom ?? true\n })\n });\n if (options.providers !== false) this.addProviders(map);\n return map;\n }\n\n private static addProviders(map: Map): void {\n const element = document.createElement('details');\n element.className = 'ol-control adb-map-layers';\n const summary = document.createElement('summary');\n summary.textContent = 'Kartlager';\n element.append(summary);\n const backgrounds = this.Providers.map(provider => {\n const layer = provider.wms\n ? this.wms(provider.url, provider.params)\n : new TileLayer({ source: new XYZ({\n url: provider.url.replace('{s}', '{a-c}'),\n attributions: provider.params.attribution,\n maxZoom: provider.params.maxNativeZoom\n }) });\n return { name: provider.name, layer };\n });\n // Each map needs its own layers and sources.\n const overlays = Object.entries(this.OverlayMaps).map(([name, original]) => ({\n name,\n layer: new TileLayer({\n source: new TileWMS({ url: original.getSource().getUrls()[0], params: original.getSource().getParams(),\n attributions: original.getSource().getAttributions() }),\n opacity: original.getOpacity(), minZoom: original.getMinZoom(), maxZoom: original.getMaxZoom()\n })\n }));\n for (const [index, entry] of [...backgrounds, ...overlays].entries()) {\n const background = index < backgrounds.length;\n entry.layer.setVisible(index === 0);\n map.addLayer(entry.layer);\n const label = document.createElement('label');\n const input = document.createElement('input');\n input.type = background ? 'radio' : 'checkbox';\n input.name = `background-${map.getTarget()}`;\n input.checked = entry.layer.getVisible();\n input.addEventListener('change', () => {\n if (background) backgrounds.forEach(item => item.layer.setVisible(item === entry));\n else entry.layer.setVisible(input.checked);\n });\n label.append(input, document.createTextNode(entry.name));\n element.append(label);\n if (index === 0) element.append(document.createElement('hr'));\n }\n map.addControl(new Control({ element }));\n }\n\n static createFile(source: Blob, fileName = 'map-download'): boolean {\n const link = document.createElement('a');\n link.href = URL.createObjectURL(source);\n link.download = fileName;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(link.href);\n return true;\n }\n}\n\ninterface MapProvider {\n name: string;\n id: number;\n url: string;\n minZoom: number;\n maxZoom: number;\n wms: boolean;\n params?: any;\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, forwardRef, OnDestroy } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport Map from 'ol/Map.js';\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport Draw from 'ol/interaction/Draw.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport Circle from 'ol/geom/Circle.js';\nimport { circular } from 'ol/geom/Polygon.js';\nimport { fromLonLat, toLonLat } from 'ol/proj.js';\nimport { getDistance } from 'ol/sphere.js';\nimport { AdbMapUtils } from './mapUtils';\n\n@Component({\n selector: 'adb-polygon-drawer',\n templateUrl: 'polygon-drawer.component.html',\n standalone: false,\n changeDetection: ChangeDetectionStrategy.Eager,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => PolygonDrawerInput), multi: true }]\n})\nexport class PolygonDrawerInput implements ControlValueAccessor, AfterViewInit, OnDestroy {\n mapId = 'draw-' + Math.floor(Math.random() * Date.now());\n map: Map;\n polygonDraw = false;\n disabled = false;\n shapeLayer = false;\n private source = new VectorSource();\n private format = new GeoJSON();\n private draw: Draw;\n private geoJson: any;\n private resizeObserver: ResizeObserver;\n private pendingFit = false;\n private onChange = (value: any) => {};\n private onTouched = () => {};\n\n ngAfterViewInit(): void {\n this.map = AdbMapUtils.createMap(this.mapId, { zoom: true, scrollZoom: true, providers: true });\n this.map.addLayer(new VectorLayer({ source: this.source }));\n this.resizeObserver = new ResizeObserver(() => {\n this.map.updateSize();\n this.fitShape();\n });\n this.resizeObserver.observe(this.map.getTargetElement());\n this.renderValue();\n }\n\n onDrawPolygon(): void { this.startDraw('Polygon'); }\n onDrawCircle(): void { this.startDraw('Circle'); }\n\n private startDraw(type: 'Polygon' | 'Circle'): void {\n if (this.disabled) return;\n this.stopDraw();\n this.polygonDraw = true;\n this.draw = new Draw({ source: this.source, type });\n this.map.addInteraction(this.draw);\n this.draw.on('drawend', event => {\n this.source.clear();\n const geometry = event.feature.getGeometry();\n const options = { featureProjection: this.map.getView().getProjection() };\n let geo;\n if (geometry instanceof Circle) {\n const center = toLonLat(geometry.getCenter());\n const edge = toLonLat([geometry.getCenter()[0] + geometry.getRadius(), geometry.getCenter()[1]]);\n const radius = Math.ceil(getDistance(center, edge));\n geo = { type: 'Feature', geometry: this.format.writeGeometryObject(circular(center, radius, 64)),\n properties: { radius } };\n } else geo = this.format.writeFeatureObject(event.feature, options);\n this.geoJson = geo;\n this.shapeLayer = true;\n this.onChange(geo);\n this.onTouched();\n this.stopDraw();\n });\n }\n\n private stopDraw(): void {\n if (this.draw) this.map.removeInteraction(this.draw);\n this.draw = undefined;\n this.polygonDraw = false;\n }\n\n onUndoStep(): void { this.draw?.removeLastPoint(); }\n\n onDeleteShape(): void {\n if (this.disabled) return;\n this.stopDraw();\n this.source.clear();\n this.pendingFit = false;\n this.shapeLayer = false;\n this.geoJson = null;\n this.onChange(null);\n this.onTouched();\n this.map.getView().setCenter(fromLonLat([AdbMapUtils.INITIAL_CENTER_LNG, AdbMapUtils.INITIAL_CENTER_LAT]));\n this.map.getView().setZoom(5);\n }\n\n private renderValue(): void {\n if (!this.map) return;\n this.source.clear();\n this.pendingFit = false;\n this.shapeLayer = false;\n if (this.geoJson?.type !== 'Feature') return;\n const feature = this.format.readFeatures(this.geoJson, { featureProjection: this.map.getView().getProjection() })[0];\n if (this.geoJson.geometry.type === 'Point' && this.geoJson.properties?.radius) {\n const latitude = this.geoJson.geometry.coordinates[1];\n feature.setGeometry(new Circle(fromLonLat(this.geoJson.geometry.coordinates),\n this.geoJson.properties.radius / Math.cos(latitude * Math.PI / 180)));\n }\n this.source.addFeature(feature);\n this.shapeLayer = true;\n this.pendingFit = true;\n this.fitShape();\n }\n\n private fitShape(): void {\n const size = this.map.getSize();\n if (!this.pendingFit || !size?.[0] || !size[1]) return;\n this.map.getView().fit(this.source.getExtent(), { padding: [20, 20, 20, 20], maxZoom: 18 });\n this.pendingFit = false;\n }\n\n writeValue(value: any): void { this.geoJson = value; this.renderValue(); }\n registerOnChange(fn: (value: any) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n if (disabled && this.map) this.stopDraw();\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n this.map?.dispose();\n }\n}\n","<div class=\"mb-1 d-flex gap-1 flex-wrap align-items-start\">\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled || shapeLayer\" (click)=\"onDrawPolygon()\" title=\"Polygon\">\n <span class=\"bi bi-pentagon\"></span> {{'OBSERVATION.DRAW'|translate}}\n </button>\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled || shapeLayer\" (click)=\"onDrawCircle()\" title=\"Circle\">\n <span class=\"bi bi-circle\"></span> {{'OBSERVATION.DRAW_CIRCLE'|translate}}\n </button>\n @if (shapeLayer) {\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled\" (click)=\"onDeleteShape()\" title=\"Ta bort\">\n <span class=\"bi bi-x\"></span>\n </button>\n }\n @if (polygonDraw) {\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled\" (click)=\"onUndoStep()\" title=\"Ångra\">\n <span class=\"bi bi-arrow-counterclockwise\"></span>\n </button>\n }\n</div>\n<div [id]=\"mapId\" class=\"border\" style=\"height:20rem\"></div>","import { Inject, Injectable } from \"@angular/core\";\nimport { InjectionToken } from \"@angular/core\";\nexport interface AdbMapConfig {\n api: string,\n artfaktaTaxonLists: string,\n dynamic?: boolean;\n gridOnly?: boolean;\n enableClusterSelection?: boolean;\n dataProviderIds?: readonly number[];\n}\n\nexport type AdbMapFilterType =\n | 'taxon'\n | 'area'\n | 'ownArea'\n | 'time'\n | 'redlist'\n | 'risklist'\n | 'taxonLists'\n | 'datasources';\n\nexport const ADB_MAP_CONFIG = new InjectionToken<AdbMapConfig>('ADB_MAP_CONFIG');\n\n@Injectable()\nexport class AdbMapConfigService {\n readonly artfaktaTaxonLists: string;\n readonly observationFeatures: string;\n readonly taxaListsApi: string;\n readonly dynamic: boolean;\n readonly gridOnly: boolean;\n readonly enableClusterSelection: boolean;\n readonly dataProviderIds: readonly number[] | undefined;\n\n constructor(@Inject(ADB_MAP_CONFIG) config: AdbMapConfig) {\n this.dynamic = config.dynamic ?? false;\n this.gridOnly = config.gridOnly ?? false;\n this.dataProviderIds = config.dataProviderIds === undefined\n ? undefined : Object.freeze([...config.dataProviderIds]);\n this.enableClusterSelection = config.enableClusterSelection ?? false;\n this.artfaktaTaxonLists = config.artfaktaTaxonLists ?? 'https://artfakta.se/metadata/listor';\n this.taxaListsApi = config.api + '/taxalists';\n // this.observationFeatures = config.api + '/observation-features';\n this.observationFeatures = 'https://sos-search-st.wt.artdata.slu.se/observations/internal/adaptivesearchlocations';\n }\n}\n","import { Component, Input, forwardRef, ChangeDetectionStrategy } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'app-treeview',\n templateUrl: './treeview.html',\n standalone:false,\n changeDetection: ChangeDetectionStrategy.Eager,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TreeviewComponent),\n multi: true\n }\n ]\n})\nexport class TreeviewComponent implements ControlValueAccessor {\n @Input() nodes: ListItem[] = [];\n\n private selectedIds: number[] = [];\n private onChange: (value: number[]) => void = () => {};\n private onTouched: () => void = () => {};\n\n writeValue(ids: number[] | null): void {\n this.selectedIds = ids ?? [];\n this.applySelection(this.nodes);\n }\n\n registerOnChange(fn: (value: number[]) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.setReadOnly(this.nodes, isDisabled);\n }\n\n onLeafToggle(node: ListItem): void {\n if (node._readOnly) return;\n\n node._selected = !node._selected;\n\n this.selectedIds = TreeviewComponent.collectSelectedLeafIds(this.nodes);\n this.onChange(this.selectedIds);\n this.onTouched();\n }\n\n private applySelection(nodes: ListItem[]): void {\n for (const node of nodes) {\n if (node.children?.length) {\n this.applySelection(node.children);\n } else {\n node._selected = this.selectedIds.includes(node.id);\n }\n }\n }\n\n private setReadOnly(nodes: ListItem[], readOnly: boolean): void {\n for (const node of nodes) {\n node._readOnly = readOnly;\n if (node.children?.length) {\n this.setReadOnly(node.children, readOnly);\n }\n }\n }\n\n private static collectSelectedLeafIds(nodes: ListItem[]): number[] {\n const ids: number[] = [];\n\n for (const node of nodes) {\n if (node.children?.length) {\n ids.push(...this.collectSelectedLeafIds(node.children));\n } else if (node._selected) {\n ids.push(node.id);\n }\n }\n\n return ids;\n }\n}\n\n interface ListItem {\n id: number;\n name?: string;\n children?: ListItem[];\n\n _selected?: boolean;\n _readOnly?: boolean;\n}\n\n","<ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: nodes }\">\n</ng-container>\n<ng-template #nodeTpl let-nodes>\n @for (node of nodes; track node) {\n <div class=\"ms-3\">\n @if(!node.children || node.children.length === 0){\n <div class=\"d-flex align-items-center gap-2\">\n <input id=\"{{node.id}}\" type=\"checkbox\" class=\"form-check-input m-0\" [checked]=\"node._selected\" [disabled]=\"node._readOnly\" (change)=\"onLeafToggle(node)\" />\n <label for=\"{{node.id}}\">{{ node.name }}</label>\n </div>\n }\n @else {\n {{ node.name }}\n <div>\n <ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: node.children }\">\n </ng-container>\n </div>\n }\n </div>\n}\n</ng-template>","import { Params } from '@angular/router';\n\nexport class TempUtils {\n static readonly euRegulation = 5;\n\n\n static createQParams(qParams: any, mpp: number): Params {\n const params = {\n // includeFilterAreasInResult: true,\n returnInputBBox: true,\n cluster: true,\n createPolygons: 'WhenNeeded',\n useCache: true,\n // createSampleObservations: true,\n maxGridCells: 1000,\n maxZoom: 19,\n clusterRadiusPx: 20,\n minLocationCountBeforeClustering: 0,\n disablePixelClusteringAtMetersPerPixel: 2.0,\n detailClusterRadiusPx: 10,\n metersPerPixel: mpp,\n adaptiveSearchStrategy: 'Auto',\n locationAggregationLimit: 1000,\n observationsLimit: 5000,\n includeFilterAreasInResult: true\n } as any;\n if (qParams.cutoff) {\n params.cutoffYear = qParams.cutoff\n }\n if (qParams.bbox) {\n params.bbox = qParams.bbox;\n }\n return params;\n }\n\n\n static createObservationsBody(queryParams: Params): any {\n const params = queryParams as any;\n const body: any = { geographics: {} };\n\n const startDate = params.startAt ?? params.startDate;\n const endDate = params.endAt ?? params.endDate;\n if (startDate) {\n body.date = {\n startDate,\n ...(endDate && { endDate })\n };\n }\n\n if (params.taxonId) {\n body.taxon = {\n Ids: [+params.taxonId],\n includeUnderlyingTaxa: true\n };\n }\n\n const taxonListIds = this.getTaxonListIds(params);\n if (taxonListIds.length) {\n body.taxon ??= {};\n body.taxon.taxonListIds = taxonListIds;\n body.taxon.taxonListOperator = 'Filter';\n }\n\n \n\n if (params.area) {\n const areas = Array.isArray(params.area)\n ? params.area\n : [params.area];\n\n body.geographics = {\n areas: areas.map(area => {\n const [areaType, featureId] = area.split('-');\n return { areaType, featureId };\n })\n };\n }\n if (params.geo) {\n body.geographics.geometries = [{\n type: 'Polygon',\n coordinates: [JSON.parse(params.geo)]\n }];\n }\n\n if (params.locationId) {\n body.geographics.locationIds = Array.isArray(params.locationId)\n ? params.locationId\n : [params.locationId];\n }\n\n if (params.ds) {\n body.dataProvider = {\n ids: this.toNumberArray(params.ds)\n };\n }\n\n return {\n occurrenceStatus:\n params.noted === 'true'\n ? 'Present'\n : 'BothPresentAndAbsent',\n\n notRecoveredFilter: 'NoFilter',\n determinationFilter: 'NotUnsureDetermination',\n\n extendedFilter: {\n notPresentFilter: 'DontIncludeNotPresent',\n ...(params.activities && {\n activityIds: JSON.parse(params.activities).map(Number)\n })\n },\n\n ...body\n };\n }\n\n\n private static getTaxonListIds(params: any): number[] {\n return [\n ...this.toNumberArray(params.rc), // Risk class\n ...this.toNumberArray(params.rlc), // Red list\n ...this.toNumberArray(params.list), // Taxon lists\n ...(params.eu ? [this.euRegulation] : [])\n ];\n }\n\n private static toNumberArray(value: any): number[] {\n if (!value) {\n return [];\n }\n return (Array.isArray(value) ? value : [value]).map(Number);\n }\n}\n","import { afterRenderEffect, Component, computed, effect, ElementRef, inject, input, output, signal, ChangeDetectionStrategy } from '@angular/core';\nimport type { FeatureLike } from 'ol/Feature.js';\nimport type { Extent } from 'ol/extent.js';\nimport LineString from 'ol/geom/LineString.js';\nimport Polygon from 'ol/geom/Polygon.js';\nimport MultiPolygon from 'ol/geom/MultiPolygon.js';\n\n@Component({\n selector: 'adb-map-feature-picker',\n templateUrl: 'map-feature-picker.html',\n host: { class: 'adb-map-feature-picker' },\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class MapFeaturePickerComponent {\n locationOptions = input.required<{\n features: FeatureLike[];\n pixel: number[];\n extent: Extent;\n selectMode: boolean;\n }>();\n readonly featureChosen = output<{ feature: FeatureLike; properties: any; selectMode: boolean; restoreFocus: boolean }>();\n readonly dismissed = output<boolean>();\n position = signal({ left: 0, top: 0 });\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private features = computed(() => {\n const { features, extent } = this.locationOptions();\n const hits = features.filter(feature =>\n !['FilterArea.Area', 'FilterArea.OwnPolygon'].includes(feature.get('FeatureType')));\n const point = hits.find(feature => ['Point', 'MultiPoint'].includes(feature.getGeometry().getType()));\n return point ? [point] : hits.filter(feature =>\n !feature.get('locations') || this.hasVisibleEdge(feature, extent));\n });\n\n choices = computed(() => {\n const choices: { feature: FeatureLike; item: any }[] = [];\n const ids = new Set<string>();\n for (const feature of this.features()) {\n if (feature.get('groupingType') === 'pixelCluster' || feature.get('isCluster')) continue;\n for (const item of feature.get('locations')?.items ?? []) {\n if (ids.has(item.locationId)) continue;\n ids.add(item.locationId);\n choices.push({ feature, item });\n }\n }\n return choices;\n });\n\n constructor() {\n effect(() => {\n const choices = this.choices();\n if (choices.length > 1) return;\n if (choices.length === 1) this.choose(choices[0], false);\n else if (this.features().length) this.pick(this.features()[0]);\n else this.dismissed.emit(false);\n });\n\n afterRenderEffect(() => {\n if (this.choices().length < 2) return;\n const { pixel } = this.locationOptions();\n const host = this.host.nativeElement;\n const panel = host.querySelector<HTMLElement>('section');\n if (!panel) return;\n this.position.set({\n left: Math.max(0, Math.min(pixel[0], host.clientWidth - panel.offsetWidth)),\n top: Math.max(0, Math.min(pixel[1], host.clientHeight - panel.offsetHeight))\n });\n panel.querySelector<HTMLButtonElement>('.list-group-item-action')?.focus({ preventScroll: true });\n });\n }\n\n choose(choice: any, restoreFocus = true): void {\n const properties = choice.feature.getProperties();\n delete properties['geometry'];\n properties['locations'] = {\n ...properties['locations'], count: 1, ids: [choice.item.locationId], items: [choice.item]\n };\n this.featureChosen.emit({ feature: choice.feature, properties, selectMode: this.locationOptions().selectMode, restoreFocus });\n }\n\n private pick(feature: FeatureLike): void {\n const properties = feature.getProperties();\n delete properties['geometry'];\n this.featureChosen.emit({ feature, properties, selectMode: this.locationOptions().selectMode, restoreFocus: false });\n }\n\n private hasVisibleEdge(feature: FeatureLike, extent: Extent): boolean {\n const geometry = feature.getGeometry();\n const polygons = geometry instanceof MultiPolygon ? geometry.getPolygons()\n : geometry instanceof Polygon ? [geometry] : null;\n if (!polygons) return true;\n // A surrounding polygon is only offered if some part of its boundary is visible.\n return polygons.some(polygon => polygon.getLinearRings().some(ring =>\n new LineString(ring.getCoordinates()).intersectsExtent(extent)));\n }\n}\n","@if (choices().length > 1) {\n<section class=\"adb-plate-primary shadow adb-map-feature-picker-panel\" [style.left.px]=\"position().left\" [style.top.px]=\"position().top\" [attr.aria-label]=\"'MAP.FEATURE_PICKER.TITLE' | translate\"\n (adbClickOutside)=\"dismissed.emit(false)\"\n (keydown.escape)=\"$event.stopPropagation(); dismissed.emit(true)\">\n <div class=\"d-flex align-items-center justify-content-between gap-3 mb-2\">\n <h2 class=\"h6 mb-0\">{{'MAP.FEATURE_PICKER.TITLE' | translate}}</h2>\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'MAP.FEATURE_PICKER.CLOSE' | translate\" (click)=\"dismissed.emit(true)\"></button>\n </div>\n <ul class=\"list-group list-group-flush\">\n @for (choice of choices(); track choice.item.locationId) {\n <li class=\"list-group-item p-0\">\n <button type=\"button\" class=\"list-group-item list-group-item-action border-0 text-break\" (click)=\"choose(choice)\">\n @if (choice.item.locality) {\n {{choice.item.locality}}\n @if (choice.item.municipality) {, {{choice.item.municipality}}}\n } @else if (choice.item.municipality) {\n {{choice.item.municipality}}\n }\n ({{choice.item.locationId}})\n </button>\n </li>\n }\n </ul>\n</section>\n}\n","import { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\nimport { GeoJson } from '../../models';\nimport { AdbMapUtils } from './mapUtils';\nimport { MapConstants } from '../../constants';\n\n@Component({\n selector: 'adb-map-legend',\n templateUrl: 'legend.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class MapLegendComponent {\n readonly generalizedBackgroundColor = MapConstants.GENERALIZED_POLYGON_BACKGROUND_COLOR;\n result = input<GeoJson>(null);\n cutoffYear = input<string>(null);\n loading = input(false);\n showObservationStatus = input(false);\n gridLevels = computed(() => AdbMapUtils.gridLevels(this.result()));\n private features = computed(() => (this.result()?.features ?? [])\n .filter(feature => feature.properties?.FeatureType !== 'FilterArea.Area'));\n hasNotRecovered = computed(() => this.showObservationStatus() && this.features().some(feature =>\n AdbMapUtils.isNotRecovered(feature.properties?.presentation)));\n hasNotPresent = computed(() => this.showObservationStatus() && this.features().some(feature =>\n feature.properties?.presentation?.status === 'NotPresent'));\n hasGeneralizedPolygons = computed(() => this.showObservationStatus() && this.features().some(feature =>\n feature.properties?.presentation?.generalized && ['Polygon', 'MultiPolygon'].includes(feature.geometry?.type)));\n hasCutoff = computed(() => this.cutoffYear() !== null && this.features().some(feature =>\n ['Until', 'After'].includes(feature.properties?.presentation?.cutoffYearStatus)));\n hasLocations = computed(() => this.features().some(feature =>\n feature.properties?.groupingType !== 'pixelCluster' && !feature.properties?.isCluster &&\n (feature.properties?.locations || feature.properties?.location ||\n ['Point', 'MultiPoint'].includes(feature.geometry?.type))));\n hasClusters = computed(() => this.features().some(feature =>\n feature.properties?.groupingType === 'pixelCluster' || feature.properties?.isCluster));\n}\n","<div class=\"bg-light border p-1 d-flex column-gap-1 align-items-center flex-wrap\">\n @if (hasLocations() || hasClusters()) {\n <div class=\"d-flex align-items-start gap-2 w-100\">\n <ul class=\"list-unstyled mb-0 d-flex flex-grow-1 flex-wrap column-gap-3 row-gap-1\">\n @if (hasCutoff()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend legend-before\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.BEFORE' | translate}} {{cutoffYear()}}\n </li>\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend legend-after\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.FROM' | translate}} {{cutoffYear()}}\n </li>\n } @else if (hasLocations()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"map-symbol-circle map-symbol-bg-5\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.LOCATION' | translate}}\n </li>\n }\n @if (hasClusters() && !hasCutoff()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend legend-cluster\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.CLUSTER' | translate}}\n </li>\n }\n @if (hasNotRecovered()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"map-symbol-circle-x map-symbol-bg-5\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.NOT_RECOVERED' | translate}}\n </li>\n }\n @if (hasNotPresent()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"map-symbol-circle map-symbol-bg-5 d-inline-flex align-items-center justify-content-center\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" focusable=\"false\">\n <line x1=\"2\" y1=\"6\" x2=\"10\" y2=\"6\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n </svg>\n </span>\n {{'MAP.LEGEND.NOT_PRESENT' | translate}}\n </li>\n }\n @if (hasGeneralizedPolygons()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend border border-2 border-danger\"\n [style.background-color]=\"generalizedBackgroundColor\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.GENERALIZED_LOCATION' | translate}}\n </li>\n }\n </ul>\n <adb-help-button class=\"ms-auto flex-shrink-0\">\n <dl>\n <dt>{{'MAP.LEGEND.LOCATION' | translate}}</dt>\n <dd>{{'MAP.LEGEND.LOCATION_HELP' | translate}}</dd>\n <dt>{{'MAP.LEGEND.CLUSTER' | translate}}</dt>\n <dd>{{'MAP.LEGEND.CLUSTER_HELP' | translate}}</dd>\n </dl>\n </adb-help-button>\n </div>\n @if (hasCutoff() && hasClusters()) {\n <small class=\"d-block w-100\">{{'MAP.LEGEND.CLUSTER_SIZE' | translate}}</small>\n }\n }\n @if (!loading()) {\n @for (level of gridLevels(); track $index) {\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"legend border border-dark\" [style.background-color]=\"level.color\" aria-hidden=\"true\"></span>\n <small>\n @if ($first) {\n &lt; {{level.max + 1 | adbSpacing}}\n } @else if ($last) {\n &gt; {{level.min - 1 | adbSpacing}}\n } @else {\n {{level.min | adbSpacing}}–{{level.max | adbSpacing}}\n }\n </small>\n </div>\n }\n }\n</div>\n","import { AfterViewInit, Component, computed, effect, input, OnDestroy, output, signal, ChangeDetectionStrategy } from \"@angular/core\";\nimport Map from 'ol/Map.js';\nimport Feature from 'ol/Feature.js';\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport CircleGeometry from 'ol/geom/Circle.js';\nimport { Fill, Stroke, Style } from 'ol/style.js';\nimport { transformExtent, toLonLat } from 'ol/proj.js';\nimport { extend, getCenter, getForViewAndSize, isEmpty } from 'ol/extent.js';\nimport type { Extent } from 'ol/extent.js';\nimport type { FeatureLike } from 'ol/Feature.js';\nimport { finalize } from 'rxjs/operators';\nimport { ActivatedRoute, ActivatedRouteSnapshot, NavigationEnd, Params, Router } from \"@angular/router\";\nimport { Subscription } from \"rxjs\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { HttpClient, HttpResponse } from \"@angular/common/http\";\nimport { GeoJson } from \"../../models\";\nimport { AdbMapConfigService } from \"../../config\";\nimport { AdbMapUtils } from \"./mapUtils\";\nimport { TempUtils } from \"../tempUtils\";\nimport { MapConstants } from \"../../constants\";\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nexport type MapPresentationMode = 'locations' | 'observations';\n\n@Component({\n selector: 'adb-map',\n templateUrl: 'adb-map.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class AdbMapComponent implements AfterViewInit, OnDestroy {\n showLegend = input(true);\n showHeader = input(true);\n allowPresentationMode = input(false);\n presentationMode = input<MapPresentationMode>('locations');\n private route = signal<ActivatedRouteSnapshot>(null);\n activePresentationMode = computed(() => {\n const mode = this.route()?.queryParams['presentationMode'];\n if (this.allowPresentationMode() && (mode === 'locations' || mode === 'observations')) return mode;\n return this.presentationMode();\n });\n private requestedParams = '';\n settingsOpen = signal(false);\n savingSettings = signal(false);\n settingsError = signal(false);\n settingsForm = new FormGroup({\n presentationMode: new FormControl('locations'),\n uncertain: new FormControl(false),\n cutoff: new FormControl('', Validators.pattern(/^[1-9]\\d*$/))\n });\n private preserveViewOnNextLoad = false;\n error: null;\n mapLoading = signal(false);\n readonly locationSelected = output<any>();\n readonly clusterSelected = output<any>();\n private siteSource = new VectorSource();\n private uncertaintySource = new VectorSource();\n private siteLayer = new VectorLayer({ source: this.siteSource, style: feature => this.featureStyle(feature) });\n private format = new GeoJSON();\n private resizeObserver: ResizeObserver;\n private requestSubscription: Subscription;\n private hoveredFeature: unknown;\n private selectedFeature: FeatureLike = null;\n locationOptions = signal<{\n features: FeatureLike[]; pixel: number[]; extent: Extent; selectMode: boolean;\n }>(null);\n private fittedView = '';\n private pendingExtent: Extent;\n mapResult = signal<GeoJson>(null);\n cutoffYear = computed(() => this.activePresentationMode() === 'observations'\n ? this.route()?.queryParams['cutoff'] ?? null : null);\n private gridLevels = computed(() => AdbMapUtils.gridLevels(this.mapResult()));\n mapId = '' + Math.floor(Math.random() * Date.now());\n map: Map;\n\n private mapReady = signal(false);\n queryParams: Params = {};\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private config: AdbMapConfigService,\n private router: Router,\n private http: HttpClient) {\n\n this.route.set(this.activatedRoute.snapshot);\n\n this.settingsForm.controls.presentationMode.valueChanges.pipe(takeUntilDestroyed()).subscribe(mode => {\n const cutoff = this.settingsForm.controls.cutoff;\n if (this.allowPresentationMode() && mode === 'observations') cutoff.enable();\n else cutoff.disable();\n });\n\n // Read query and route parameters together, after navigation has finished.\n this.router.events.pipe(takeUntilDestroyed()).subscribe(event => {\n if (event instanceof NavigationEnd) this.route.set(this.activatedRoute.snapshot);\n });\n\n // All data updates start here, once the map has a usable size.\n effect(() => {\n if (!this.mapReady()) return;\n const snapshot = this.route();\n this.queryParams = snapshot.queryParams;\n\n this.siteLayer.changed();\n const params = { ...snapshot.queryParams };\n delete params['presentationMode'];\n if (this.activePresentationMode() === 'locations') delete params['cutoff'];\n if (snapshot.paramMap.has('taxonId')) {\n params['taxonId'] = snapshot.paramMap.get('taxonId');\n }\n const requestKey = JSON.stringify(params);\n if (requestKey === this.requestedParams) {\n this.preserveViewOnNextLoad = false;\n return;\n }\n this.requestedParams = requestKey;\n this.loadFeature(params);\n });\n }\n\n ngAfterViewInit(): void {\n this.map = AdbMapUtils.createMap(this.mapId, {\n zoom: true,\n scrollZoom: false,\n providers: true\n });\n\n this.map.addLayer(new VectorLayer({\n source: this.uncertaintySource,\n style: new Style({ stroke: new Stroke({ color: MapConstants.UNCERTAINTY_BORDER_COLOR, width: 1 }) })\n }));\n this.map.addLayer(this.siteLayer);\n this.resizeObserver = new ResizeObserver(() => {\n this.closeLocationPicker(false);\n this.map.updateSize();\n const size = this.map.getSize();\n if (size?.[0] && size[1]) this.mapReady.set(true);\n this.fitPendingExtent();\n });\n this.resizeObserver.observe(this.map.getTargetElement());\n this.fittedView = this.viewKey();\n const size = this.map.getSize();\n if (size?.[0] && size[1]) this.mapReady.set(true);\n this.attachUserListeners();\n }\n\n openSettings(): void {\n this.settingsForm.reset({\n presentationMode: this.activePresentationMode(),\n uncertain: this.queryParams['uncertain'] === 'true',\n cutoff: {\n value: this.queryParams['cutoff'] ?? '',\n disabled: !this.allowPresentationMode() || this.activePresentationMode() !== 'observations'\n }\n });\n this.settingsError.set(false);\n this.closeLocationPicker(false);\n this.settingsOpen.set(true);\n }\n\n cancelSettings(button: HTMLButtonElement): void {\n this.settingsForm.reset();\n this.settingsOpen.set(false);\n button.focus({ preventScroll: true });\n }\n\n async saveSettings(button: HTMLButtonElement): Promise<void> {\n if (this.settingsForm.invalid || this.savingSettings()) return;\n this.savingSettings.set(true);\n this.settingsError.set(false);\n this.preserveViewOnNextLoad = true;\n try {\n const saved = await this.router.navigate([], {\n relativeTo: this.activatedRoute,\n queryParams: {\n uncertain: this.settingsForm.value.uncertain || null,\n presentationMode: this.allowPresentationMode() ? this.settingsForm.value.presentationMode : null,\n cutoff: this.allowPresentationMode()\n ? this.settingsForm.value.cutoff || null : null\n },\n queryParamsHandling: 'merge'\n });\n if (saved) this.cancelSettings(button);\n else this.settingsError.set(true);\n } catch {\n this.settingsError.set(true);\n } finally {\n if (this.settingsError()) this.preserveViewOnNextLoad = false;\n this.savingSettings.set(false);\n }\n }\n\n onExport(): void {\n const json = this.format.writeFeatures(this.siteSource.getFeatures(), {\n featureProjection: this.map.getView().getProjection(), dataProjection: 'EPSG:4326'\n });\n AdbMapUtils.createFile(new Blob([json], { type: 'application/geo+json' }), 'sites.geojson');\n }\n\n private attachUserListeners(): void {\n this.map.on('moveend', () => {\n this.closeLocationPicker(false);\n if (this.viewKey() === this.fittedView) return;\n if (this.config.dynamic) {\n const bbox = this.currentBbox();\n if (bbox !== this.queryParams?.['bbox']) {\n this.router.navigate([], {\n relativeTo: this.activatedRoute,\n queryParams: { bbox }, queryParamsHandling: 'merge'\n });\n }\n }\n });\n this.map.on('pointermove', event => {\n const feature = this.config.dynamic ? this.map.forEachFeatureAtPixel(event.pixel,\n feature => ['FilterArea.Area', 'FilterArea.OwnPolygon'].includes(feature.get('FeatureType')) ? null : feature,\n { layerFilter: layer => layer === this.siteLayer }) : undefined;\n this.map.getTargetElement().style.cursor = feature ? 'pointer' : '';\n if (this.hoveredFeature !== feature) {\n this.hoveredFeature = feature;\n this.siteLayer.changed();\n }\n });\n this.map.on('singleclick', event => {\n if (!this.config.dynamic) return;\n this.locationOptions.set({\n features: this.map.getFeaturesAtPixel(event.pixel, { layerFilter: layer => layer === this.siteLayer }),\n pixel: event.pixel,\n extent: this.map.getView().calculateExtent(this.map.getSize()),\n selectMode: this.config.enableClusterSelection &&\n (event.originalEvent.ctrlKey || event.originalEvent.metaKey)\n });\n });\n }\n\n closeLocationPicker(restoreFocus = true): void {\n this.locationOptions.set(null);\n this.hoveredFeature = null;\n this.siteLayer.changed();\n if (restoreFocus) this.map.getTargetElement().focus({ preventScroll: true });\n }\n\n onFeatureChosen(selection: any): void {\n this.closeLocationPicker(selection.restoreFocus);\n const { feature, properties: props } = selection;\n const cluster = props['groupingType'] === 'pixelCluster' || props['isCluster'];\n const location = !cluster && !!(props['location'] || props['observationCount']);\n if ((cluster || location) && this.config.enableClusterSelection &&\n selection.selectMode) {\n this.selectedFeature = feature;\n this.siteLayer.changed();\n delete props['geometry'];\n if (cluster) {\n this.clusterSelected.emit(props);\n } else {\n this.locationSelected.emit(props);\n }\n return;\n }\n if (location) {\n delete props['geometry'];\n this.locationSelected.emit(props);\n } else if (cluster || props['ObservationsCount'] > 0) {\n let extent = feature.getGeometry().getExtent();\n if (cluster) {\n const projectedCenter = getCenter(extent);\n const center = toLonLat(projectedCenter);\n const radius = props['cluster'].radiusMeters;\n const circle = new CircleGeometry(projectedCenter, radius / Math.cos(center[1] * Math.PI / 180));\n extent = circle.getExtent();\n const view = this.map.getView();\n const size = this.map.getSize();\n // Match the padding used when fitting the response extent.\n const fitSize = [size[0] - 40, size[1] - 40];\n if (view.getResolutionForExtent(extent, fitSize) >= view.getResolution()) {\n extent = getForViewAndSize(projectedCenter, view.getResolution() / 2, 0, fitSize);\n }\n }\n const bbox = transformExtent(extent, this.map.getView().getProjection(), 'EPSG:4326').join(',');\n this.router.navigate([], { relativeTo: this.activatedRoute, queryParams: { bbox }, queryParamsHandling: 'merge' });\n }\n }\n\n private currentBbox(): string {\n return transformExtent(this.map.getView().calculateExtent(this.map.getSize()),\n this.map.getView().getProjection(), 'EPSG:4326').join(',');\n }\n\n private loadFeature(qParams: Params): void {\n this.requestSubscription?.unsubscribe();\n this.mapLoading.set(true);\n this.error = null;\n // A bbox matching the current view comes from panning or zooming the map.\n const fitView = !this.preserveViewOnNextLoad &&\n (!qParams['bbox'] || qParams['bbox'] !== this.currentBbox());\n this.preserveViewOnNextLoad = false;\n const requestedView = this.viewKey();\n const body = TempUtils.createObservationsBody(qParams);\n const allowedIds = this.config.dataProviderIds;\n if (allowedIds?.length) {\n body.dataProvider = { ids: [...allowedIds] };\n }\n qParams = TempUtils.createQParams(qParams, this.getMetersPerPixel(qParams));\n if (this.config.gridOnly) {\n qParams['adaptiveSearchStrategy'] = 'ObservationsThenGrid';\n qParams['observationsLimit'] = 0;\n qParams['cluster'] = false;\n }\n\n const url = this.config.observationFeatures;\n this.requestSubscription = this.http.request<GeoJson>('POST', url, { observe: 'response', body: body, params: qParams }).\n pipe(\n finalize(() => {\n this.mapLoading.set(false);\n })\n ).\n subscribe({\n next: (response: HttpResponse<GeoJson>) => {\n if (!response.body) {\n throw new Error('No GeoJson body');\n }\n const geo = response.body;\n geo.properties = {\n ...geo.properties,\n count: response.headers.get('X-Observations-TotalCount') ?? geo.properties?.count\n };\n this.buildMap(geo, fitView && requestedView === this.viewKey());\n }, error: err => {\n this.requestedParams = '';\n this.error = err;\n }\n });\n }\n\n private getMetersPerPixel(qParams: any): number {\n return qParams.bbox\n ? AdbMapUtils.getMetersPerPixel(qParams.bbox, this.map.getSize()?.[0])\n : MapConstants.INITIAL_METERS_PER_PIXEL;\n }\n\n private buildMap(geojson: GeoJson, fitView: boolean): void {\n this.mapResult.set(geojson);\n const features = this.format.readFeatures(geojson, { featureProjection: this.map.getView().getProjection() });\n this.closeLocationPicker(false);\n this.selectedFeature = null;\n this.siteSource.clear();\n this.uncertaintySource.clear();\n this.siteSource.addFeatures(features);\n if (this.queryParams?.['uncertain'] === 'true') {\n for (const feature of features) {\n const props = feature.getProperties();\n if (props['groupingType'] !== 'singleLocation') continue;\n const location = props['locations']?.items?.[0];\n const radius = location?.coordinateUncertaintyInMeters;\n const geometry = feature.getGeometry();\n if (geometry.getType() === 'Point' && location?.type === 'Point' && radius > 0) {\n const center = geometry.getExtent().slice(0, 2);\n this.uncertaintySource.addFeature(new Feature(AdbMapUtils.createUncertaintyCircle(center, radius)));\n }\n }\n }\n this.pendingExtent = undefined;\n if (!fitView) return;\n\n const extent = geojson.bbox\n ? transformExtent(geojson.bbox, 'EPSG:4326', this.map.getView().getProjection())\n : extend(this.siteSource.getExtent(), this.uncertaintySource.getExtent());\n if (!isEmpty(extent)) {\n this.pendingExtent = extent;\n this.fitPendingExtent();\n }\n }\n\n private viewKey(): string {\n return [...this.map.getView().getCenter(), this.map.getView().getResolution()].join(',');\n }\n\n private fitPendingExtent(): void {\n const size = this.map.getSize();\n if (!this.pendingExtent || !size?.[0] || !size[1]) return;\n this.map.getView().fit(this.pendingExtent, { padding: [20, 20, 20, 20], maxZoom: 18 });\n this.fittedView = this.viewKey();\n this.pendingExtent = undefined;\n }\n\n private featureStyle(feature: FeatureLike): Style | Style[] {\n const props = feature.getProperties();\n if (['FilterArea.Area', 'FilterArea.OwnPolygon'].includes(props['FeatureType'])) {\n return new Style({\n stroke: new Stroke({ color: MapConstants.SEARCH_AREA_BORDER_COLOR, width: 2 }),\n fill: new Fill({ color: 'transparent' })\n });\n }\n const cluster = props['groupingType'] === 'pixelCluster' || props['isCluster'];\n const location = props['locations'] || props['location'];\n const point = ['Point', 'MultiPoint'].includes(feature.getGeometry()?.getType());\n if (cluster || location || point) {\n return this.activePresentationMode() === 'observations'\n ? this.aggregatedSymbol(feature) : this.locationSymbol(feature);\n }\n if (props['FeatureId']) return new Style({\n stroke: new Stroke({ color: '#005e67', width: 2 }), fill: new Fill({ color: 'rgba(0,118,129,0.1)' })\n });\n const level = this.gridLevels().find(level => props['ObservationsCount'] <= level.max);\n const color = level?.color ?? '#2FB3BB';\n return new Style({ stroke: new Stroke({ color: '#212529', width: 1 }), fill: new Fill({ color }) });\n }\n\n private locationSymbol(feature: FeatureLike): Style {\n return AdbMapUtils.locationSymbol(feature, feature === this.selectedFeature, feature === this.hoveredFeature);\n }\n\n private aggregatedSymbol(feature: FeatureLike): Style | Style[] {\n return AdbMapUtils.aggregatedSymbol(\n this.locationSymbol(feature), feature.get('presentation'), this.cutoffYear(), feature === this.selectedFeature,\n feature.getGeometry()?.getType()\n );\n }\n\n ngOnDestroy(): void {\n this.requestSubscription?.unsubscribe();\n this.resizeObserver?.disconnect();\n this.map?.dispose();\n }\n}\n","@if(error){\n<div class=\"d-flex align-items-baseline gap-2 p-2 mb-3\" role=\"alert\">\n <span class=\"bi bi-circle-fill text-danger\" aria-hidden=\"true\"></span>\n <span>{{'ERROR.SERVER_ERROR'|translate}}</span>\n</div>\n}\n<div [class.loading]=\"mapLoading()\">\n <div class=\"d-flex align-items-center justify-content-end flex-wrap gap-1 border p-1\" [class.d-none]=\"!showHeader()\">\n @if (!mapLoading() && mapResult()?.properties?.count != null) {\n <span class=\"me-auto\">{{mapResult().properties.count | adbSpacing}} {{'MAP.OBSERVATIONS' | translate}}</span>\n }\n <button type=\"button\" class=\"btn btn-sm btn-secondary\" [attr.aria-label]=\"'MAP.FULLSCREEN' | translate\" [title]=\"'MAP.FULLSCREEN' | translate\" [disabled]=\"settingsOpen()\">\n <span class=\"bi bi-fullscreen\" aria-hidden=\"true\"></span>\n </button>\n <button type=\"button\" class=\"btn btn-sm btn-secondary\" [attr.aria-label]=\"'MAP.EXPORT' | translate\" [title]=\"'MAP.EXPORT' | translate\" [disabled]=\"settingsOpen()\" (click)=\"onExport()\">\n <span class=\"bi bi-download\" aria-hidden=\"true\"></span>\n </button>\n <button #settingsButton type=\"button\" class=\"btn btn-sm btn-secondary\" [attr.aria-label]=\"'MAP.SETTINGS.TITLE' | translate\"\n [title]=\"'MAP.SETTINGS.TITLE' | translate\" [attr.aria-expanded]=\"settingsOpen()\" [attr.aria-controls]=\"mapId + '-settings'\"\n (click)=\"settingsOpen() ? cancelSettings(settingsButton) : openSettings()\">\n <span class=\"bi bi-gear\" aria-hidden=\"true\"></span>\n </button>\n </div>\n <div class=\"position-relative\">\n <div [id]=\"mapId\" tabindex=\"0\" class=\"border-start border-end adb-map\" [class.invisible]=\"settingsOpen()\" [attr.inert]=\"settingsOpen() ? '' : null\"></div>\n @if (locationOptions(); as options) {\n <adb-map-feature-picker [locationOptions]=\"options\" (featureChosen)=\"onFeatureChosen($event)\" (dismissed)=\"closeLocationPicker($event)\" />\n }\n @if (settingsOpen()) {\n <form [id]=\"mapId + '-settings'\" [formGroup]=\"settingsForm\" (ngSubmit)=\"saveSettings(settingsButton)\"\n class=\"form p-3 position-absolute top-0 start-0 w-100 h-100 overflow-auto m-0\"\n [class.loading]=\"savingSettings()\" [attr.aria-labelledby]=\"mapId + '-settings-title'\" [attr.aria-busy]=\"savingSettings()\"\n (keydown.escape)=\"cancelSettings(settingsButton); $event.stopPropagation()\">\n <h2 [id]=\"mapId + '-settings-title'\" class=\"h5\">{{'MAP.SETTINGS.TITLE' | translate}}</h2>\n <div class=\"form-check mb-3\">\n <input [id]=\"mapId + '-uncertain'\" type=\"checkbox\" formControlName=\"uncertain\" class=\"form-check-input\">\n <label [for]=\"mapId + '-uncertain'\" class=\"form-check-label\">{{'MAP.SETTINGS.UNCERTAINTY' | translate}}</label>\n </div>\n @if (allowPresentationMode()) {\n <div class=\"mb-3\">\n <label [for]=\"mapId + '-presentation-mode'\">{{'MAP.SETTINGS.PRESENTATION_MODE' | translate}}</label>\n <select [id]=\"mapId + '-presentation-mode'\" formControlName=\"presentationMode\" class=\"form-select\">\n <option value=\"locations\">{{'MAP.SETTINGS.LOCATIONS_MODE' | translate}}</option>\n <option value=\"observations\">{{'MAP.SETTINGS.OBSERVATIONS_MODE' | translate}}</option>\n </select>\n </div>\n @if (settingsForm.controls.presentationMode.value === 'observations') {\n <div class=\"mb-3\">\n <label [for]=\"mapId + '-cutoff'\">{{'MAP.SETTINGS.CUTOFF' | translate}}</label>\n <input [id]=\"mapId + '-cutoff'\" type=\"text\" inputmode=\"numeric\" formControlName=\"cutoff\" class=\"form-control\"\n [attr.aria-invalid]=\"settingsForm.controls.cutoff.invalid\" [attr.aria-describedby]=\"mapId + '-cutoff-error'\">\n @if (settingsForm.controls.cutoff.invalid) {\n <div [id]=\"mapId + '-cutoff-error'\" class=\"invalid-feedback\">{{'MAP.SETTINGS.INVALID_CUTOFF' | translate}}</div>\n }\n </div>\n }\n }\n @if (settingsError()) {\n <div class=\"d-flex align-items-baseline gap-2 p-2 mb-3\" role=\"alert\">\n <span class=\"bi bi-circle-fill text-danger\" aria-hidden=\"true\"></span>\n <span>{{'MAP.SETTINGS.SAVE_ERROR' | translate}}</span>\n </div>\n }\n <div class=\"d-flex justify-content-end gap-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"cancelSettings(settingsButton)\">{{'MAP.SETTINGS.CANCEL' | translate}}</button>\n <button type=\"submit\" class=\"btn btn-primary\" [disabled]=\"settingsForm.invalid || settingsForm.pristine\">{{'MAP.SETTINGS.SAVE' | translate}}</button>\n </div>\n </form>\n }\n </div>\n</div>\n@if (showLegend() && !settingsOpen()) {\n <adb-map-legend [result]=\"mapResult()\" [cutoffYear]=\"cutoffYear()\" [loading]=\"mapLoading()\"\n [showObservationStatus]=\"activePresentationMode() === 'observations'\" />\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, input, OnChanges, OnDestroy } from '@angular/core';\nimport Map from 'ol/Map.js';\nimport Feature from 'ol/Feature.js';\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport { Circle as CircleStyle, Fill, Stroke, Style } from 'ol/style.js';\nimport { extend, isEmpty } from 'ol/extent.js';\nimport type { Extent } from 'ol/extent.js';\nimport { AdbMapUtils } from './mapUtils';\nimport { MapConstants } from '../../constants';\n\n@Component({\n selector: 'adb-location-map',\n templateUrl: './adb-location-map.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class AdbLocationMapComponent implements AfterViewInit, OnChanges, OnDestroy {\n geoJson = input.required<any>();\n readonly mapId = 'location-map-' + Math.floor(Math.random() * Date.now());\n private map: Map;\n private resizeObserver: ResizeObserver;\n private pendingExtent: Extent = null;\n private source = new VectorSource();\n private uncertaintySource = new VectorSource();\n private format = new GeoJSON();\n\n ngAfterViewInit(): void {\n this.map = AdbMapUtils.createMap(this.mapId, { scrollZoom: false });\n this.map.addLayer(new VectorLayer({\n source: this.uncertaintySource,\n style: new Style({\n stroke: new Stroke({ color: MapConstants.UNCERTAINTY_BORDER_COLOR, width: 1 })\n })\n }));\n this.map.addLayer(new VectorLayer({\n source: this.source,\n style: new Style({\n image: new CircleStyle({\n radius: MapConstants.MARKER_RADIUS,\n fill: new Fill({ color: MapConstants.LOCATION_MARKER_BACKGROUND_COLOR }),\n stroke: new Stroke({ color: MapConstants.LOCATION_MARKER_BORDER_COLOR, width: 1 })\n }),\n stroke: new Stroke({ color: MapConstants.LOCATION_POLYGON_BORDER_COLOR, width: 2 }),\n fill: new Fill({ color: 'transparent' })\n })\n }));\n this.resizeObserver = new ResizeObserver(() => {\n this.map.updateSize();\n this.fitPendingExtent();\n });\n this.resizeObserver.observe(this.map.getTargetElement());\n this.renderMap();\n }\n\n ngOnChanges(): void {\n this.renderMap();\n }\n\n private renderMap(): void {\n if (!this.map) return;\n this.source.clear();\n this.uncertaintySource.clear();\n this.pendingExtent = null;\n const geo = this.geoJson();\n if (!geo) return;\n\n const features = this.format.readFeatures(geo, {\n featureProjection: this.map.getView().getProjection()\n });\n this.source.addFeatures(features);\n for (const feature of features) {\n const geometry = feature.getGeometry();\n const properties = feature.getProperties();\n const radius = properties['location']?.coordinateUncertaintyInMeters ??\n properties['locations']?.items?.[0]?.coordinateUncertaintyInMeters;\n if (geometry?.getType() === 'Point' && radius > 0) {\n const center = geometry.getExtent().slice(0, 2);\n this.uncertaintySource.addFeature(new Feature(AdbMapUtils.createUncertaintyCircle(center, radius)));\n }\n }\n const extent = extend(this.source.getExtent(), this.uncertaintySource.getExtent());\n if (!isEmpty(extent)) {\n this.pendingExtent = extent;\n this.fitPendingExtent();\n }\n }\n\n private fitPendingExtent(): void {\n const size = this.map.getSize();\n if (!this.pendingExtent || !size?.[0] || !size[1]) return;\n this.map.getView().fit(this.pendingExtent, { padding: [20, 20, 20, 20], maxZoom: 18 });\n this.pendingExtent = null;\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n this.map?.dispose();\n }\n}\n","<div [id]=\"mapId\" tabindex=\"0\" class=\"border adb-map\"></div>\n","import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ChangeDetectionStrategy, computed, input } from \"@angular/core\";\nimport { FormArray, FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, ParamMap, Params, Router } from \"@angular/router\";\nimport { addYears, endOfDay, endOfYear, parseISO, startOfDay, startOfYear } from \"date-fns\";\nimport { combineLatest, debounceTime, map, Subscription } from \"rxjs\";\nimport { AdbMapConfigService, AdbMapFilterType } from \"../config\";\nimport { HttpClient } from \"@angular/common/http\";\nimport { GeoJsonFeature } from \"../models\";\nimport { DateTypes } from \"../constants\";\n\n@Component({\n selector: 'adb-map-filters',\n templateUrl: 'map-filter.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class AdbMapFilters implements OnInit, OnDestroy {\n @Input() inline = false;\n readonly hiddenFilters = input<AdbMapFilterType[]>([]);\n readonly visibleFilters = computed(() => ({\n taxon: !this.hiddenFilters().includes('taxon'),\n time: !this.hiddenFilters().includes('time'),\n area: !this.hiddenFilters().includes('area'),\n ownArea: !this.hiddenFilters().includes('ownArea'),\n taxaLists: !this.hiddenFilters().includes('taxonLists'),\n datasources: !this.hiddenFilters().includes('datasources')\n }));\n static datasets = ['1', '3', '5', '6', '4', '8'];\n \n subscriptions = new Subscription();\n form: FormGroup;\n thisYear = new Date();\n lastYear = addYears(new Date(), -1);\n queryParamsMap: ParamMap;\n hasOwnArea: boolean;\n geo: GeoJsonFeature;\n area: { areaType: string; featureId: string; };\n areasArray: FormArray<any>;\n dataSetCount: number;\n taxonListCount: number;\n riskListCount: number;\n redListCount: number;\n areaCount: number;\n periodCount: number;\n listsError: any;\n taxaLists: any[];\n hasTaxonInUrlParameter: any;\n dsControls: any;\n dateStartConfig: { maxDate: Date; };\n dateEndConfig: { minDate: Date; maxDate: Date; };\n artfakta: string;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private config: AdbMapConfigService,\n private http: HttpClient,\n private router: Router,\n private activatedRoute: ActivatedRoute) {\n this.artfakta = this.config.artfaktaTaxonLists;\n }\n\n ngOnInit(): void {\n const lists$ = this.http.get<any[]>(this.config.taxaListsApi, { params: { limit: -1 } });\n const combined$ = combineLatest([this.activatedRoute.paramMap, this.activatedRoute.queryParamMap, lists$])\n .pipe(map(results => ({ params: results[0], qParams: results[1], lists: results[2] })), debounceTime(0));\n this.subscriptions.add(combined$.subscribe(result => {\n this.form = this.createForm(result.params, result.qParams, result.lists);\n this.cdr.markForCheck();\n }));\n }\n\n removeArea(index: number): void {\n (this.form.get('areas') as FormArray).removeAt(index);\n this.form.markAsDirty();\n }\n\n addArea(): void {\n const areas = this.form.get('areas') as FormArray;\n areas.push(new FormControl(null));\n this.form.updateValueAndValidity();\n this.form.markAsDirty();\n }\n\n onSubmit(): void {\n const data = this.form.value;\n let params = {} as any;\n params.p = data.period ?? null;\n if (data.period === DateTypes.THIS_YEAR) {\n params.startAt = startOfYear(this.thisYear).toISOString();\n params.endAt = null;\n } else if (data.period === DateTypes.LAST_YEAR) {\n params.startAt = startOfYear(this.lastYear).toISOString();\n params.endAt = endOfYear(this.lastYear).toISOString();\n } else if (data.period === DateTypes.ALL_YEAR) {\n params.startAt = null;\n params.endAt = null;\n params.p = null;\n } else if (data.period === DateTypes.LAST_5_YEAR) {\n params.startAt = startOfYear(addYears(new Date(), -5)).toISOString();\n params.endAt = null;\n } else if (data.period === DateTypes.LAST_25_YEAR) {\n params.startAt = startOfYear(addYears(new Date(), -25)).toISOString();\n params.endAt = null;\n } else if (data.period === DateTypes.CUSTOM) {\n params.startAt = startOfDay(data.startAt).toISOString();\n params.endAt = endOfDay(data.endAt).toISOString();\n }\n if (this.hasOwnArea && data.geo) {\n params.geo = JSON.stringify(data.geo.geometry?.coordinates[0]);\n }\n const cleaned = data.areas?.filter(v => v != null && v !== '');\n if (cleaned.length > 0) {\n params.area = cleaned;\n }\n if (this.activatedRoute.snapshot.paramMap.has('taxonId')) {\n params.taxonId = this.activatedRoute.snapshot.paramMap.get('taxonId')\n } else {\n params.taxonId = data.taxonId ?? null;\n }\n if (data.list?.length > 0) {\n params.list = data.list;\n }\n if (data.ds?.length > 0) {\n const selected = data.ds.filter(f => f.selected).map(m => m.id);\n params.ds = selected.length ? selected : null;\n }\n const locationIds = this.activatedRoute.snapshot.queryParamMap.getAll('locationId');\n if (locationIds.length) {\n params.locationId = locationIds;\n }\n this.router.navigate([], { queryParams: params, relativeTo: this.activatedRoute })\n }\n\n private createForm(params: Params, qMap: ParamMap, lists: any[]): FormGroup {\n this.hasTaxonInUrlParameter = params['taxonId'];\n this.hasOwnArea = qMap.has('geo') && this.visibleFilters().ownArea;\n const areas = qMap.getAll('area').filter(a => a != null && a.trim() !== '' && a.includes('-'));\n const form: FormGroup = new FormGroup({\n period: new FormControl(qMap.has('p') ? qMap.get('p') : '3'),\n areas: new FormArray(\n (Array.isArray(areas) && areas.length ? areas : [null]).map(a => new FormControl(a))\n ),\n geo: new FormControl(qMap.has('geo') ? {\n type: 'Feature',\n geometry: { type: 'Polygon', coordinates: [JSON.parse(qMap.get('geo'))] }\n } : null)\n });\n this.areasArray = form.get('areas') as FormArray;\n this.periodCount = qMap.has('p') && qMap.get('p') !== '3' ? 1 : 0;\n this.areaCount = areas.length + (this.hasOwnArea ? 1 : 0);\n if (!this.hasTaxonInUrlParameter) {\n form.addControl('taxonId', new FormControl(qMap.get('taxonId') ?? null));\n const selectedTaxonList = qMap.has('list') ? qMap.getAll('list').map(val => Number(val)).filter(val => !isNaN(val)) : null;\n this.taxaLists = lists;\n this.taxonListCount = selectedTaxonList?.length;\n form.addControl('list', new FormControl(selectedTaxonList))\n let datasets = qMap.has('ds') ? (Array.isArray(qMap.getAll('ds')) ? qMap.getAll('ds') : [qMap.get('ds')]) : null;\n this.dataSetCount = datasets?.length;\n form.addControl('ds', new FormArray(\n AdbMapFilters.datasets.map(id => new FormGroup({\n id: new FormControl(id),\n selected: new FormControl(datasets?.includes(id))\n }))\n ));\n this.dsControls = (form.get('ds') as FormArray).controls;\n }\n this.updateCustomDate(form, qMap.get('p'), qMap);\n this.subscriptions.add(form.get('period').valueChanges.subscribe(period => {\n this.updateCustomDate(form, period, qMap);\n }));\n return form;\n }\n\n private updateCustomDate(form: FormGroup, period: string, qMap: ParamMap): void {\n if (form.contains('startAt')) {\n form.removeControl('startAt');\n }\n if (form.contains('endAt')) {\n form.removeControl('endAt');\n }\n if (period === DateTypes.CUSTOM) {\n let start = qMap.has('startAt') ? parseISO(qMap.get('startAt')) : null;\n let end = qMap.has('endAt') ? parseISO(qMap.get('endAt')) : null;\n if (qMap.get('p') !== DateTypes.CUSTOM) {\n start = new Date();\n end = new Date();\n }\n this.dateStartConfig = { maxDate: end ?? new Date() };\n this.dateEndConfig = { minDate: start ?? null, maxDate: new Date() };\n const startControl = new FormControl(start, Validators.required);\n const endControl = new FormControl(end, Validators.required);\n form.addControl('startAt', startControl);\n form.addControl('endAt', endControl);\n this.subscriptions.add(\n startControl.valueChanges.subscribe(startAt => {\n this.dateEndConfig = { minDate: startAt ?? null, maxDate: new Date() };\n })\n );\n this.subscriptions.add(\n endControl.valueChanges.subscribe(endAt => {\n this.dateStartConfig = { maxDate: endAt ?? new Date() };\n })\n );\n }\n }\n\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n }\n}\n","@if(form){\n<form [formGroup]=\"form\" class=\"form mb-3\" (ngSubmit)=\"onSubmit()\">\n <div class=\"mb-3\">\n @if(visibleFilters().taxon){\n <adb-filter-section titleResource=\"TAXON.TAXA\" [expanded]=\"true\">\n @if(!hasTaxonInUrlParameter){\n <div class=\"mb-3\">\n <label for=\"species\">{{'TAXON.TAXON'|translate}}</label>\n <adb-taxon-picker formControlName=\"taxonId\" id=\"species\"></adb-taxon-picker>\n </div>\n }\n </adb-filter-section>\n }\n @if(visibleFilters().time){\n <adb-filter-section [count]=\"periodCount\" titleResource=\"OBSERVATION.PERIOD\">\n <div class=\"mb-1\">\n <select class=\"form-select\" formControlName=\"period\" id=\"period\">\n <option value=\"1\">{{thisYear|date:'yyyy'}}</option>\n <option value=\"2\">{{lastYear|date:'yyyy'}}</option>\n <option value=\"3\">{{'OBSERVATION.ALL_YEAR'|translate}}</option>\n <option value=\"4\">{{'OBSERVATION.LAST_5_YEAR'|translate}}</option>\n <option value=\"5\">{{'OBSERVATION.LAST_25_YEAR'|translate}}</option>\n <option value=\"6\">{{'OBSERVATION.CUSTOMIZED'|translate}}</option>\n </select>\n </div>\n @if (form.value?.period==='6') {\n <div class=\"mb-2\">\n <label for=\"startAt\">{{'FROM' |translate}}</label>\n <input adbDatepicker type=\"text\" class=\"form-control datepicker\" id=\"startAt\" formControlName=\"startAt\" [settings]=\"dateStartConfig\">\n </div>\n <div class=\"mb-2\">\n <label for=\"endAt\">{{'TO' |translate}}</label>\n <input adbDatepicker type=\"text\" class=\"form-control datepicker\" id=\"endAt\" formControlName=\"endAt\" [settings]=\"dateEndConfig\">\n </div>\n }\n </adb-filter-section>\n }\n @if(visibleFilters().area){\n <adb-filter-section [count]=\"areaCount\" titleResource=\"GEOGRAPHY\" [lazy]=\"true\">\n <ng-template>\n @if(visibleFilters().ownArea){\n <div role=\"tablist\" aria-label=\"{{'AREA'|translate}}\" class=\"d-flex gap-2 justify-content-end\">\n <button class=\"btn btn-link p-0\" [class.text-dark]=\"!hasOwnArea\" (click)=\"hasOwnArea=false\" role=\"tab\" id=\"tab-select\" aria-selected=\"{{!hasOwnArea}}\" aria-controls=\"panel-select\">\n {{'CHOOSE'|translate}}\n </button>\n <button class=\"btn btn-link p-0\" [class.text-dark]=\"hasOwnArea\" (click)=\"hasOwnArea=true\" role=\"tab\" id=\"tab-draw\" aria-selected=\"false\" aria-controls=\"panel-draw\">\n {{'OWN_AREA'|translate}}\n </button>\n </div>\n }\n <div class=\"mb-2\">\n @if(hasOwnArea&&visibleFilters().ownArea){\n <div class=\"pt-1\" role=\"tabpanel\" id=\"area-draw\" aria-labelledby=\"tab-draw\">\n <div>\n <adb-polygon-drawer formControlName=\"geo\"></adb-polygon-drawer>\n </div>\n </div>\n }@else{\n <div role=\"tabpanel\" id=\"area-select\" aria-labelledby=\"tab-select\">\n <div formArrayName=\"areas\">\n <div class=\"d-flex align-items-end mb-1\">\n <label>{{'AREAS'|translate}}</label>\n <button class=\"ms-auto text-dark btn btn-sm btn-secondary\" attr.aria-label=\"{{'OBSERVATION.ADD_AREA'|translate}}\" title=\"{{'OBSERVATION.ADD_AREA'|translate}}\" type=\"button\" (click)=\"addArea()\">\n <span class=\"bi bi-plus\"></span>\n </button>\n </div>\n @for (ctrl of areasArray.controls; track ctrl; let i = $index; let last = $last) {\n <div class=\"d-flex mb-2\">\n <adb-area-picker id=\"area-{{i}}\" [formControlName]=\"i\"></adb-area-picker>\n @if(areasArray.length>1){\n <button class=\"btn btn-secondary ms-1\" attr.aria-label=\"{{'DELETE'|translate}}\" title=\"{{'DELETE'|translate}}\" type=\"button\" (click)=\"removeArea(i)\">\n <span class=\"bi bi-trash\"></span>\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </ng-template>\n </adb-filter-section>\n }\n @if(form.get('taxonId')){\n @if(visibleFilters().taxaLists){\n <adb-filter-section [count]=\"taxonListCount\" titleResource=\"LISTS.NATURE_CONSERVATION_LISTS\">\n <div class=\"mb-3\">\n <app-treeview formControlName=\"list\" [nodes]=\"taxaLists\"></app-treeview>\n </div>\n {{'LISTS.READ_MORE'|translate}}\n <a [href]=\"artfakta\">{{'LISTS.LIST_CONTENT'|translate}}</a>\n </adb-filter-section>\n }\n @if(visibleFilters().datasources){\n <adb-filter-section [count]=\"dataSetCount\" titleResource=\"DATASET.DATASETS\">\n @if (form.get('ds')) {\n <div formArrayName=\"ds\">\n @for (item of dsControls; track item; let i = $index) {\n <div [formGroupName]=\"i\" class=\"form-check\">\n <input type=\"checkbox\" formControlName=\"selected\" [id]=\"'ds-' + item.value.id\" class=\"form-check-input\">\n <label [for]=\"'ds-' + item.value.id\" class=\"form-check-label\">{{ 'PROVIDERS.'+item.value.id |translate }}</label>\n </div>\n }\n </div>\n }\n </adb-filter-section>\n }\n }\n </div>\n <div class=\"d-flex justify-content-end gap-2\">\n @if (inline) {\n <a class=\"btn btn-secondary\" [routerLink]=\"[]\">\n {{'CANCEL'|translate}}\n </a>\n }\n <a [routerLink]=\"[]\" class=\"btn btn-secondary\" [queryParams]=\"null\">\n {{'CLEAR'|translate}}\n </a>\n <button type=\"submit\" class=\"btn btn-primary\" [disabled]=\"form.invalid||form.pristine\">{{'FILTER'|translate}}</button>\n </div>\n</form>\n}\n","import { CommonModule } from \"@angular/common\";\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { PolygonDrawerInput } from \"./components/map/polygon-drawer.component\";\nimport { RouterModule } from \"@angular/router\";\nimport { ADB_MAP_CONFIG, AdbMapConfig, AdbMapConfigService } from \"./config\";\nimport { TreeviewComponent } from \"./components/treeview\";\nimport { AdbMapComponent } from \"./components/map/adb-map\";\nimport { AdbLocationMapComponent } from \"./components/map/adb-location-map\";\nimport { AdbMapFilters } from \"./components/map-filter\";\nimport { AdbButtonsModule, AdbDirectivesModule, AdbDatePickerModule } from 'adb-shared';\nimport { AdbPipesModule } from 'adb-shared';\nimport { AdbFilterSectionModule } from 'adb-shared';\nimport { AdbPickerModule } from 'adb-shared';\nimport { TranslatePipe } from \"@ngx-translate/core\";\nimport { MapFeaturePickerComponent } from \"./components/map/map-feature-picker\";\nimport { MapLegendComponent } from \"./components/map/legend\";\n\n@NgModule({\n imports: [\n CommonModule,\n AdbButtonsModule,\n AdbDirectivesModule,\n FormsModule,\n RouterModule,\n ReactiveFormsModule,\n AdbDatePickerModule,\n AdbPipesModule,\n AdbFilterSectionModule,\n AdbPickerModule,\n TranslatePipe\n ],\n declarations: [\n AdbLocationMapComponent,\n MapFeaturePickerComponent,\n MapLegendComponent,\n AdbMapComponent,\n PolygonDrawerInput,\n AdbMapFilters,\n TreeviewComponent,\n // Stats,\n // AdbGeojsonPolygonDirective\n ],\n exports: [\n AdbLocationMapComponent,\n AdbMapComponent,\n PolygonDrawerInput,\n AdbMapFilters,\n // Stats,\n // AdbGeojsonPolygonDirective\n ],\n providers: [\n AdbMapConfigService\n ]\n})\nexport class AdbMapModule {\n static forRoot(config?: AdbMapConfig): ModuleWithProviders<AdbMapModule> {\n return {\n ngModule: AdbMapModule,\n providers: [\n {\n provide: ADB_MAP_CONFIG,\n useValue: config\n }\n ]\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAa,YAAY;CACvB,WAAW;CACX,WAAW;CACX,UAAU;CACV,aAAa;CACb,cAAc;CACd,QAAQ;AACT;AAED,MAAa,eAAe;CAC1B,0BAA0B;CAC1B,kCAAkC;CAClC,8BAA8B;CAC9B,qCAAqC;CACrC,iCAAiC;CACjC,6BAA6B;CAC7B,8BAA8B;CAC9B,+BAA+B;CAC/B,kCAAkC;CAClC,sCAAsC;CACtC,gBAAgB;CAChB,0BAA0B;CAC1B,0BAA0B;CAC1B,yBAAyB;CACzB,0BAA0B;CAC1B,eAAe;CACf,uBAAuB;CACvB,cAAc;AACf;ACXD,IAAa,cAAb,MAAa,YAAW;CACpB,OAAO,eAAe,SAAsB,WAAW,OAAO,UAAU,OAAK;EACzE,MAAM,QAAQ,QAAQ,cAAa;EACnC,MAAM,UAAU,MAAM,oBAAoB,kBAAkB,MAAM;EAClE,MAAM,QAAQ,CAAC,SAAS,YAAY,CAAC,CAAC,SAAS,QAAQ,YAAW,CAAE,EAAE,QAAO,CAAE;EAC/E,MAAM,OAAO,SAAS,CAAC,WAAW,MAAM,wBAAwB,MAC3D,MAAM,YAAY,EAAE,UAAU,KAAK,CAAC,CAAC,MAAM,eAC1C,IAAI,KAAK;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,MAAM,IAAI,KAAK,EAAE,OAAO,OAAM,CAAE;GAChC,QAAQ,IA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ACA;IACA;GAGD;GACD,SAAS;IACP;IACA;IACA;IACA;GAGD;GACD,WAAW,CACT,mBACD;EACF,CAAA"}
1
+ {"version":3,"file":"adb-shared-map.mjs","names":["CircleStyle","controls","interactions","Circle","i1","i1","i1","i2","i1","i2","i2.AdbMapConfigService","i4.MapFeaturePickerComponent","i5.MapLegendComponent","i6","i7","CircleStyle","i1.AdbMapConfigService","i3","i4","i5","i6.PolygonDrawerInput","i7.TreeviewComponent","i8","i9"],"sources":["../../../projects/adb-shared/map/src/constants.ts","../../../projects/adb-shared/map/src/components/map/mapUtils.ts","../../../projects/adb-shared/map/src/components/map/polygon-drawer.component.ts","../../../projects/adb-shared/map/src/components/map/polygon-drawer.component.html","../../../projects/adb-shared/map/src/config.ts","../../../projects/adb-shared/map/src/components/treeview.ts","../../../projects/adb-shared/map/src/components/treeview.html","../../../projects/adb-shared/map/src/data-source.ts","../../../projects/adb-shared/map/src/components/map/map-feature-picker.ts","../../../projects/adb-shared/map/src/components/map/map-feature-picker.html","../../../projects/adb-shared/map/src/components/map/legend.ts","../../../projects/adb-shared/map/src/components/map/legend.html","../../../projects/adb-shared/map/src/components/map/adb-map.ts","../../../projects/adb-shared/map/src/components/map/adb-map.html","../../../projects/adb-shared/map/src/components/map/adb-location-map.ts","../../../projects/adb-shared/map/src/components/map/adb-location-map.html","../../../projects/adb-shared/map/src/components/map-filter.ts","../../../projects/adb-shared/map/src/components/map-filter.html","../../../projects/adb-shared/map/src/adb-map.module.ts"],"sourcesContent":["export const DateTypes = {\n THIS_YEAR: '1',\n LAST_YEAR: '2',\n ALL_YEAR: '3',\n LAST_5_YEAR: '4',\n LAST_25_YEAR: '5',\n CUSTOM: '6',\n}\n\nexport const MapConstants = {\n INITIAL_METERS_PER_PIXEL: 200,\n LOCATION_MARKER_BACKGROUND_COLOR: '#f3db60',\n LOCATION_MARKER_BORDER_COLOR: '#665500',\n OBSERVATION_MARKER_BACKGROUND_COLOR: '#007c91',\n CLUSTER_MARKER_BACKGROUND_COLOR: '#1e90ff',\n CLUSTER_MARKER_BORDER_COLOR: '#000',\n SELECTED_MARKER_BORDER_COLOR: '#000',\n LOCATION_POLYGON_BORDER_COLOR: '#005e67',\n GENERALIZED_POLYGON_BORDER_COLOR: '#b3261e',\n GENERALIZED_POLYGON_BACKGROUND_COLOR: 'rgba(179, 38, 30, 0.15)',\n SELECTED_COLOR: '#ff00ff',\n UNCERTAINTY_BORDER_COLOR: '#777',\n SEARCH_AREA_BORDER_COLOR: '#1e90ff',\n AFTER_CUTOFF_YEAR_COLOR: '#3366cc',\n BEFORE_CUTOFF_YEAR_COLOR: '#8a3fd0',\n MARKER_RADIUS: 6,\n CLUSTER_MARKER_RADIUS: 8,\n HOVER_RADIUS: 10\n}\n","import { GeoJson, MapOptions } from \"../../models\";\nimport Map from 'ol/Map.js';\nimport type { FeatureLike } from 'ol/Feature.js';\nimport View from 'ol/View.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport TileWMS from 'ol/source/TileWMS.js';\nimport XYZ from 'ol/source/XYZ.js';\nimport Control from 'ol/control/Control.js';\nimport ScaleLine from 'ol/control/ScaleLine.js';\nimport { defaults as controls } from 'ol/control/defaults.js';\nimport { defaults as interactions } from 'ol/interaction/defaults.js';\nimport { fromLonLat, toLonLat } from 'ol/proj.js';\nimport CircleGeometry from 'ol/geom/Circle.js';\nimport { getDistance } from 'ol/sphere.js';\nimport { Circle as CircleStyle, Fill, Stroke, Style, RegularShape, Text } from 'ol/style.js';\nimport { MapConstants } from '../../constants';\n\nexport class AdbMapUtils {\n static locationSymbol(feature: FeatureLike, selected = false, hovered = false): Style {\n const props = feature.getProperties();\n const cluster = props['groupingType'] === 'pixelCluster' || props['isCluster'];\n const point = ['Point', 'MultiPoint'].includes(feature.getGeometry()?.getType());\n const text = point && !cluster && props['observationCount'] === 1 &&\n (props['locations']?.count === 1 || !!props['location'])\n ? new Text({\n text: '1',\n offsetY: 2,\n font: 'bold 10px sans-serif',\n fill: new Fill({ color: '#000' }),\n stroke: new Stroke({ color: '#fff', width: 2 })\n }) : null;\n if (selected) {\n return new Style({\n text,\n image: new CircleStyle({\n radius: hovered ? MapConstants.HOVER_RADIUS\n : cluster ? MapConstants.CLUSTER_MARKER_RADIUS : MapConstants.MARKER_RADIUS,\n fill: new Fill({ color: MapConstants.SELECTED_COLOR }),\n stroke: new Stroke({ color: MapConstants.SELECTED_MARKER_BORDER_COLOR, width: 2 })\n }),\n stroke: new Stroke({ color: MapConstants.SELECTED_COLOR, width: 3 }),\n fill: new Fill({ color: 'transparent' })\n });\n }\n if (point) {\n return new Style({\n text,\n image: new CircleStyle({\n radius: hovered ? MapConstants.HOVER_RADIUS\n : cluster ? MapConstants.CLUSTER_MARKER_RADIUS : MapConstants.MARKER_RADIUS,\n fill: new Fill({ color: cluster ? MapConstants.CLUSTER_MARKER_BACKGROUND_COLOR : MapConstants.LOCATION_MARKER_BACKGROUND_COLOR }),\n stroke: new Stroke({ color: cluster ? MapConstants.CLUSTER_MARKER_BORDER_COLOR : MapConstants.LOCATION_MARKER_BORDER_COLOR, width: cluster ? 2 : 1 })\n })\n });\n }\n return new Style({\n fill: new Fill({ color: 'transparent' }),\n stroke: new Stroke({\n color: MapConstants.LOCATION_POLYGON_BORDER_COLOR,\n width: hovered ? 4 : 2\n })\n });\n }\n\n\n static isNotRecovered(presentation: any): boolean {\n return presentation?.status === 'NotRecovered';\n }\n\n static aggregatedSymbol(style: Style, presentation: any, cutoffYear: string, selected: boolean, geometryType: string = null): Style | Style[] {\n if (!selected && presentation?.generalized && ['Polygon', 'MultiPolygon'].includes(geometryType)) {\n style.setStroke(new Stroke({\n color: MapConstants.GENERALIZED_POLYGON_BORDER_COLOR,\n width: style.getStroke().getWidth()\n }));\n style.setFill(new Fill({ color: MapConstants.GENERALIZED_POLYGON_BACKGROUND_COLOR }));\n return style;\n }\n let symbol: Style | Style[] = style;\n const notRecovered = this.isNotRecovered(presentation);\n const notPresent = presentation?.status === 'NotPresent';\n if (notRecovered || notPresent) {\n style.setText(null);\n symbol = [style, new Style({\n image: new RegularShape({\n points: notRecovered ? 4 : 2,\n radius: 5,\n radius2: 0,\n angle: notRecovered ? Math.PI / 4 : Math.PI / 2,\n stroke: new Stroke({ color: '#000', width: 1.5, lineJoin: 'round' })\n })\n })];\n }\n if (selected || !cutoffYear) return symbol;\n const status = presentation?.cutoffYearStatus;\n if (status !== 'Until' && status !== 'After') return symbol;\n\n const before = status === 'Until';\n const color = before ? MapConstants.BEFORE_CUTOFF_YEAR_COLOR : MapConstants.AFTER_CUTOFF_YEAR_COLOR;\n const image = style.getImage();\n if (image instanceof CircleStyle) {\n image.setFill(before ? null : new Fill({ color }));\n image.setStroke(new Stroke({ color: before ? color : '#000',\n width: before ? 2 : image.getStroke().getWidth() }));\n } else {\n style.setStroke(new Stroke({ color, width: style.getStroke().getWidth() }));\n }\n return symbol;\n }\n\n static createUncertaintyCircle(center: number[], radius: number): CircleGeometry {\n const latitude = toLonLat(center)[1];\n return new CircleGeometry(center, radius / Math.cos(latitude * Math.PI / 180));\n }\n\n static readonly INITIAL_METERS_PER_PIXEL = 500;\n static readonly INITIAL_CENTER_LAT = 62;\n static readonly INITIAL_CENTER_LNG = 17;\n\n static gridLevels(result: GeoJson) {\n const counts = (result?.features ?? []).map(feature => feature.properties?.ObservationsCount)\n .filter(count => typeof count === 'number');\n if (!counts.length) return [];\n const max = Math.max(...counts);\n const first = Math.ceil(max / 3);\n const second = Math.ceil(2 * max / 3);\n return [\n { min: max === 0 ? 0 : 1, max: first, color: '#2fb3bb' },\n { min: first + 1, max: second, color: '#005e67' },\n { min: second + 1, max, color: '#00393d' }\n ].filter(level => level.min <= level.max);\n }\n\n static getMetersPerPixel(bbox: string, mapWidth: number): number {\n if (bbox && mapWidth > 0) {\n const [minLon, minLat, maxLon, maxLat] = bbox.split(',').map(Number);\n const centerLat = (minLat + maxLat) / 2;\n const widthMeters = getDistance([minLon, centerLat], [maxLon, centerLat]);\n return widthMeters / mapWidth;\n }\n return AdbMapUtils.INITIAL_METERS_PER_PIXEL;\n }\n\n static OverlayMaps = {\n 'Altitude': AdbMapUtils.wms(\"https://maps.sgu.se/lmv/hojdmodell/v1.1?SERVICE=WMS\",\n { layers: \"terrangskuggning\", format: \"image/png\", transparent: true, opacity: 0.3, maxZoom: 16, version: \"1.3.0\" }),\n 'Fjällkarta': AdbMapUtils.wms(\n 'api/maps/mountain',\n {\n minZoom: 6,\n maxZoom: 18,\n maxNativeZoom: 14,\n attribution: '© <a href=\"https://www.lantmateriet.se/\">Fjällkart</a>',\n wms: true\n }),\n 'Kommuner': AdbMapUtils.wms(\n 'https://sosgeo.artdata.slu.se/geoserver/GeoRegion/wms?',\n {\n layers: 'GeoRegion:Municipality',\n version: '1.1.0',\n transparent: true,\n format: 'image/png'\n }\n ),\n 'Län': AdbMapUtils.wms(\n 'https://sosgeo.artdata.slu.se/geoserver/GeoRegion/wms?',\n {\n layers: 'GeoRegion:County',\n version: '1.1.0',\n transparent: true,\n format: 'image/png'\n }\n )\n , 'Ortnamn': AdbMapUtils.wms(\n \"https://maps.sgu.se/lmv/topowebb-skikt/v1.1?SERVICE=WMS\",\n {\n layers: \"text\",\n format: \"image/png\",\n transparent: true,\n version: \"1.3.0\",\n }\n ),\n 'Ekonomisk zon': AdbMapUtils.wms(\n \"https://sosgeo.artdata.slu.se/geoserver/it.geosolutions/wms?\",\n {\n layers: \"it.geosolutions:Ekonomiska_zonens_yttre_avgränsningslinjer_linje\",\n format: \"image/png\",\n transparent: true,\n version: \"1.1.0\"\n }\n )\n };\n\n static Providers: MapProvider[] = [\n {\n name: 'Open Streetmap',\n id: 3,\n url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n minZoom: 0,\n maxZoom: 18,\n params: {\n maxNativeZoom: 18,\n attribution: '© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'\n },\n wms: false\n },\n {\n name: 'Sveriges gränser',\n id: 7,\n url: 'https://sosgeo.artdata.slu.se/geoserver/it.geosolutions/wms',\n minZoom: 6,\n maxZoom: 18,\n params: {\n maxNativeZoom: 14,\n attribution: '© <a href=\"https://www.lantmateriet.se/\">Sveriges gränser</a>',\n layers: 'it.geosolutions:Sverige_epsg5845', styles: 'municipality_name_yellow',\n epsg: 5845\n },\n wms: true\n }\n ]\n\n private static wms(url: string, options: any): TileLayer<TileWMS> {\n const { opacity = 1, attribution, minZoom, maxZoom, maxNativeZoom, epsg, wms, ...parameters } = options;\n const params = Object.fromEntries(Object.entries(parameters).map(([key, value]) => [key.toUpperCase(), value]));\n return new TileLayer({\n opacity, minZoom, maxZoom,\n source: new TileWMS({ url, params, attributions: attribution })\n });\n }\n\n static createMap(elementId: string, options: MapOptions = {}): Map {\n const map = new Map({\n target: elementId,\n view: new View({ center: fromLonLat([AdbMapUtils.INITIAL_CENTER_LNG, AdbMapUtils.INITIAL_CENTER_LAT]), zoom: 5, minZoom: 0, maxZoom: 20 }),\n controls: controls({ zoom: options.zoom ?? true }).extend([new ScaleLine()]),\n interactions: interactions({\n mouseWheelZoom: options.scrollZoom ?? true,\n dragPan: options.zoom ?? true\n })\n });\n if (options.providers !== false) this.addProviders(map);\n return map;\n }\n\n private static addProviders(map: Map): void {\n const element = document.createElement('details');\n element.className = 'ol-control adb-map-layers';\n const summary = document.createElement('summary');\n summary.textContent = 'Kartlager';\n element.append(summary);\n const backgrounds = this.Providers.map(provider => {\n const layer = provider.wms\n ? this.wms(provider.url, provider.params)\n : new TileLayer({ source: new XYZ({\n url: provider.url.replace('{s}', '{a-c}'),\n attributions: provider.params.attribution,\n maxZoom: provider.params.maxNativeZoom\n }) });\n return { name: provider.name, layer };\n });\n // Each map needs its own layers and sources.\n const overlays = Object.entries(this.OverlayMaps).map(([name, original]) => ({\n name,\n layer: new TileLayer({\n source: new TileWMS({ url: original.getSource().getUrls()[0], params: original.getSource().getParams(),\n attributions: original.getSource().getAttributions() }),\n opacity: original.getOpacity(), minZoom: original.getMinZoom(), maxZoom: original.getMaxZoom()\n })\n }));\n for (const [index, entry] of [...backgrounds, ...overlays].entries()) {\n const background = index < backgrounds.length;\n entry.layer.setVisible(index === 0);\n map.addLayer(entry.layer);\n const label = document.createElement('label');\n const input = document.createElement('input');\n input.type = background ? 'radio' : 'checkbox';\n input.name = `background-${map.getTarget()}`;\n input.checked = entry.layer.getVisible();\n input.addEventListener('change', () => {\n if (background) backgrounds.forEach(item => item.layer.setVisible(item === entry));\n else entry.layer.setVisible(input.checked);\n });\n label.append(input, document.createTextNode(entry.name));\n element.append(label);\n if (index === 0) element.append(document.createElement('hr'));\n }\n map.addControl(new Control({ element }));\n }\n\n static createFile(source: Blob, fileName = 'map-download'): boolean {\n const link = document.createElement('a');\n link.href = URL.createObjectURL(source);\n link.download = fileName;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(link.href);\n return true;\n }\n}\n\ninterface MapProvider {\n name: string;\n id: number;\n url: string;\n minZoom: number;\n maxZoom: number;\n wms: boolean;\n params?: any;\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, forwardRef, OnDestroy } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport Map from 'ol/Map.js';\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport Draw from 'ol/interaction/Draw.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport Circle from 'ol/geom/Circle.js';\nimport { circular } from 'ol/geom/Polygon.js';\nimport { fromLonLat, toLonLat } from 'ol/proj.js';\nimport { getDistance } from 'ol/sphere.js';\nimport { AdbMapUtils } from './mapUtils';\n\n@Component({\n selector: 'adb-polygon-drawer',\n templateUrl: 'polygon-drawer.component.html',\n standalone: false,\n changeDetection: ChangeDetectionStrategy.Eager,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => PolygonDrawerInput), multi: true }]\n})\nexport class PolygonDrawerInput implements ControlValueAccessor, AfterViewInit, OnDestroy {\n mapId = 'draw-' + Math.floor(Math.random() * Date.now());\n map: Map;\n polygonDraw = false;\n disabled = false;\n shapeLayer = false;\n private source = new VectorSource();\n private format = new GeoJSON();\n private draw: Draw;\n private geoJson: any;\n private resizeObserver: ResizeObserver;\n private pendingFit = false;\n private onChange = (value: any) => {};\n private onTouched = () => {};\n\n ngAfterViewInit(): void {\n this.map = AdbMapUtils.createMap(this.mapId, { zoom: true, scrollZoom: true, providers: true });\n this.map.addLayer(new VectorLayer({ source: this.source }));\n this.resizeObserver = new ResizeObserver(() => {\n this.map.updateSize();\n this.fitShape();\n });\n this.resizeObserver.observe(this.map.getTargetElement());\n this.renderValue();\n }\n\n onDrawPolygon(): void { this.startDraw('Polygon'); }\n onDrawCircle(): void { this.startDraw('Circle'); }\n\n private startDraw(type: 'Polygon' | 'Circle'): void {\n if (this.disabled) return;\n this.stopDraw();\n this.polygonDraw = true;\n this.draw = new Draw({ source: this.source, type });\n this.map.addInteraction(this.draw);\n this.draw.on('drawend', event => {\n this.source.clear();\n const geometry = event.feature.getGeometry();\n const options = { featureProjection: this.map.getView().getProjection() };\n let geo;\n if (geometry instanceof Circle) {\n const center = toLonLat(geometry.getCenter());\n const edge = toLonLat([geometry.getCenter()[0] + geometry.getRadius(), geometry.getCenter()[1]]);\n const radius = Math.ceil(getDistance(center, edge));\n geo = { type: 'Feature', geometry: this.format.writeGeometryObject(circular(center, radius, 64)),\n properties: { radius } };\n } else geo = this.format.writeFeatureObject(event.feature, options);\n this.geoJson = geo;\n this.shapeLayer = true;\n this.onChange(geo);\n this.onTouched();\n this.stopDraw();\n });\n }\n\n private stopDraw(): void {\n if (this.draw) this.map.removeInteraction(this.draw);\n this.draw = undefined;\n this.polygonDraw = false;\n }\n\n onUndoStep(): void { this.draw?.removeLastPoint(); }\n\n onDeleteShape(): void {\n if (this.disabled) return;\n this.stopDraw();\n this.source.clear();\n this.pendingFit = false;\n this.shapeLayer = false;\n this.geoJson = null;\n this.onChange(null);\n this.onTouched();\n this.map.getView().setCenter(fromLonLat([AdbMapUtils.INITIAL_CENTER_LNG, AdbMapUtils.INITIAL_CENTER_LAT]));\n this.map.getView().setZoom(5);\n }\n\n private renderValue(): void {\n if (!this.map) return;\n this.source.clear();\n this.pendingFit = false;\n this.shapeLayer = false;\n if (this.geoJson?.type !== 'Feature') return;\n const feature = this.format.readFeatures(this.geoJson, { featureProjection: this.map.getView().getProjection() })[0];\n if (this.geoJson.geometry.type === 'Point' && this.geoJson.properties?.radius) {\n const latitude = this.geoJson.geometry.coordinates[1];\n feature.setGeometry(new Circle(fromLonLat(this.geoJson.geometry.coordinates),\n this.geoJson.properties.radius / Math.cos(latitude * Math.PI / 180)));\n }\n this.source.addFeature(feature);\n this.shapeLayer = true;\n this.pendingFit = true;\n this.fitShape();\n }\n\n private fitShape(): void {\n const size = this.map.getSize();\n if (!this.pendingFit || !size?.[0] || !size[1]) return;\n this.map.getView().fit(this.source.getExtent(), { padding: [20, 20, 20, 20], maxZoom: 18 });\n this.pendingFit = false;\n }\n\n writeValue(value: any): void { this.geoJson = value; this.renderValue(); }\n registerOnChange(fn: (value: any) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n if (disabled && this.map) this.stopDraw();\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n this.map?.dispose();\n }\n}\n","<div class=\"mb-1 d-flex gap-1 flex-wrap align-items-start\">\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled || shapeLayer\" (click)=\"onDrawPolygon()\" title=\"Polygon\">\n <span class=\"bi bi-pentagon\"></span> {{'OBSERVATION.DRAW'|translate}}\n </button>\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled || shapeLayer\" (click)=\"onDrawCircle()\" title=\"Circle\">\n <span class=\"bi bi-circle\"></span> {{'OBSERVATION.DRAW_CIRCLE'|translate}}\n </button>\n @if (shapeLayer) {\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled\" (click)=\"onDeleteShape()\" title=\"Ta bort\">\n <span class=\"bi bi-x\"></span>\n </button>\n }\n @if (polygonDraw) {\n <button class=\"btn btn-secondary\" type=\"button\" [disabled]=\"disabled\" (click)=\"onUndoStep()\" title=\"Ångra\">\n <span class=\"bi bi-arrow-counterclockwise\"></span>\n </button>\n }\n</div>\n<div [id]=\"mapId\" class=\"border\" style=\"height:20rem\"></div>","import { Inject, Injectable } from \"@angular/core\";\nimport { InjectionToken } from \"@angular/core\";\nexport interface AdbMapConfig {\n api: string,\n artfaktaTaxonLists: string,\n dynamic?: boolean;\n enableClusterSelection?: boolean;\n dataProviderIds?: readonly number[];\n}\n\nexport type AdbMapFilterType =\n | 'taxon'\n | 'area'\n | 'ownArea'\n | 'time'\n | 'redlist'\n | 'risklist'\n | 'taxonLists'\n | 'datasources';\n\nexport const ADB_MAP_CONFIG = new InjectionToken<AdbMapConfig>('ADB_MAP_CONFIG');\n\n@Injectable()\nexport class AdbMapConfigService {\n readonly artfaktaTaxonLists: string;\n readonly observationFeatures: string;\n readonly taxaListsApi: string;\n readonly dynamic: boolean;\n readonly enableClusterSelection: boolean;\n readonly dataProviderIds: readonly number[] | undefined;\n\n constructor(@Inject(ADB_MAP_CONFIG) config: AdbMapConfig) {\n this.dynamic = config.dynamic ?? false;\n this.dataProviderIds = config.dataProviderIds === undefined\n ? undefined : Object.freeze([...config.dataProviderIds]);\n this.enableClusterSelection = config.enableClusterSelection ?? false;\n this.artfaktaTaxonLists = config.artfaktaTaxonLists ?? 'https://artfakta.se/metadata/listor';\n this.taxaListsApi = config.api + '/taxalists';\n this.observationFeatures = config.api + '/observation-features';\n }\n}\n","import { Component, Input, forwardRef, ChangeDetectionStrategy } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'app-treeview',\n templateUrl: './treeview.html',\n standalone:false,\n changeDetection: ChangeDetectionStrategy.Eager,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TreeviewComponent),\n multi: true\n }\n ]\n})\nexport class TreeviewComponent implements ControlValueAccessor {\n @Input() nodes: ListItem[] = [];\n\n private selectedIds: number[] = [];\n private onChange: (value: number[]) => void = () => {};\n private onTouched: () => void = () => {};\n\n writeValue(ids: number[] | null): void {\n this.selectedIds = ids ?? [];\n this.applySelection(this.nodes);\n }\n\n registerOnChange(fn: (value: number[]) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.setReadOnly(this.nodes, isDisabled);\n }\n\n onLeafToggle(node: ListItem): void {\n if (node._readOnly) return;\n\n node._selected = !node._selected;\n\n this.selectedIds = TreeviewComponent.collectSelectedLeafIds(this.nodes);\n this.onChange(this.selectedIds);\n this.onTouched();\n }\n\n private applySelection(nodes: ListItem[]): void {\n for (const node of nodes) {\n if (node.children?.length) {\n this.applySelection(node.children);\n } else {\n node._selected = this.selectedIds.includes(node.id);\n }\n }\n }\n\n private setReadOnly(nodes: ListItem[], readOnly: boolean): void {\n for (const node of nodes) {\n node._readOnly = readOnly;\n if (node.children?.length) {\n this.setReadOnly(node.children, readOnly);\n }\n }\n }\n\n private static collectSelectedLeafIds(nodes: ListItem[]): number[] {\n const ids: number[] = [];\n\n for (const node of nodes) {\n if (node.children?.length) {\n ids.push(...this.collectSelectedLeafIds(node.children));\n } else if (node._selected) {\n ids.push(node.id);\n }\n }\n\n return ids;\n }\n}\n\n interface ListItem {\n id: number;\n name?: string;\n children?: ListItem[];\n\n _selected?: boolean;\n _readOnly?: boolean;\n}\n\n","<ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: nodes }\">\n</ng-container>\n<ng-template #nodeTpl let-nodes>\n @for (node of nodes; track node) {\n <div class=\"ms-3\">\n @if(!node.children || node.children.length === 0){\n <div class=\"d-flex align-items-center gap-2\">\n <input id=\"{{node.id}}\" type=\"checkbox\" class=\"form-check-input m-0\" [checked]=\"node._selected\" [disabled]=\"node._readOnly\" (change)=\"onLeafToggle(node)\" />\n <label for=\"{{node.id}}\">{{ node.name }}</label>\n </div>\n }\n @else {\n {{ node.name }}\n <div>\n <ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: node.children }\">\n </ng-container>\n </div>\n }\n </div>\n}\n</ng-template>","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable, InjectionToken } from '@angular/core';\nimport { Params } from '@angular/router';\nimport { map, Observable } from 'rxjs';\nimport { GeoJson } from './models';\n\nexport interface AdbMapRequest {\n url: string;\n params: Params;\n metersPerPixel: number;\n dataProviderIds?: readonly number[];\n}\n\nexport interface AdbMapDataSource {\n load(request: AdbMapRequest): Observable<GeoJson>;\n}\n\ninterface BffMapResponse {\n geoJson: GeoJson;\n observationsTotalCount?: number | null;\n}\n\n/** Default transport for the shared BFF observation-features contract. */\n@Injectable({ providedIn: 'root' })\nexport class AdbBffMapDataSource implements AdbMapDataSource {\n private readonly http = inject(HttpClient);\n\n load(request: AdbMapRequest): Observable<GeoJson> {\n const params = { ...request.params, mpp: request.metersPerPixel };\n const array = (value: unknown): unknown[] => value == null ? [] : Array.isArray(value) ? value : [value];\n // The router uses ds/rc/rlc; the BFF uses source and a shared list filter.\n const sources = request.dataProviderIds?.length ? [...request.dataProviderIds] : params['ds'] ?? params['source'];\n if (sources != null) params['source'] = sources;\n const lists = [...array(params['list']), ...array(params['rc']), ...array(params['rlc']),\n ...(params['eu'] ? [5] : [])];\n if (lists.length) params['list'] = lists;\n for (const key of ['ds', 'rc', 'rlc', 'eu', 'presentationMode']) delete params[key];\n for (const key of Object.keys(params)) if (params[key] == null) delete params[key];\n\n return this.http.get<BffMapResponse>(request.url, { params }).pipe(map(response => {\n const geoJson = response?.geoJson;\n if (!geoJson || geoJson.type !== 'FeatureCollection') throw new Error('Invalid BFF GeoJSON response');\n return {\n ...geoJson,\n properties: {\n ...geoJson.properties,\n count: response.observationsTotalCount ?? geoJson.properties?.count\n }\n };\n }));\n }\n}\n\n/** Applications normally use the default BFF source without overriding this token. */\nexport const ADB_MAP_DATA_SOURCE = new InjectionToken<AdbMapDataSource>('ADB_MAP_DATA_SOURCE', {\n providedIn: 'root',\n factory: () => inject(AdbBffMapDataSource)\n});\n","import { afterRenderEffect, Component, computed, effect, ElementRef, inject, input, output, signal, ChangeDetectionStrategy } from '@angular/core';\nimport type { FeatureLike } from 'ol/Feature.js';\nimport type { Extent } from 'ol/extent.js';\nimport LineString from 'ol/geom/LineString.js';\nimport Polygon from 'ol/geom/Polygon.js';\nimport MultiPolygon from 'ol/geom/MultiPolygon.js';\n\n@Component({\n selector: 'adb-map-feature-picker',\n templateUrl: 'map-feature-picker.html',\n host: { class: 'adb-map-feature-picker' },\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class MapFeaturePickerComponent {\n locationOptions = input.required<{\n features: FeatureLike[];\n pixel: number[];\n extent: Extent;\n selectMode: boolean;\n }>();\n readonly featureChosen = output<{ feature: FeatureLike; properties: any; selectMode: boolean; restoreFocus: boolean }>();\n readonly dismissed = output<boolean>();\n position = signal({ left: 0, top: 0 });\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private features = computed(() => {\n const { features, extent } = this.locationOptions();\n const hits = features.filter(feature =>\n !['FilterArea.Area', 'FilterArea.OwnPolygon'].includes(feature.get('FeatureType')));\n const point = hits.find(feature => ['Point', 'MultiPoint'].includes(feature.getGeometry().getType()));\n return point ? [point] : hits.filter(feature =>\n !feature.get('locations') || this.hasVisibleEdge(feature, extent));\n });\n\n choices = computed(() => {\n const choices: { feature: FeatureLike; item: any }[] = [];\n const ids = new Set<string>();\n for (const feature of this.features()) {\n if (feature.get('groupingType') === 'pixelCluster' || feature.get('isCluster')) continue;\n for (const item of feature.get('locations')?.items ?? []) {\n if (ids.has(item.locationId)) continue;\n ids.add(item.locationId);\n choices.push({ feature, item });\n }\n }\n return choices;\n });\n\n constructor() {\n effect(() => {\n const choices = this.choices();\n if (choices.length > 1) return;\n if (choices.length === 1) this.choose(choices[0], false);\n else if (this.features().length) this.pick(this.features()[0]);\n else this.dismissed.emit(false);\n });\n\n afterRenderEffect(() => {\n if (this.choices().length < 2) return;\n const { pixel } = this.locationOptions();\n const host = this.host.nativeElement;\n const panel = host.querySelector<HTMLElement>('section');\n if (!panel) return;\n this.position.set({\n left: Math.max(0, Math.min(pixel[0], host.clientWidth - panel.offsetWidth)),\n top: Math.max(0, Math.min(pixel[1], host.clientHeight - panel.offsetHeight))\n });\n panel.querySelector<HTMLButtonElement>('.list-group-item-action')?.focus({ preventScroll: true });\n });\n }\n\n choose(choice: any, restoreFocus = true): void {\n const properties = choice.feature.getProperties();\n delete properties['geometry'];\n properties['locations'] = {\n ...properties['locations'], count: 1, ids: [choice.item.locationId], items: [choice.item]\n };\n this.featureChosen.emit({ feature: choice.feature, properties, selectMode: this.locationOptions().selectMode, restoreFocus });\n }\n\n private pick(feature: FeatureLike): void {\n const properties = feature.getProperties();\n delete properties['geometry'];\n this.featureChosen.emit({ feature, properties, selectMode: this.locationOptions().selectMode, restoreFocus: false });\n }\n\n private hasVisibleEdge(feature: FeatureLike, extent: Extent): boolean {\n const geometry = feature.getGeometry();\n const polygons = geometry instanceof MultiPolygon ? geometry.getPolygons()\n : geometry instanceof Polygon ? [geometry] : null;\n if (!polygons) return true;\n // A surrounding polygon is only offered if some part of its boundary is visible.\n return polygons.some(polygon => polygon.getLinearRings().some(ring =>\n new LineString(ring.getCoordinates()).intersectsExtent(extent)));\n }\n}\n","@if (choices().length > 1) {\n<section class=\"adb-plate-primary shadow adb-map-feature-picker-panel\" [style.left.px]=\"position().left\" [style.top.px]=\"position().top\" [attr.aria-label]=\"'MAP.FEATURE_PICKER.TITLE' | translate\"\n (adbClickOutside)=\"dismissed.emit(false)\"\n (keydown.escape)=\"$event.stopPropagation(); dismissed.emit(true)\">\n <div class=\"d-flex align-items-center justify-content-between gap-3 mb-2\">\n <h2 class=\"h6 mb-0\">{{'MAP.FEATURE_PICKER.TITLE' | translate}}</h2>\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'MAP.FEATURE_PICKER.CLOSE' | translate\" (click)=\"dismissed.emit(true)\"></button>\n </div>\n <ul class=\"list-group list-group-flush\">\n @for (choice of choices(); track choice.item.locationId) {\n <li class=\"list-group-item p-0\">\n <button type=\"button\" class=\"list-group-item list-group-item-action border-0 text-break\" (click)=\"choose(choice)\">\n @if (choice.item.locality) {\n {{choice.item.locality}}\n @if (choice.item.municipality) {, {{choice.item.municipality}}}\n } @else if (choice.item.municipality) {\n {{choice.item.municipality}}\n }\n ({{choice.item.locationId}})\n </button>\n </li>\n }\n </ul>\n</section>\n}\n","import { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\nimport { GeoJson } from '../../models';\nimport { AdbMapUtils } from './mapUtils';\nimport { MapConstants } from '../../constants';\n\n@Component({\n selector: 'adb-map-legend',\n templateUrl: 'legend.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class MapLegendComponent {\n readonly generalizedBackgroundColor = MapConstants.GENERALIZED_POLYGON_BACKGROUND_COLOR;\n result = input<GeoJson>(null);\n cutoffYear = input<string>(null);\n loading = input(false);\n showObservationStatus = input(false);\n gridLevels = computed(() => AdbMapUtils.gridLevels(this.result()));\n private features = computed(() => (this.result()?.features ?? [])\n .filter(feature => feature.properties?.FeatureType !== 'FilterArea.Area'));\n hasNotRecovered = computed(() => this.showObservationStatus() && this.features().some(feature =>\n AdbMapUtils.isNotRecovered(feature.properties?.presentation)));\n hasNotPresent = computed(() => this.showObservationStatus() && this.features().some(feature =>\n feature.properties?.presentation?.status === 'NotPresent'));\n hasGeneralizedPolygons = computed(() => this.showObservationStatus() && this.features().some(feature =>\n feature.properties?.presentation?.generalized && ['Polygon', 'MultiPolygon'].includes(feature.geometry?.type)));\n hasCutoff = computed(() => this.cutoffYear() !== null && this.features().some(feature =>\n ['Until', 'After'].includes(feature.properties?.presentation?.cutoffYearStatus)));\n hasLocations = computed(() => this.features().some(feature =>\n feature.properties?.groupingType !== 'pixelCluster' && !feature.properties?.isCluster &&\n (feature.properties?.locations || feature.properties?.location ||\n ['Point', 'MultiPoint'].includes(feature.geometry?.type))));\n hasClusters = computed(() => this.features().some(feature =>\n feature.properties?.groupingType === 'pixelCluster' || feature.properties?.isCluster));\n}\n","<div class=\"bg-light border p-1 d-flex column-gap-1 align-items-center flex-wrap\">\n @if (hasLocations() || hasClusters()) {\n <div class=\"d-flex align-items-start gap-2 w-100\">\n <ul class=\"list-unstyled mb-0 d-flex flex-grow-1 flex-wrap column-gap-3 row-gap-1\">\n @if (hasCutoff()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend legend-before\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.BEFORE' | translate}} {{cutoffYear()}}\n </li>\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend legend-after\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.FROM' | translate}} {{cutoffYear()}}\n </li>\n } @else if (hasLocations()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"map-symbol-circle map-symbol-bg-5\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.LOCATION' | translate}}\n </li>\n }\n @if (hasClusters() && !hasCutoff()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend legend-cluster\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.CLUSTER' | translate}}\n </li>\n }\n @if (hasNotRecovered()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"map-symbol-circle-x map-symbol-bg-5\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.NOT_RECOVERED' | translate}}\n </li>\n }\n @if (hasNotPresent()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"map-symbol-circle map-symbol-bg-5 d-inline-flex align-items-center justify-content-center\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" focusable=\"false\">\n <line x1=\"2\" y1=\"6\" x2=\"10\" y2=\"6\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n </svg>\n </span>\n {{'MAP.LEGEND.NOT_PRESENT' | translate}}\n </li>\n }\n @if (hasGeneralizedPolygons()) {\n <li class=\"d-flex align-items-center gap-1\">\n <span class=\"legend border border-2 border-danger\"\n [style.background-color]=\"generalizedBackgroundColor\" aria-hidden=\"true\"></span>\n {{'MAP.LEGEND.GENERALIZED_LOCATION' | translate}}\n </li>\n }\n </ul>\n <adb-help-button class=\"ms-auto flex-shrink-0\">\n <dl>\n <dt>{{'MAP.LEGEND.LOCATION' | translate}}</dt>\n <dd>{{'MAP.LEGEND.LOCATION_HELP' | translate}}</dd>\n <dt>{{'MAP.LEGEND.CLUSTER' | translate}}</dt>\n <dd>{{'MAP.LEGEND.CLUSTER_HELP' | translate}}</dd>\n </dl>\n </adb-help-button>\n </div>\n @if (hasCutoff() && hasClusters()) {\n <small class=\"d-block w-100\">{{'MAP.LEGEND.CLUSTER_SIZE' | translate}}</small>\n }\n }\n @if (!loading()) {\n @for (level of gridLevels(); track $index) {\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"legend border border-dark\" [style.background-color]=\"level.color\" aria-hidden=\"true\"></span>\n <small>\n @if ($first) {\n &lt; {{level.max + 1 | adbSpacing}}\n } @else if ($last) {\n &gt; {{level.min - 1 | adbSpacing}}\n } @else {\n {{level.min | adbSpacing}}–{{level.max | adbSpacing}}\n }\n </small>\n </div>\n }\n }\n</div>\n","import { AfterViewInit, inject, Component, computed, effect, input, OnDestroy, output, signal, ChangeDetectionStrategy } from \"@angular/core\";\nimport Map from 'ol/Map.js';\nimport Feature from 'ol/Feature.js';\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport CircleGeometry from 'ol/geom/Circle.js';\nimport { Fill, Stroke, Style } from 'ol/style.js';\nimport { transformExtent, toLonLat } from 'ol/proj.js';\nimport { extend, getCenter, getForViewAndSize, isEmpty } from 'ol/extent.js';\nimport type { Extent } from 'ol/extent.js';\nimport type { FeatureLike } from 'ol/Feature.js';\nimport { finalize } from 'rxjs/operators';\nimport { ActivatedRoute, ActivatedRouteSnapshot, NavigationEnd, Params, Router } from \"@angular/router\";\nimport { Subscription } from \"rxjs\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { GeoJson } from \"../../models\";\nimport { AdbMapConfigService } from \"../../config\";\nimport { AdbMapUtils } from \"./mapUtils\";\nimport { ADB_MAP_DATA_SOURCE } from \"../../data-source\";\nimport { MapConstants } from \"../../constants\";\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nexport type MapPresentationMode = 'locations' | 'observations';\n\n@Component({\n selector: 'adb-map',\n templateUrl: 'adb-map.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class AdbMapComponent implements AfterViewInit, OnDestroy {\n showLegend = input(true);\n showHeader = input(true);\n allowPresentationMode = input(false);\n presentationMode = input<MapPresentationMode>('locations');\n private route = signal<ActivatedRouteSnapshot>(null);\n activePresentationMode = computed(() => {\n const mode = this.route()?.queryParams['presentationMode'];\n if (this.allowPresentationMode() && (mode === 'locations' || mode === 'observations')) return mode;\n return this.presentationMode();\n });\n private readonly dataSource = inject(ADB_MAP_DATA_SOURCE);\n private requestedParams = '';\n settingsOpen = signal(false);\n savingSettings = signal(false);\n settingsError = signal(false);\n settingsForm = new FormGroup({\n presentationMode: new FormControl('locations'),\n uncertain: new FormControl(false),\n cutoff: new FormControl('', Validators.pattern(/^[1-9]\\d*$/))\n });\n private preserveViewOnNextLoad = false;\n error: null;\n mapLoading = signal(false);\n readonly locationSelected = output<any>();\n readonly clusterSelected = output<any>();\n private siteSource = new VectorSource();\n private uncertaintySource = new VectorSource();\n private siteLayer = new VectorLayer({ source: this.siteSource, style: feature => this.featureStyle(feature) });\n private format = new GeoJSON();\n private resizeObserver: ResizeObserver;\n private requestSubscription: Subscription;\n private hoveredFeature: unknown;\n private selectedFeature: FeatureLike = null;\n locationOptions = signal<{\n features: FeatureLike[]; pixel: number[]; extent: Extent; selectMode: boolean;\n }>(null);\n private fittedView = '';\n private pendingExtent: Extent;\n mapResult = signal<GeoJson>(null);\n cutoffYear = computed(() => this.activePresentationMode() === 'observations'\n ? this.route()?.queryParams['cutoff'] ?? null : null);\n private gridLevels = computed(() => AdbMapUtils.gridLevels(this.mapResult()));\n mapId = '' + Math.floor(Math.random() * Date.now());\n map: Map;\n\n private mapReady = signal(false);\n queryParams: Params = {};\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private config: AdbMapConfigService,\n private router: Router) {\n\n this.route.set(this.activatedRoute.snapshot);\n\n this.settingsForm.controls.presentationMode.valueChanges.pipe(takeUntilDestroyed()).subscribe(mode => {\n const cutoff = this.settingsForm.controls.cutoff;\n if (this.allowPresentationMode() && mode === 'observations') cutoff.enable();\n else cutoff.disable();\n });\n\n // Read query and route parameters together, after navigation has finished.\n this.router.events.pipe(takeUntilDestroyed()).subscribe(event => {\n if (event instanceof NavigationEnd) this.route.set(this.activatedRoute.snapshot);\n });\n\n // All data updates start here, once the map has a usable size.\n effect(() => {\n if (!this.mapReady()) return;\n const snapshot = this.route();\n this.queryParams = snapshot.queryParams;\n\n this.siteLayer.changed();\n const params = { ...snapshot.queryParams };\n delete params['presentationMode'];\n if (this.activePresentationMode() === 'locations') delete params['cutoff'];\n if (snapshot.paramMap.has('taxonId')) {\n params['taxonId'] = snapshot.paramMap.get('taxonId');\n }\n const requestKey = JSON.stringify(params);\n if (requestKey === this.requestedParams) {\n this.preserveViewOnNextLoad = false;\n return;\n }\n this.requestedParams = requestKey;\n this.loadFeature(params);\n });\n }\n\n ngAfterViewInit(): void {\n this.map = AdbMapUtils.createMap(this.mapId, {\n zoom: true,\n scrollZoom: false,\n providers: true\n });\n\n this.map.addLayer(new VectorLayer({\n source: this.uncertaintySource,\n style: new Style({ stroke: new Stroke({ color: MapConstants.UNCERTAINTY_BORDER_COLOR, width: 1 }) })\n }));\n this.map.addLayer(this.siteLayer);\n this.resizeObserver = new ResizeObserver(() => {\n this.closeLocationPicker(false);\n this.map.updateSize();\n const size = this.map.getSize();\n if (size?.[0] && size[1]) this.mapReady.set(true);\n this.fitPendingExtent();\n });\n this.resizeObserver.observe(this.map.getTargetElement());\n this.fittedView = this.viewKey();\n const size = this.map.getSize();\n if (size?.[0] && size[1]) this.mapReady.set(true);\n this.attachUserListeners();\n }\n\n openSettings(): void {\n this.settingsForm.reset({\n presentationMode: this.activePresentationMode(),\n uncertain: this.queryParams['uncertain'] === 'true',\n cutoff: {\n value: this.queryParams['cutoff'] ?? '',\n disabled: !this.allowPresentationMode() || this.activePresentationMode() !== 'observations'\n }\n });\n this.settingsError.set(false);\n this.closeLocationPicker(false);\n this.settingsOpen.set(true);\n }\n\n cancelSettings(button: HTMLButtonElement): void {\n this.settingsForm.reset();\n this.settingsOpen.set(false);\n button.focus({ preventScroll: true });\n }\n\n async saveSettings(button: HTMLButtonElement): Promise<void> {\n if (this.settingsForm.invalid || this.savingSettings()) return;\n this.savingSettings.set(true);\n this.settingsError.set(false);\n this.preserveViewOnNextLoad = true;\n try {\n const saved = await this.router.navigate([], {\n relativeTo: this.activatedRoute,\n queryParams: {\n uncertain: this.settingsForm.value.uncertain || null,\n presentationMode: this.allowPresentationMode() ? this.settingsForm.value.presentationMode : null,\n cutoff: this.allowPresentationMode()\n ? this.settingsForm.value.cutoff || null : null\n },\n queryParamsHandling: 'merge'\n });\n if (saved) this.cancelSettings(button);\n else this.settingsError.set(true);\n } catch {\n this.settingsError.set(true);\n } finally {\n if (this.settingsError()) this.preserveViewOnNextLoad = false;\n this.savingSettings.set(false);\n }\n }\n\n onExport(): void {\n const json = this.format.writeFeatures(this.siteSource.getFeatures(), {\n featureProjection: this.map.getView().getProjection(), dataProjection: 'EPSG:4326'\n });\n AdbMapUtils.createFile(new Blob([json], { type: 'application/geo+json' }), 'sites.geojson');\n }\n\n private attachUserListeners(): void {\n this.map.on('moveend', () => {\n this.closeLocationPicker(false);\n if (this.viewKey() === this.fittedView) return;\n if (this.config.dynamic) {\n const bbox = this.currentBbox();\n if (bbox !== this.queryParams?.['bbox']) {\n this.router.navigate([], {\n relativeTo: this.activatedRoute,\n queryParams: { bbox }, queryParamsHandling: 'merge'\n });\n }\n }\n });\n this.map.on('pointermove', event => {\n const feature = this.config.dynamic ? this.map.forEachFeatureAtPixel(event.pixel,\n feature => ['FilterArea.Area', 'FilterArea.OwnPolygon'].includes(feature.get('FeatureType')) ? null : feature,\n { layerFilter: layer => layer === this.siteLayer }) : undefined;\n this.map.getTargetElement().style.cursor = feature ? 'pointer' : '';\n if (this.hoveredFeature !== feature) {\n this.hoveredFeature = feature;\n this.siteLayer.changed();\n }\n });\n this.map.on('singleclick', event => {\n if (!this.config.dynamic) return;\n this.locationOptions.set({\n features: this.map.getFeaturesAtPixel(event.pixel, { layerFilter: layer => layer === this.siteLayer }),\n pixel: event.pixel,\n extent: this.map.getView().calculateExtent(this.map.getSize()),\n selectMode: this.config.enableClusterSelection &&\n (event.originalEvent.ctrlKey || event.originalEvent.metaKey)\n });\n });\n }\n\n closeLocationPicker(restoreFocus = true): void {\n this.locationOptions.set(null);\n this.hoveredFeature = null;\n this.siteLayer.changed();\n if (restoreFocus) this.map.getTargetElement().focus({ preventScroll: true });\n }\n\n onFeatureChosen(selection: any): void {\n this.closeLocationPicker(selection.restoreFocus);\n const { feature, properties: props } = selection;\n const cluster = props['groupingType'] === 'pixelCluster' || props['isCluster'];\n const location = !cluster && !!(props['location'] || props['observationCount']);\n if ((cluster || location) && this.config.enableClusterSelection &&\n selection.selectMode) {\n this.selectedFeature = feature;\n this.siteLayer.changed();\n delete props['geometry'];\n if (cluster) {\n this.clusterSelected.emit(props);\n } else {\n this.locationSelected.emit(props);\n }\n return;\n }\n if (location) {\n delete props['geometry'];\n this.locationSelected.emit(props);\n } else if (cluster || props['ObservationsCount'] > 0) {\n let extent = feature.getGeometry().getExtent();\n if (cluster) {\n const projectedCenter = getCenter(extent);\n const center = toLonLat(projectedCenter);\n const radius = props['cluster'].radiusMeters;\n const circle = new CircleGeometry(projectedCenter, radius / Math.cos(center[1] * Math.PI / 180));\n extent = circle.getExtent();\n const view = this.map.getView();\n const size = this.map.getSize();\n // Match the padding used when fitting the response extent.\n const fitSize = [size[0] - 40, size[1] - 40];\n if (view.getResolutionForExtent(extent, fitSize) >= view.getResolution()) {\n extent = getForViewAndSize(projectedCenter, view.getResolution() / 2, 0, fitSize);\n }\n }\n const bbox = transformExtent(extent, this.map.getView().getProjection(), 'EPSG:4326').join(',');\n this.router.navigate([], { relativeTo: this.activatedRoute, queryParams: { bbox }, queryParamsHandling: 'merge' });\n }\n }\n\n private currentBbox(): string {\n return transformExtent(this.map.getView().calculateExtent(this.map.getSize()),\n this.map.getView().getProjection(), 'EPSG:4326').join(',');\n }\n\n private loadFeature(qParams: Params): void {\n this.requestSubscription?.unsubscribe();\n this.mapLoading.set(true);\n this.error = null;\n // A bbox matching the current view comes from panning or zooming the map.\n const fitView = !this.preserveViewOnNextLoad &&\n (!qParams['bbox'] || qParams['bbox'] !== this.currentBbox());\n this.preserveViewOnNextLoad = false;\n const requestedView = this.viewKey();\n this.requestSubscription = this.dataSource.load({\n url: this.config.observationFeatures,\n params: qParams,\n metersPerPixel: this.getMetersPerPixel(qParams),\n dataProviderIds: this.config.dataProviderIds\n }).\n pipe(\n finalize(() => {\n this.mapLoading.set(false);\n })\n ).\n subscribe({\n next: (geo: GeoJson) => {\n this.buildMap(geo, fitView && requestedView === this.viewKey());\n }, error: err => {\n this.requestedParams = '';\n this.error = err;\n }\n });\n }\n\n private getMetersPerPixel(qParams: any): number {\n return qParams.bbox\n ? AdbMapUtils.getMetersPerPixel(qParams.bbox, this.map.getSize()?.[0])\n : MapConstants.INITIAL_METERS_PER_PIXEL;\n }\n\n private buildMap(geojson: GeoJson, fitView: boolean): void {\n this.mapResult.set(geojson);\n const features = this.format.readFeatures(geojson, { featureProjection: this.map.getView().getProjection() });\n this.closeLocationPicker(false);\n this.selectedFeature = null;\n this.siteSource.clear();\n this.uncertaintySource.clear();\n this.siteSource.addFeatures(features);\n if (this.queryParams?.['uncertain'] === 'true') {\n for (const feature of features) {\n const props = feature.getProperties();\n if (props['groupingType'] !== 'singleLocation') continue;\n const location = props['locations']?.items?.[0];\n const radius = location?.coordinateUncertaintyInMeters;\n const geometry = feature.getGeometry();\n if (geometry.getType() === 'Point' && location?.type === 'Point' && radius > 0) {\n const center = geometry.getExtent().slice(0, 2);\n this.uncertaintySource.addFeature(new Feature(AdbMapUtils.createUncertaintyCircle(center, radius)));\n }\n }\n }\n this.pendingExtent = undefined;\n if (!fitView) return;\n\n const extent = geojson.bbox\n ? transformExtent(geojson.bbox, 'EPSG:4326', this.map.getView().getProjection())\n : extend(this.siteSource.getExtent(), this.uncertaintySource.getExtent());\n if (!isEmpty(extent)) {\n this.pendingExtent = extent;\n this.fitPendingExtent();\n }\n }\n\n private viewKey(): string {\n return [...this.map.getView().getCenter(), this.map.getView().getResolution()].join(',');\n }\n\n private fitPendingExtent(): void {\n const size = this.map.getSize();\n if (!this.pendingExtent || !size?.[0] || !size[1]) return;\n this.map.getView().fit(this.pendingExtent, { padding: [20, 20, 20, 20], maxZoom: 18 });\n this.fittedView = this.viewKey();\n this.pendingExtent = undefined;\n }\n\n private featureStyle(feature: FeatureLike): Style | Style[] {\n const props = feature.getProperties();\n if (['FilterArea.Area', 'FilterArea.OwnPolygon'].includes(props['FeatureType'])) {\n return new Style({\n stroke: new Stroke({ color: MapConstants.SEARCH_AREA_BORDER_COLOR, width: 2 }),\n fill: new Fill({ color: 'transparent' })\n });\n }\n const cluster = props['groupingType'] === 'pixelCluster' || props['isCluster'];\n const location = props['locations'] || props['location'];\n const point = ['Point', 'MultiPoint'].includes(feature.getGeometry()?.getType());\n if (cluster || location || point) {\n return this.activePresentationMode() === 'observations'\n ? this.aggregatedSymbol(feature) : this.locationSymbol(feature);\n }\n if (props['FeatureId']) return new Style({\n stroke: new Stroke({ color: '#005e67', width: 2 }), fill: new Fill({ color: 'rgba(0,118,129,0.1)' })\n });\n const level = this.gridLevels().find(level => props['ObservationsCount'] <= level.max);\n const color = level?.color ?? '#2FB3BB';\n return new Style({ stroke: new Stroke({ color: '#212529', width: 1 }), fill: new Fill({ color }) });\n }\n\n private locationSymbol(feature: FeatureLike): Style {\n return AdbMapUtils.locationSymbol(feature, feature === this.selectedFeature, feature === this.hoveredFeature);\n }\n\n private aggregatedSymbol(feature: FeatureLike): Style | Style[] {\n return AdbMapUtils.aggregatedSymbol(\n this.locationSymbol(feature), feature.get('presentation'), this.cutoffYear(), feature === this.selectedFeature,\n feature.getGeometry()?.getType()\n );\n }\n\n ngOnDestroy(): void {\n this.requestSubscription?.unsubscribe();\n this.resizeObserver?.disconnect();\n this.map?.dispose();\n }\n}\n","@if(error){\n<div class=\"d-flex align-items-baseline gap-2 p-2 mb-3\" role=\"alert\">\n <span class=\"bi bi-circle-fill text-danger\" aria-hidden=\"true\"></span>\n <span>{{'ERROR.SERVER_ERROR'|translate}}</span>\n</div>\n}\n<div [class.loading]=\"mapLoading()\">\n <div class=\"d-flex align-items-center justify-content-end flex-wrap gap-1 border p-1\" [class.d-none]=\"!showHeader()\">\n @if (!mapLoading() && mapResult()?.properties?.count != null) {\n <span class=\"me-auto\">{{mapResult().properties.count | adbSpacing}} {{'MAP.OBSERVATIONS' | translate}}</span>\n }\n <button type=\"button\" class=\"btn btn-sm btn-secondary\" [attr.aria-label]=\"'MAP.FULLSCREEN' | translate\" [title]=\"'MAP.FULLSCREEN' | translate\" [disabled]=\"settingsOpen()\">\n <span class=\"bi bi-fullscreen\" aria-hidden=\"true\"></span>\n </button>\n <button type=\"button\" class=\"btn btn-sm btn-secondary\" [attr.aria-label]=\"'MAP.EXPORT' | translate\" [title]=\"'MAP.EXPORT' | translate\" [disabled]=\"settingsOpen()\" (click)=\"onExport()\">\n <span class=\"bi bi-download\" aria-hidden=\"true\"></span>\n </button>\n <button #settingsButton type=\"button\" class=\"btn btn-sm btn-secondary\" [attr.aria-label]=\"'MAP.SETTINGS.TITLE' | translate\"\n [title]=\"'MAP.SETTINGS.TITLE' | translate\" [attr.aria-expanded]=\"settingsOpen()\" [attr.aria-controls]=\"mapId + '-settings'\"\n (click)=\"settingsOpen() ? cancelSettings(settingsButton) : openSettings()\">\n <span class=\"bi bi-gear\" aria-hidden=\"true\"></span>\n </button>\n </div>\n <div class=\"position-relative\">\n <div [id]=\"mapId\" tabindex=\"0\" class=\"border-start border-end adb-map\" [class.invisible]=\"settingsOpen()\" [attr.inert]=\"settingsOpen() ? '' : null\"></div>\n @if (locationOptions(); as options) {\n <adb-map-feature-picker [locationOptions]=\"options\" (featureChosen)=\"onFeatureChosen($event)\" (dismissed)=\"closeLocationPicker($event)\" />\n }\n @if (settingsOpen()) {\n <form [id]=\"mapId + '-settings'\" [formGroup]=\"settingsForm\" (ngSubmit)=\"saveSettings(settingsButton)\"\n class=\"form p-3 position-absolute top-0 start-0 w-100 h-100 overflow-auto m-0\"\n [class.loading]=\"savingSettings()\" [attr.aria-labelledby]=\"mapId + '-settings-title'\" [attr.aria-busy]=\"savingSettings()\"\n (keydown.escape)=\"cancelSettings(settingsButton); $event.stopPropagation()\">\n <h2 [id]=\"mapId + '-settings-title'\" class=\"h5\">{{'MAP.SETTINGS.TITLE' | translate}}</h2>\n <div class=\"form-check mb-3\">\n <input [id]=\"mapId + '-uncertain'\" type=\"checkbox\" formControlName=\"uncertain\" class=\"form-check-input\">\n <label [for]=\"mapId + '-uncertain'\" class=\"form-check-label\">{{'MAP.SETTINGS.UNCERTAINTY' | translate}}</label>\n </div>\n @if (allowPresentationMode()) {\n <div class=\"mb-3\">\n <label [for]=\"mapId + '-presentation-mode'\">{{'MAP.SETTINGS.PRESENTATION_MODE' | translate}}</label>\n <select [id]=\"mapId + '-presentation-mode'\" formControlName=\"presentationMode\" class=\"form-select\">\n <option value=\"locations\">{{'MAP.SETTINGS.LOCATIONS_MODE' | translate}}</option>\n <option value=\"observations\">{{'MAP.SETTINGS.OBSERVATIONS_MODE' | translate}}</option>\n </select>\n </div>\n @if (settingsForm.controls.presentationMode.value === 'observations') {\n <div class=\"mb-3\">\n <label [for]=\"mapId + '-cutoff'\">{{'MAP.SETTINGS.CUTOFF' | translate}}</label>\n <input [id]=\"mapId + '-cutoff'\" type=\"text\" inputmode=\"numeric\" formControlName=\"cutoff\" class=\"form-control\"\n [attr.aria-invalid]=\"settingsForm.controls.cutoff.invalid\" [attr.aria-describedby]=\"mapId + '-cutoff-error'\">\n @if (settingsForm.controls.cutoff.invalid) {\n <div [id]=\"mapId + '-cutoff-error'\" class=\"invalid-feedback\">{{'MAP.SETTINGS.INVALID_CUTOFF' | translate}}</div>\n }\n </div>\n }\n }\n @if (settingsError()) {\n <div class=\"d-flex align-items-baseline gap-2 p-2 mb-3\" role=\"alert\">\n <span class=\"bi bi-circle-fill text-danger\" aria-hidden=\"true\"></span>\n <span>{{'MAP.SETTINGS.SAVE_ERROR' | translate}}</span>\n </div>\n }\n <div class=\"d-flex justify-content-end gap-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"cancelSettings(settingsButton)\">{{'MAP.SETTINGS.CANCEL' | translate}}</button>\n <button type=\"submit\" class=\"btn btn-primary\" [disabled]=\"settingsForm.invalid || settingsForm.pristine\">{{'MAP.SETTINGS.SAVE' | translate}}</button>\n </div>\n </form>\n }\n </div>\n</div>\n@if (showLegend() && !settingsOpen()) {\n <adb-map-legend [result]=\"mapResult()\" [cutoffYear]=\"cutoffYear()\" [loading]=\"mapLoading()\"\n [showObservationStatus]=\"activePresentationMode() === 'observations'\" />\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, input, OnChanges, OnDestroy } from '@angular/core';\nimport Map from 'ol/Map.js';\nimport Feature from 'ol/Feature.js';\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport { Circle as CircleStyle, Fill, Stroke, Style } from 'ol/style.js';\nimport { extend, isEmpty } from 'ol/extent.js';\nimport type { Extent } from 'ol/extent.js';\nimport { AdbMapUtils } from './mapUtils';\nimport { MapConstants } from '../../constants';\n\n@Component({\n selector: 'adb-location-map',\n templateUrl: './adb-location-map.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class AdbLocationMapComponent implements AfterViewInit, OnChanges, OnDestroy {\n geoJson = input.required<any>();\n readonly mapId = 'location-map-' + Math.floor(Math.random() * Date.now());\n private map: Map;\n private resizeObserver: ResizeObserver;\n private pendingExtent: Extent = null;\n private source = new VectorSource();\n private uncertaintySource = new VectorSource();\n private format = new GeoJSON();\n\n ngAfterViewInit(): void {\n this.map = AdbMapUtils.createMap(this.mapId, { scrollZoom: false });\n this.map.addLayer(new VectorLayer({\n source: this.uncertaintySource,\n style: new Style({\n stroke: new Stroke({ color: MapConstants.UNCERTAINTY_BORDER_COLOR, width: 1 })\n })\n }));\n this.map.addLayer(new VectorLayer({\n source: this.source,\n style: new Style({\n image: new CircleStyle({\n radius: MapConstants.MARKER_RADIUS,\n fill: new Fill({ color: MapConstants.LOCATION_MARKER_BACKGROUND_COLOR }),\n stroke: new Stroke({ color: MapConstants.LOCATION_MARKER_BORDER_COLOR, width: 1 })\n }),\n stroke: new Stroke({ color: MapConstants.LOCATION_POLYGON_BORDER_COLOR, width: 2 }),\n fill: new Fill({ color: 'transparent' })\n })\n }));\n this.resizeObserver = new ResizeObserver(() => {\n this.map.updateSize();\n this.fitPendingExtent();\n });\n this.resizeObserver.observe(this.map.getTargetElement());\n this.renderMap();\n }\n\n ngOnChanges(): void {\n this.renderMap();\n }\n\n private renderMap(): void {\n if (!this.map) return;\n this.source.clear();\n this.uncertaintySource.clear();\n this.pendingExtent = null;\n const geo = this.geoJson();\n if (!geo) return;\n\n const features = this.format.readFeatures(geo, {\n featureProjection: this.map.getView().getProjection()\n });\n this.source.addFeatures(features);\n for (const feature of features) {\n const geometry = feature.getGeometry();\n const properties = feature.getProperties();\n const radius = properties['location']?.coordinateUncertaintyInMeters ??\n properties['locations']?.items?.[0]?.coordinateUncertaintyInMeters;\n if (geometry?.getType() === 'Point' && radius > 0) {\n const center = geometry.getExtent().slice(0, 2);\n this.uncertaintySource.addFeature(new Feature(AdbMapUtils.createUncertaintyCircle(center, radius)));\n }\n }\n const extent = extend(this.source.getExtent(), this.uncertaintySource.getExtent());\n if (!isEmpty(extent)) {\n this.pendingExtent = extent;\n this.fitPendingExtent();\n }\n }\n\n private fitPendingExtent(): void {\n const size = this.map.getSize();\n if (!this.pendingExtent || !size?.[0] || !size[1]) return;\n this.map.getView().fit(this.pendingExtent, { padding: [20, 20, 20, 20], maxZoom: 18 });\n this.pendingExtent = null;\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n this.map?.dispose();\n }\n}\n","<div [id]=\"mapId\" tabindex=\"0\" class=\"border adb-map\"></div>\n","import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ChangeDetectionStrategy, computed, input } from \"@angular/core\";\nimport { FormArray, FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, ParamMap, Params, Router } from \"@angular/router\";\nimport { addYears, endOfDay, endOfYear, parseISO, startOfDay, startOfYear } from \"date-fns\";\nimport { combineLatest, debounceTime, map, Subscription } from \"rxjs\";\nimport { AdbMapConfigService, AdbMapFilterType } from \"../config\";\nimport { HttpClient } from \"@angular/common/http\";\nimport { GeoJsonFeature } from \"../models\";\nimport { DateTypes } from \"../constants\";\n\n@Component({\n selector: 'adb-map-filters',\n templateUrl: 'map-filter.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class AdbMapFilters implements OnInit, OnDestroy {\n @Input() inline = false;\n readonly hiddenFilters = input<AdbMapFilterType[]>([]);\n readonly visibleFilters = computed(() => ({\n taxon: !this.hiddenFilters().includes('taxon'),\n time: !this.hiddenFilters().includes('time'),\n area: !this.hiddenFilters().includes('area'),\n ownArea: !this.hiddenFilters().includes('ownArea'),\n taxaLists: !this.hiddenFilters().includes('taxonLists'),\n datasources: !this.hiddenFilters().includes('datasources')\n }));\n static datasets = ['1', '3', '5', '6', '4', '8'];\n \n subscriptions = new Subscription();\n form: FormGroup;\n thisYear = new Date();\n lastYear = addYears(new Date(), -1);\n queryParamsMap: ParamMap;\n hasOwnArea: boolean;\n geo: GeoJsonFeature;\n area: { areaType: string; featureId: string; };\n areasArray: FormArray<any>;\n dataSetCount: number;\n taxonListCount: number;\n riskListCount: number;\n redListCount: number;\n areaCount: number;\n periodCount: number;\n listsError: any;\n taxaLists: any[];\n hasTaxonInUrlParameter: any;\n dsControls: any;\n dateStartConfig: { maxDate: Date; };\n dateEndConfig: { minDate: Date; maxDate: Date; };\n artfakta: string;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private config: AdbMapConfigService,\n private http: HttpClient,\n private router: Router,\n private activatedRoute: ActivatedRoute) {\n this.artfakta = this.config.artfaktaTaxonLists;\n }\n\n ngOnInit(): void {\n const lists$ = this.http.get<any[]>(this.config.taxaListsApi, { params: { limit: -1 } });\n const combined$ = combineLatest([this.activatedRoute.paramMap, this.activatedRoute.queryParamMap, lists$])\n .pipe(map(results => ({ params: results[0], qParams: results[1], lists: results[2] })), debounceTime(0));\n this.subscriptions.add(combined$.subscribe(result => {\n this.form = this.createForm(result.params, result.qParams, result.lists);\n this.cdr.markForCheck();\n }));\n }\n\n removeArea(index: number): void {\n (this.form.get('areas') as FormArray).removeAt(index);\n this.form.markAsDirty();\n }\n\n addArea(): void {\n const areas = this.form.get('areas') as FormArray;\n areas.push(new FormControl(null));\n this.form.updateValueAndValidity();\n this.form.markAsDirty();\n }\n\n onSubmit(): void {\n const data = this.form.value;\n let params = {} as any;\n params.p = data.period ?? null;\n if (data.period === DateTypes.THIS_YEAR) {\n params.startAt = startOfYear(this.thisYear).toISOString();\n params.endAt = null;\n } else if (data.period === DateTypes.LAST_YEAR) {\n params.startAt = startOfYear(this.lastYear).toISOString();\n params.endAt = endOfYear(this.lastYear).toISOString();\n } else if (data.period === DateTypes.ALL_YEAR) {\n params.startAt = null;\n params.endAt = null;\n params.p = null;\n } else if (data.period === DateTypes.LAST_5_YEAR) {\n params.startAt = startOfYear(addYears(new Date(), -5)).toISOString();\n params.endAt = null;\n } else if (data.period === DateTypes.LAST_25_YEAR) {\n params.startAt = startOfYear(addYears(new Date(), -25)).toISOString();\n params.endAt = null;\n } else if (data.period === DateTypes.CUSTOM) {\n params.startAt = startOfDay(data.startAt).toISOString();\n params.endAt = endOfDay(data.endAt).toISOString();\n }\n if (this.hasOwnArea && data.geo) {\n params.geo = JSON.stringify(data.geo.geometry?.coordinates[0]);\n }\n const cleaned = data.areas?.filter(v => v != null && v !== '');\n if (cleaned.length > 0) {\n params.area = cleaned;\n }\n if (this.activatedRoute.snapshot.paramMap.has('taxonId')) {\n params.taxonId = this.activatedRoute.snapshot.paramMap.get('taxonId')\n } else {\n params.taxonId = data.taxonId ?? null;\n }\n if (data.list?.length > 0) {\n params.list = data.list;\n }\n if (data.ds?.length > 0) {\n const selected = data.ds.filter(f => f.selected).map(m => m.id);\n params.ds = selected.length ? selected : null;\n }\n const locationIds = this.activatedRoute.snapshot.queryParamMap.getAll('locationId');\n if (locationIds.length) {\n params.locationId = locationIds;\n }\n this.router.navigate([], { queryParams: params, relativeTo: this.activatedRoute })\n }\n\n private createForm(params: Params, qMap: ParamMap, lists: any[]): FormGroup {\n this.hasTaxonInUrlParameter = params['taxonId'];\n this.hasOwnArea = qMap.has('geo') && this.visibleFilters().ownArea;\n const areas = qMap.getAll('area').filter(a => a != null && a.trim() !== '' && a.includes('-'));\n const form: FormGroup = new FormGroup({\n period: new FormControl(qMap.has('p') ? qMap.get('p') : '3'),\n areas: new FormArray(\n (Array.isArray(areas) && areas.length ? areas : [null]).map(a => new FormControl(a))\n ),\n geo: new FormControl(qMap.has('geo') ? {\n type: 'Feature',\n geometry: { type: 'Polygon', coordinates: [JSON.parse(qMap.get('geo'))] }\n } : null)\n });\n this.areasArray = form.get('areas') as FormArray;\n this.periodCount = qMap.has('p') && qMap.get('p') !== '3' ? 1 : 0;\n this.areaCount = areas.length + (this.hasOwnArea ? 1 : 0);\n if (!this.hasTaxonInUrlParameter) {\n form.addControl('taxonId', new FormControl(qMap.get('taxonId') ?? null));\n const selectedTaxonList = qMap.has('list') ? qMap.getAll('list').map(val => Number(val)).filter(val => !isNaN(val)) : null;\n this.taxaLists = lists;\n this.taxonListCount = selectedTaxonList?.length;\n form.addControl('list', new FormControl(selectedTaxonList))\n let datasets = qMap.has('ds') ? (Array.isArray(qMap.getAll('ds')) ? qMap.getAll('ds') : [qMap.get('ds')]) : null;\n this.dataSetCount = datasets?.length;\n form.addControl('ds', new FormArray(\n AdbMapFilters.datasets.map(id => new FormGroup({\n id: new FormControl(id),\n selected: new FormControl(datasets?.includes(id))\n }))\n ));\n this.dsControls = (form.get('ds') as FormArray).controls;\n }\n this.updateCustomDate(form, qMap.get('p'), qMap);\n this.subscriptions.add(form.get('period').valueChanges.subscribe(period => {\n this.updateCustomDate(form, period, qMap);\n }));\n return form;\n }\n\n private updateCustomDate(form: FormGroup, period: string, qMap: ParamMap): void {\n if (form.contains('startAt')) {\n form.removeControl('startAt');\n }\n if (form.contains('endAt')) {\n form.removeControl('endAt');\n }\n if (period === DateTypes.CUSTOM) {\n let start = qMap.has('startAt') ? parseISO(qMap.get('startAt')) : null;\n let end = qMap.has('endAt') ? parseISO(qMap.get('endAt')) : null;\n if (qMap.get('p') !== DateTypes.CUSTOM) {\n start = new Date();\n end = new Date();\n }\n this.dateStartConfig = { maxDate: end ?? new Date() };\n this.dateEndConfig = { minDate: start ?? null, maxDate: new Date() };\n const startControl = new FormControl(start, Validators.required);\n const endControl = new FormControl(end, Validators.required);\n form.addControl('startAt', startControl);\n form.addControl('endAt', endControl);\n this.subscriptions.add(\n startControl.valueChanges.subscribe(startAt => {\n this.dateEndConfig = { minDate: startAt ?? null, maxDate: new Date() };\n })\n );\n this.subscriptions.add(\n endControl.valueChanges.subscribe(endAt => {\n this.dateStartConfig = { maxDate: endAt ?? new Date() };\n })\n );\n }\n }\n\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n }\n}\n","@if(form){\n<form [formGroup]=\"form\" class=\"form mb-3\" (ngSubmit)=\"onSubmit()\">\n <div class=\"mb-3\">\n @if(visibleFilters().taxon){\n <adb-filter-section titleResource=\"TAXON.TAXA\" [expanded]=\"true\">\n @if(!hasTaxonInUrlParameter){\n <div class=\"mb-3\">\n <label for=\"species\">{{'TAXON.TAXON'|translate}}</label>\n <adb-taxon-picker formControlName=\"taxonId\" id=\"species\"></adb-taxon-picker>\n </div>\n }\n </adb-filter-section>\n }\n @if(visibleFilters().time){\n <adb-filter-section [count]=\"periodCount\" titleResource=\"OBSERVATION.PERIOD\">\n <div class=\"mb-1\">\n <select class=\"form-select\" formControlName=\"period\" id=\"period\">\n <option value=\"1\">{{thisYear|date:'yyyy'}}</option>\n <option value=\"2\">{{lastYear|date:'yyyy'}}</option>\n <option value=\"3\">{{'OBSERVATION.ALL_YEAR'|translate}}</option>\n <option value=\"4\">{{'OBSERVATION.LAST_5_YEAR'|translate}}</option>\n <option value=\"5\">{{'OBSERVATION.LAST_25_YEAR'|translate}}</option>\n <option value=\"6\">{{'OBSERVATION.CUSTOMIZED'|translate}}</option>\n </select>\n </div>\n @if (form.value?.period==='6') {\n <div class=\"mb-2\">\n <label for=\"startAt\">{{'FROM' |translate}}</label>\n <input adbDatepicker type=\"text\" class=\"form-control datepicker\" id=\"startAt\" formControlName=\"startAt\" [settings]=\"dateStartConfig\">\n </div>\n <div class=\"mb-2\">\n <label for=\"endAt\">{{'TO' |translate}}</label>\n <input adbDatepicker type=\"text\" class=\"form-control datepicker\" id=\"endAt\" formControlName=\"endAt\" [settings]=\"dateEndConfig\">\n </div>\n }\n </adb-filter-section>\n }\n @if(visibleFilters().area){\n <adb-filter-section [count]=\"areaCount\" titleResource=\"GEOGRAPHY\" [lazy]=\"true\">\n <ng-template>\n @if(visibleFilters().ownArea){\n <div role=\"tablist\" aria-label=\"{{'AREA'|translate}}\" class=\"d-flex gap-2 justify-content-end\">\n <button class=\"btn btn-link p-0\" [class.text-dark]=\"!hasOwnArea\" (click)=\"hasOwnArea=false\" role=\"tab\" id=\"tab-select\" aria-selected=\"{{!hasOwnArea}}\" aria-controls=\"panel-select\">\n {{'CHOOSE'|translate}}\n </button>\n <button class=\"btn btn-link p-0\" [class.text-dark]=\"hasOwnArea\" (click)=\"hasOwnArea=true\" role=\"tab\" id=\"tab-draw\" aria-selected=\"false\" aria-controls=\"panel-draw\">\n {{'OWN_AREA'|translate}}\n </button>\n </div>\n }\n <div class=\"mb-2\">\n @if(hasOwnArea&&visibleFilters().ownArea){\n <div class=\"pt-1\" role=\"tabpanel\" id=\"area-draw\" aria-labelledby=\"tab-draw\">\n <div>\n <adb-polygon-drawer formControlName=\"geo\"></adb-polygon-drawer>\n </div>\n </div>\n }@else{\n <div role=\"tabpanel\" id=\"area-select\" aria-labelledby=\"tab-select\">\n <div formArrayName=\"areas\">\n <div class=\"d-flex align-items-end mb-1\">\n <label>{{'AREAS'|translate}}</label>\n <button class=\"ms-auto text-dark btn btn-sm btn-secondary\" attr.aria-label=\"{{'OBSERVATION.ADD_AREA'|translate}}\" title=\"{{'OBSERVATION.ADD_AREA'|translate}}\" type=\"button\" (click)=\"addArea()\">\n <span class=\"bi bi-plus\"></span>\n </button>\n </div>\n @for (ctrl of areasArray.controls; track ctrl; let i = $index; let last = $last) {\n <div class=\"d-flex mb-2\">\n <adb-area-picker id=\"area-{{i}}\" [formControlName]=\"i\"></adb-area-picker>\n @if(areasArray.length>1){\n <button class=\"btn btn-secondary ms-1\" attr.aria-label=\"{{'DELETE'|translate}}\" title=\"{{'DELETE'|translate}}\" type=\"button\" (click)=\"removeArea(i)\">\n <span class=\"bi bi-trash\"></span>\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </ng-template>\n </adb-filter-section>\n }\n @if(form.get('taxonId')){\n @if(visibleFilters().taxaLists){\n <adb-filter-section [count]=\"taxonListCount\" titleResource=\"LISTS.NATURE_CONSERVATION_LISTS\">\n <div class=\"mb-3\">\n <app-treeview formControlName=\"list\" [nodes]=\"taxaLists\"></app-treeview>\n </div>\n {{'LISTS.READ_MORE'|translate}}\n <a [href]=\"artfakta\">{{'LISTS.LIST_CONTENT'|translate}}</a>\n </adb-filter-section>\n }\n @if(visibleFilters().datasources){\n <adb-filter-section [count]=\"dataSetCount\" titleResource=\"DATASET.DATASETS\">\n @if (form.get('ds')) {\n <div formArrayName=\"ds\">\n @for (item of dsControls; track item; let i = $index) {\n <div [formGroupName]=\"i\" class=\"form-check\">\n <input type=\"checkbox\" formControlName=\"selected\" [id]=\"'ds-' + item.value.id\" class=\"form-check-input\">\n <label [for]=\"'ds-' + item.value.id\" class=\"form-check-label\">{{ 'PROVIDERS.'+item.value.id |translate }}</label>\n </div>\n }\n </div>\n }\n </adb-filter-section>\n }\n }\n </div>\n <div class=\"d-flex justify-content-end gap-2\">\n @if (inline) {\n <a class=\"btn btn-secondary\" [routerLink]=\"[]\">\n {{'CANCEL'|translate}}\n </a>\n }\n <a [routerLink]=\"[]\" class=\"btn btn-secondary\" [queryParams]=\"null\">\n {{'CLEAR'|translate}}\n </a>\n <button type=\"submit\" class=\"btn btn-primary\" [disabled]=\"form.invalid||form.pristine\">{{'FILTER'|translate}}</button>\n </div>\n</form>\n}\n","import { CommonModule } from \"@angular/common\";\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { PolygonDrawerInput } from \"./components/map/polygon-drawer.component\";\nimport { RouterModule } from \"@angular/router\";\nimport { ADB_MAP_CONFIG, AdbMapConfig, AdbMapConfigService } from \"./config\";\nimport { TreeviewComponent } from \"./components/treeview\";\nimport { AdbMapComponent } from \"./components/map/adb-map\";\nimport { AdbLocationMapComponent } from \"./components/map/adb-location-map\";\nimport { AdbMapFilters } from \"./components/map-filter\";\nimport { AdbButtonsModule, AdbDirectivesModule, AdbDatePickerModule } from 'adb-shared';\nimport { AdbPipesModule } from 'adb-shared';\nimport { AdbFilterSectionModule } from 'adb-shared';\nimport { AdbPickerModule } from 'adb-shared';\nimport { TranslatePipe } from \"@ngx-translate/core\";\nimport { MapFeaturePickerComponent } from \"./components/map/map-feature-picker\";\nimport { MapLegendComponent } from \"./components/map/legend\";\n\n@NgModule({\n imports: [\n CommonModule,\n AdbButtonsModule,\n AdbDirectivesModule,\n FormsModule,\n RouterModule,\n ReactiveFormsModule,\n AdbDatePickerModule,\n AdbPipesModule,\n AdbFilterSectionModule,\n AdbPickerModule,\n TranslatePipe\n ],\n declarations: [\n AdbLocationMapComponent,\n MapFeaturePickerComponent,\n MapLegendComponent,\n AdbMapComponent,\n PolygonDrawerInput,\n AdbMapFilters,\n TreeviewComponent,\n // Stats,\n // AdbGeojsonPolygonDirective\n ],\n exports: [\n AdbLocationMapComponent,\n AdbMapComponent,\n PolygonDrawerInput,\n AdbMapFilters,\n // Stats,\n // AdbGeojsonPolygonDirective\n ],\n providers: [\n AdbMapConfigService\n ]\n})\nexport class AdbMapModule {\n static forRoot(config?: AdbMapConfig): ModuleWithProviders<AdbMapModule> {\n return {\n ngModule: AdbMapModule,\n providers: [\n {\n provide: ADB_MAP_CONFIG,\n useValue: config\n }\n ]\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAa,YAAY;CACvB,WAAW;CACX,WAAW;CACX,UAAU;CACV,aAAa;CACb,cAAc;CACd,QAAQ;AACT;AAED,MAAa,eAAe;CAC1B,0BAA0B;CAC1B,kCAAkC;CAClC,8BAA8B;CAC9B,qCAAqC;CACrC,iCAAiC;CACjC,6BAA6B;CAC7B,8BAA8B;CAC9B,+BAA+B;CAC/B,kCAAkC;CAClC,sCAAsC;CACtC,gBAAgB;CAChB,0BAA0B;CAC1B,0BAA0B;CAC1B,yBA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CAXW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAZ,OAAA,OAAA,GAAA,oBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,cAAA;GAtBrB;GACA;GACA;GACA;GACA;GACA;GACA;EAAiB;EAAA,SAAA;GAnBjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EAAa;EAAA,SAAA;GAcb;GACA;GACA;GACA;EAAa;CAAA,CAAA;CAQJ,OAAA,OAAA,GAAA,oBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,WAJZ,CACT,mBACD;EAAA,SAAA;GAjCC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EAAe;CAAA,CAAA;;AA0BN,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EArCxB,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,cAAc;IACZ;IACA;IACA;IACA;IACA;IACA;IACA;GAGD;GACD,SAAS;IACP;IACA;IACA;IACA;GAGD;GACD,WAAW,CACT,mBACD;EACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adb-shared",
3
- "version": "22.0.0-beta.0",
3
+ "version": "22.0.0-beta.1",
4
4
  "author": "ADB",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">= 22.x",
@@ -5,10 +5,10 @@ import { Extent } from "ol/extent.js";
5
5
  import Map from "ol/Map.js";
6
6
  import * as i11 from "@angular/router";
7
7
  import { ActivatedRoute, ParamMap, Params, Router } from "@angular/router";
8
- import { HttpClient } from "@angular/common/http";
9
8
  import * as i10 from "@angular/forms";
10
9
  import { ControlValueAccessor, FormArray, FormControl, FormGroup } from "@angular/forms";
11
- import { Subscription } from "rxjs";
10
+ import { Observable, Subscription } from "rxjs";
11
+ import { HttpClient } from "@angular/common/http";
12
12
  import * as i8 from "@angular/common";
13
13
  import * as i9 from "adb-shared";
14
14
  import * as i12 from "@ngx-translate/core";
@@ -20,7 +20,6 @@ export interface AdbMapConfig {
20
20
  api: string;
21
21
  artfaktaTaxonLists: string;
22
22
  dynamic?: boolean;
23
- gridOnly?: boolean;
24
23
  enableClusterSelection?: boolean;
25
24
  dataProviderIds?: readonly number[];
26
25
  }
@@ -31,7 +30,6 @@ export declare class AdbMapConfigService {
31
30
  readonly observationFeatures: string;
32
31
  readonly taxaListsApi: string;
33
32
  readonly dynamic: boolean;
34
- readonly gridOnly: boolean;
35
33
  readonly enableClusterSelection: boolean;
36
34
  readonly dataProviderIds: readonly number[] | undefined;
37
35
  constructor(config: AdbMapConfig);
@@ -186,13 +184,13 @@ export declare class AdbMapComponent implements AfterViewInit, OnDestroy {
186
184
  private activatedRoute;
187
185
  private config;
188
186
  private router;
189
- private http;
190
187
  showLegend: import("@angular/core").InputSignal<boolean>;
191
188
  showHeader: import("@angular/core").InputSignal<boolean>;
192
189
  allowPresentationMode: import("@angular/core").InputSignal<boolean>;
193
190
  presentationMode: import("@angular/core").InputSignal<MapPresentationMode>;
194
191
  private route;
195
192
  activePresentationMode: import("@angular/core").Signal<any>;
193
+ private readonly dataSource;
196
194
  private requestedParams;
197
195
  settingsOpen: import("@angular/core").WritableSignal<boolean>;
198
196
  savingSettings: import("@angular/core").WritableSignal<boolean>;
@@ -230,7 +228,7 @@ export declare class AdbMapComponent implements AfterViewInit, OnDestroy {
230
228
  map: Map;
231
229
  private mapReady;
232
230
  queryParams: Params;
233
- constructor(activatedRoute: ActivatedRoute, config: AdbMapConfigService, router: Router, http: HttpClient);
231
+ constructor(activatedRoute: ActivatedRoute, config: AdbMapConfigService, router: Router);
234
232
  ngAfterViewInit(): void;
235
233
  openSettings(): void;
236
234
  cancelSettings(button: HTMLButtonElement): void;
@@ -446,4 +444,22 @@ interface MapProvider {
446
444
  wms: boolean;
447
445
  params?: any;
448
446
  }
447
+ export interface AdbMapRequest {
448
+ url: string;
449
+ params: Params;
450
+ metersPerPixel: number;
451
+ dataProviderIds?: readonly number[];
452
+ }
453
+ export interface AdbMapDataSource {
454
+ load(request: AdbMapRequest): Observable<GeoJson>;
455
+ }
456
+ /** Default transport for the shared BFF observation-features contract. */
457
+ export declare class AdbBffMapDataSource implements AdbMapDataSource {
458
+ private readonly http;
459
+ load(request: AdbMapRequest): Observable<GeoJson>;
460
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdbBffMapDataSource, never>;
461
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
462
+ }
463
+ /** Applications normally use the default BFF source without overriding this token. */
464
+ export declare const ADB_MAP_DATA_SOURCE: InjectionToken<AdbMapDataSource>;
449
465
  export {};