geonetwork-ui 2.2.0-dev.3fffada2 → 2.2.0-dev.42331d67
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.
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +5 -4
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +8 -3
- package/esm2022/libs/feature/map/src/lib/geocoding/geocoding.component.mjs +76 -0
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +29 -13
- package/esm2022/translations/de.json +1 -0
- package/esm2022/translations/en.json +1 -0
- package/esm2022/translations/es.json +1 -0
- package/esm2022/translations/fr.json +1 -0
- package/esm2022/translations/it.json +1 -0
- package/esm2022/translations/nl.json +1 -0
- package/esm2022/translations/pt.json +1 -0
- package/fesm2022/geonetwork-ui.mjs +116 -22
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +1 -0
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +15 -2
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/feature-map.module.d.ts +13 -12
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts +20 -0
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +19 -7
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +1 -0
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +8 -5
- package/src/libs/feature/map/src/lib/feature-map.module.ts +3 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.css +0 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.html +39 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +83 -0
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +4 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.css +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +34 -11
- package/translations/de.json +1 -0
- package/translations/en.json +1 -0
- package/translations/es.json +1 -0
- package/translations/fr.json +1 -0
- package/translations/it.json +1 -0
- package/translations/nl.json +1 -0
- package/translations/pt.json +1 -0
- package/translations/sk.json +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/common/domain/src/lib/model/record/metadata.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,KAAK,IAAI,GAAG,MAAM,CAAA;AASlB,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,YAAY,GACZ,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,CAAA;AAOd,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAA;IACpB,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,qBAAqB,CAAA;AAEzE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;AAQ9C,eAAO,MAAM,kBAAkB,UAM9B,CAAA;AACD,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,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AK,GACL,MAAM,GACN,UAAU,GACV,aAAa,GACb,OAAO,CAAA;AAEX,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAA;AAErE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,SAAS,CAAA;IACf,GAAG,EAAE,GAAG,CAAA;IACR,qBAAqB,EAAE,eAAe,CAAA;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAIlB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"metadata.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/common/domain/src/lib/model/record/metadata.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,KAAK,IAAI,GAAG,MAAM,CAAA;AASlB,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,YAAY,GACZ,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,CAAA;AAOd,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAA;IACpB,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,qBAAqB,CAAA;AAEzE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;AAQ9C,eAAO,MAAM,kBAAkB,UAM9B,CAAA;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AAA;IACX,GAAG,EAAE,IAAI,CAAA;IACT,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,IAAI,EAAE,SAAS,CAAA;IACf,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;IACtC,MAAM,EAAE,YAAY,CAAA;IACpB,cAAc,CAAC,EAAE,IAAI,CAAA;IACrB,cAAc,CAAC,EAAE,IAAI,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACzC,cAAc,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAA;IAC3C,eAAe,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAA;IAC7C,qBAAqB,CAAC,EAAE,yBAAyB,CAAA;CAClD;AAED,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,MAAM,CAAA;AAE3D,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,GAAG,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,eAAe,GAAG,kBAAkB,CAAC,GAAG;IAC3E,IAAI,EAAE,yBAAyB,CAAA;CAChC,CAAA;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,IAAI,EAAE,SAAS,CAAA;IACf,eAAe,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAA;CAC9C;AAED,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,aAAa,CAAA"}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
+
import { WfsVersion } from '@camptocamp/ogc-client';
|
|
1
2
|
import { BaseReader } from '../../../../../../libs/util/data-fetcher/src';
|
|
2
3
|
import { ProxyService } from '../../../../../../libs/util/shared/src';
|
|
3
4
|
import type { FeatureCollection } from 'geojson';
|
|
4
5
|
import { Observable } from 'rxjs';
|
|
5
6
|
import { DatasetDistribution, DatasetServiceDistribution } from '../../../../../../libs/common/domain/src/lib/model/record';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
interface WfsDownloadUrls {
|
|
9
|
+
all: {
|
|
10
|
+
[format: string]: string;
|
|
11
|
+
};
|
|
12
|
+
geojson: string;
|
|
13
|
+
gml: {
|
|
14
|
+
featureUrl: string;
|
|
15
|
+
namespace: string;
|
|
16
|
+
wfsVersion: WfsVersion;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
7
19
|
export declare class DataService {
|
|
8
20
|
private proxy;
|
|
9
21
|
constructor(proxy: ProxyService);
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
getDownloadUrlsFromWfs(wfsUrl: string, featureTypeName: string): Observable<WfsDownloadUrls>;
|
|
23
|
+
getDownloadUrlFromEsriRest(apiUrl: string, format: string): string;
|
|
12
24
|
getDownloadLinksFromWfs(wfsLink: DatasetServiceDistribution): Observable<DatasetDistribution[]>;
|
|
13
25
|
getDownloadLinksFromEsriRest(esriRestLink: DatasetServiceDistribution): DatasetDistribution[];
|
|
14
26
|
readAsGeoJson(link: DatasetDistribution): Observable<FeatureCollection>;
|
|
@@ -16,4 +28,5 @@ export declare class DataService {
|
|
|
16
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataService, never>;
|
|
17
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<DataService>;
|
|
18
30
|
}
|
|
31
|
+
export {};
|
|
19
32
|
//# sourceMappingURL=data.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/dataviz/src/lib/service/data.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/dataviz/src/lib/service/data.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EACL,UAAU,EAKX,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAIL,YAAY,EACb,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAQ,UAAU,EAAc,MAAM,MAAM,CAAA;AAEnD,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,2DAA2D,CAAA;;AAalE,UAAU,eAAe;IACvB,GAAG,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,UAAU,CAAA;KAAE,CAAA;CACvE;AAED,qBAGa,WAAW;IACV,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY;IAEvC,sBAAsB,CACpB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,UAAU,CAAC,eAAe,CAAC;IAwE9B,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMlE,uBAAuB,CACrB,OAAO,EAAE,0BAA0B,GAClC,UAAU,CAAC,mBAAmB,EAAE,CAAC;IAoBpC,4BAA4B,CAC1B,YAAY,EAAE,0BAA0B,GACvC,mBAAmB,EAAE;IAUxB,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAUvE,UAAU,CAAC,IAAI,EAAE,mBAAmB,GAAG,UAAU,CAAC,UAAU,CAAC;yCAhIlD,WAAW;6CAAX,WAAW;CAsKvB"}
|
|
@@ -8,20 +8,21 @@ import * as i6 from "./add-layer-from-catalog/add-layer-record-preview/add-layer
|
|
|
8
8
|
import * as i7 from "./add-layer-from-wms/add-layer-from-wms.component";
|
|
9
9
|
import * as i8 from "./add-layer-from-file/add-layer-from-file.component";
|
|
10
10
|
import * as i9 from "./add-layer-from-wfs/add-layer-from-wfs.component";
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "
|
|
13
|
-
import * as i12 from "../../../../ui/
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "@angular/material/
|
|
16
|
-
import * as i15 from "@
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "
|
|
19
|
-
import * as i18 from "@ngrx/
|
|
20
|
-
import * as i19 from "
|
|
21
|
-
import * as i20 from "../../../../ui/
|
|
11
|
+
import * as i10 from "./geocoding/geocoding.component";
|
|
12
|
+
import * as i11 from "@angular/common";
|
|
13
|
+
import * as i12 from "../../../../ui/map/src/lib/ui-map.module";
|
|
14
|
+
import * as i13 from "../../../../ui/layout/src/lib/ui-layout.module";
|
|
15
|
+
import * as i14 from "@angular/material/icon";
|
|
16
|
+
import * as i15 from "@angular/material/tabs";
|
|
17
|
+
import * as i16 from "@ngx-translate/core";
|
|
18
|
+
import * as i17 from "../../../search/src/lib/feature-search.module";
|
|
19
|
+
import * as i18 from "@ngrx/store";
|
|
20
|
+
import * as i19 from "@ngrx/effects";
|
|
21
|
+
import * as i20 from "../../../../ui/elements/src/lib/ui-elements.module";
|
|
22
|
+
import * as i21 from "../../../../ui/inputs/src/lib/ui-inputs.module";
|
|
22
23
|
export declare class FeatureMapModule {
|
|
23
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureMapModule, never>;
|
|
24
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FeatureMapModule, [typeof i1.MapContextComponent, typeof i2.MapInstanceDirective, typeof i3.LayersPanelComponent, typeof i4.AddLayerFromCatalogComponent, typeof i5.MapContainerComponent, typeof i6.AddLayerRecordPreviewComponent, typeof i7.AddLayerFromWmsComponent, typeof i8.AddLayerFromFileComponent, typeof i9.AddLayerFromWfsComponent], [typeof
|
|
25
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FeatureMapModule, [typeof i1.MapContextComponent, typeof i2.MapInstanceDirective, typeof i3.LayersPanelComponent, typeof i4.AddLayerFromCatalogComponent, typeof i5.MapContainerComponent, typeof i6.AddLayerRecordPreviewComponent, typeof i7.AddLayerFromWmsComponent, typeof i8.AddLayerFromFileComponent, typeof i9.AddLayerFromWfsComponent, typeof i10.GeocodingComponent], [typeof i11.CommonModule, typeof i12.UiMapModule, typeof i13.UiLayoutModule, typeof i14.MatIconModule, typeof i15.MatTabsModule, typeof i16.TranslateModule, typeof i17.FeatureSearchModule, typeof i18.StoreFeatureModule, typeof i19.EffectsFeatureModule, typeof i20.UiElementsModule, typeof i21.UiInputsModule], [typeof i1.MapContextComponent, typeof i2.MapInstanceDirective, typeof i3.LayersPanelComponent, typeof i4.AddLayerFromCatalogComponent, typeof i5.MapContainerComponent, typeof i10.GeocodingComponent]>;
|
|
25
26
|
static ɵinj: i0.ɵɵInjectorDeclaration<FeatureMapModule>;
|
|
26
27
|
}
|
|
27
28
|
//# sourceMappingURL=feature-map.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-map.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/map/src/lib/feature-map.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-map.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/map/src/lib/feature-map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2BA,qBA0Ca,gBAAgB;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAAG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { MapManagerService } from '../manager/map-manager.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class GeocodingComponent implements OnDestroy {
|
|
6
|
+
private mapManager;
|
|
7
|
+
searchText: string;
|
|
8
|
+
results: any[];
|
|
9
|
+
searchTextChanged: Subject<string>;
|
|
10
|
+
destroy$: Subject<void>;
|
|
11
|
+
constructor(mapManager: MapManagerService);
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
onSearchChange(searchText: string): void;
|
|
14
|
+
clearSearch(): void;
|
|
15
|
+
zoomToLocation(result: any): void;
|
|
16
|
+
onEnterPress(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GeocodingComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GeocodingComponent, "gn-ui-geocoding", never, {}, {}, never, never, false, never>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=geocoding.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geocoding.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/geocoding/geocoding.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAoB,OAAO,EAAa,MAAM,MAAM,CAAA;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;;AAIlE,qBAKa,kBAAmB,YAAW,SAAS;IAMtC,OAAO,CAAC,UAAU;IAL9B,UAAU,SAAK;IACf,OAAO,EAAE,GAAG,EAAE,CAAK;IACnB,iBAAiB,kBAAwB;IACzC,QAAQ,gBAAsB;gBAEV,UAAU,EAAE,iBAAiB;IAuBjD,WAAW;IAKX,cAAc,CAAC,UAAU,EAAE,MAAM;IASjC,WAAW;IAKX,cAAc,CAAC,MAAM,KAAA;IAgBrB,YAAY;yCAhED,kBAAkB;2CAAlB,kBAAkB;CAqE9B"}
|
|
@@ -14,7 +14,7 @@ export declare class DownloadsListComponent {
|
|
|
14
14
|
isFilterActive(filter: FilterFormat): boolean;
|
|
15
15
|
getFilterFormatTitle(format: FilterFormat): any;
|
|
16
16
|
isLinkOfFormat(link: DatasetDistribution, format: FilterFormat): boolean;
|
|
17
|
-
getLinkFormat(link: DatasetDistribution): "json" | "pdf" | "geojson" | "svg" | "csv" | "excel" | "shp" | "kml" | "gpkg" | "zip" | "jpg";
|
|
17
|
+
getLinkFormat(link: DatasetDistribution): "json" | "pdf" | "geojson" | "svg" | "csv" | "excel" | "shp" | "gml" | "kml" | "gpkg" | "zip" | "jpg" | "dxf";
|
|
18
18
|
getLinkColor(link: DatasetDistribution): string;
|
|
19
19
|
isFromWfs(link: DatasetDistribution): boolean;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<DownloadsListComponent, never>;
|
|
@@ -30,47 +30,59 @@ export declare const FORMATS: {
|
|
|
30
30
|
readonly color: "#328556";
|
|
31
31
|
readonly mimeTypes: readonly ["x-gis/x-shapefile"];
|
|
32
32
|
};
|
|
33
|
+
readonly gml: {
|
|
34
|
+
readonly extensions: readonly ["gml"];
|
|
35
|
+
readonly priority: 5;
|
|
36
|
+
readonly color: "#c92bce";
|
|
37
|
+
readonly mimeTypes: readonly ["application/gml+xml", "text/xml; subtype=gml"];
|
|
38
|
+
};
|
|
33
39
|
readonly kml: {
|
|
34
40
|
readonly extensions: readonly ["kml", "kmz"];
|
|
35
|
-
readonly priority:
|
|
41
|
+
readonly priority: 6;
|
|
36
42
|
readonly color: "#348009";
|
|
37
43
|
readonly mimeTypes: readonly ["application/vnd.google-earth.kml+xml", "application/vnd.google-earth.kmz"];
|
|
38
44
|
};
|
|
39
45
|
readonly gpkg: {
|
|
40
46
|
readonly extensions: readonly ["gpkg", "geopackage"];
|
|
41
|
-
readonly priority:
|
|
47
|
+
readonly priority: 7;
|
|
42
48
|
readonly color: "#ea79ba";
|
|
43
49
|
readonly mimeTypes: readonly ["application/geopackage+sqlite3"];
|
|
44
50
|
};
|
|
45
51
|
readonly zip: {
|
|
46
52
|
readonly extensions: readonly ["zip", "tar.gz"];
|
|
47
|
-
readonly priority:
|
|
53
|
+
readonly priority: 8;
|
|
48
54
|
readonly color: "#f2bb3a";
|
|
49
55
|
readonly mimeTypes: readonly ["application/zip", "application/x-zip"];
|
|
50
56
|
};
|
|
51
57
|
readonly pdf: {
|
|
52
58
|
readonly extensions: readonly ["pdf"];
|
|
53
|
-
readonly priority:
|
|
59
|
+
readonly priority: 9;
|
|
54
60
|
readonly color: "#db544a";
|
|
55
61
|
readonly mimeTypes: readonly ["application/pdf"];
|
|
56
62
|
};
|
|
57
63
|
readonly jpg: {
|
|
58
64
|
readonly extensions: readonly ["jpg", "jpeg", "jfif", "pjpeg", "pjp"];
|
|
59
|
-
readonly priority:
|
|
65
|
+
readonly priority: 9;
|
|
60
66
|
readonly color: "#673ab7";
|
|
61
67
|
readonly mimeTypes: readonly ["image/jpg"];
|
|
62
68
|
};
|
|
63
69
|
readonly svg: {
|
|
64
70
|
readonly extensions: readonly ["svg"];
|
|
65
|
-
readonly priority:
|
|
71
|
+
readonly priority: 10;
|
|
66
72
|
readonly color: "#d98294";
|
|
67
73
|
readonly mimeTypes: readonly ["image/svg+xml"];
|
|
68
74
|
};
|
|
75
|
+
readonly dxf: {
|
|
76
|
+
readonly extensions: readonly ["dxf"];
|
|
77
|
+
readonly priority: 11;
|
|
78
|
+
readonly color: "#de630b";
|
|
79
|
+
readonly mimeTypes: readonly ["application/x-dxf", "image/x-dxf"];
|
|
80
|
+
};
|
|
69
81
|
};
|
|
70
82
|
export type FileFormat = keyof typeof FORMATS;
|
|
71
83
|
export declare function getFormatPriority(linkFormat: FileFormat): number;
|
|
72
84
|
export declare function getLinkPriority(link: DatasetDistribution): number;
|
|
73
|
-
export declare function
|
|
85
|
+
export declare function getFileFormatFromServiceOutput(serviceOutput: string): FileFormat | null;
|
|
74
86
|
export declare function getFileFormat(link: DatasetDistribution): FileFormat;
|
|
75
87
|
export declare function isFormatInQueryParam(link: DatasetDistribution, alias: string): boolean;
|
|
76
88
|
export declare function mimeTypeToFormat(mimeType: string): FileFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAA;AAI/F,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAA;AAI/F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FV,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAA;AAE7C,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAUhE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAEjE;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,GACpB,UAAU,GAAG,IAAI,CAgBnB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,UAAU,CAcnE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,MAAM,GACZ,OAAO,CAQT;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAO7D;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,UAAU,GACjB,OAAO,CAMT;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAQ5D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CA0B9D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAEtE"}
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
SupportedTypes,
|
|
10
10
|
} from '../../../../../../libs/util/data-fetcher/src'
|
|
11
11
|
import {
|
|
12
|
-
extensionToFormat,
|
|
13
12
|
getFileFormat,
|
|
13
|
+
getFileFormatFromServiceOutput,
|
|
14
14
|
getMimeTypeForFormat,
|
|
15
15
|
ProxyService,
|
|
16
16
|
} from '../../../../../../libs/util/shared/src'
|
|
@@ -45,7 +45,7 @@ interface WfsDownloadUrls {
|
|
|
45
45
|
export class DataService {
|
|
46
46
|
constructor(private proxy: ProxyService) {}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
getDownloadUrlsFromWfs(
|
|
49
49
|
wfsUrl: string,
|
|
50
50
|
featureTypeName: string
|
|
51
51
|
): Observable<WfsDownloadUrls> {
|
|
@@ -120,7 +120,7 @@ export class DataService {
|
|
|
120
120
|
)
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
getDownloadUrlFromEsriRest(apiUrl: string, format: string): string {
|
|
124
124
|
return this.proxy.getProxiedUrl(
|
|
125
125
|
`${apiUrl}/query?f=${format}&where=1=1&outFields=*`
|
|
126
126
|
)
|
|
@@ -138,8 +138,11 @@ export class DataService {
|
|
|
138
138
|
map((urls) =>
|
|
139
139
|
Object.keys(urls).map((format) => ({
|
|
140
140
|
...wfsLink,
|
|
141
|
+
type: 'download',
|
|
141
142
|
url: new URL(urls[format]),
|
|
142
|
-
mimeType: getMimeTypeForFormat(
|
|
143
|
+
mimeType: getMimeTypeForFormat(
|
|
144
|
+
getFileFormatFromServiceOutput(format)
|
|
145
|
+
),
|
|
143
146
|
}))
|
|
144
147
|
)
|
|
145
148
|
)
|
|
@@ -153,7 +156,7 @@ export class DataService {
|
|
|
153
156
|
url: new URL(
|
|
154
157
|
this.getDownloadUrlFromEsriRest(esriRestLink.url.toString(), format)
|
|
155
158
|
),
|
|
156
|
-
mimeType: getMimeTypeForFormat(
|
|
159
|
+
mimeType: getMimeTypeForFormat(getFileFormatFromServiceOutput(format)),
|
|
157
160
|
}))
|
|
158
161
|
}
|
|
159
162
|
|
|
@@ -23,6 +23,7 @@ import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
|
23
23
|
import { AddLayerFromWmsComponent } from './add-layer-from-wms/add-layer-from-wms.component'
|
|
24
24
|
import { AddLayerFromFileComponent } from './add-layer-from-file/add-layer-from-file.component'
|
|
25
25
|
import { AddLayerFromWfsComponent } from './add-layer-from-wfs/add-layer-from-wfs.component'
|
|
26
|
+
import { GeocodingComponent } from './geocoding/geocoding.component'
|
|
26
27
|
|
|
27
28
|
@NgModule({
|
|
28
29
|
declarations: [
|
|
@@ -35,6 +36,7 @@ import { AddLayerFromWfsComponent } from './add-layer-from-wfs/add-layer-from-wf
|
|
|
35
36
|
AddLayerFromWmsComponent,
|
|
36
37
|
AddLayerFromFileComponent,
|
|
37
38
|
AddLayerFromWfsComponent,
|
|
39
|
+
GeocodingComponent,
|
|
38
40
|
],
|
|
39
41
|
exports: [
|
|
40
42
|
MapContextComponent,
|
|
@@ -42,6 +44,7 @@ import { AddLayerFromWfsComponent } from './add-layer-from-wfs/add-layer-from-wf
|
|
|
42
44
|
LayersPanelComponent,
|
|
43
45
|
AddLayerFromCatalogComponent,
|
|
44
46
|
MapContainerComponent,
|
|
47
|
+
GeocodingComponent,
|
|
45
48
|
],
|
|
46
49
|
imports: [
|
|
47
50
|
CommonModule,
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<gn-ui-search-input
|
|
2
|
+
[(value)]="searchText"
|
|
3
|
+
(valueChange)="onSearchChange($event)"
|
|
4
|
+
(keyup.enter)="onEnterPress()"
|
|
5
|
+
[placeholder]="'map.geocoding.placeholder' | translate"
|
|
6
|
+
>
|
|
7
|
+
</gn-ui-search-input>
|
|
8
|
+
<ul
|
|
9
|
+
class="bg-gray-50 border border-gray-200 w-full mt-2 shadow-sm rounded-lg"
|
|
10
|
+
*ngIf="results && results.length"
|
|
11
|
+
>
|
|
12
|
+
<li
|
|
13
|
+
*ngFor="let result of results"
|
|
14
|
+
(click)="zoomToLocation(result)"
|
|
15
|
+
class="flex items-center pl-8 pr-4 py-2 border-b border-gray-200 relative cursor-pointer hover:bg-blue-100 hover:text-gray-800 transition duration-300 ease-in-out"
|
|
16
|
+
>
|
|
17
|
+
<svg
|
|
18
|
+
class="stroke-current text-blue-500 absolute w-5 h-5 left-3 top-3"
|
|
19
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
+
fill="none"
|
|
21
|
+
viewBox="0 0 24 24"
|
|
22
|
+
stroke="currentColor"
|
|
23
|
+
>
|
|
24
|
+
<path
|
|
25
|
+
stroke-linecap="round"
|
|
26
|
+
stroke-linejoin="round"
|
|
27
|
+
stroke-width="2"
|
|
28
|
+
d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
29
|
+
/>
|
|
30
|
+
<path
|
|
31
|
+
stroke-linecap="round"
|
|
32
|
+
stroke-linejoin="round"
|
|
33
|
+
stroke-width="2"
|
|
34
|
+
d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"
|
|
35
|
+
/>
|
|
36
|
+
</svg>
|
|
37
|
+
<span class="font-sans font-semibold ml-4">{{ result.label }}</span>
|
|
38
|
+
</li>
|
|
39
|
+
</ul>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Component, OnDestroy } from '@angular/core'
|
|
2
|
+
import { queryGeoadmin, GeoadminOptions } from '@geospatial-sdk/geocoding'
|
|
3
|
+
import { catchError, from, Subject, takeUntil } from 'rxjs'
|
|
4
|
+
import { debounceTime, switchMap } from 'rxjs/operators'
|
|
5
|
+
import { MapManagerService } from '../manager/map-manager.service'
|
|
6
|
+
import { fromLonLat } from 'ol/proj'
|
|
7
|
+
import { Polygon } from 'ol/geom'
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'gn-ui-geocoding',
|
|
11
|
+
templateUrl: './geocoding.component.html',
|
|
12
|
+
styleUrls: ['./geocoding.component.css'],
|
|
13
|
+
})
|
|
14
|
+
export class GeocodingComponent implements OnDestroy {
|
|
15
|
+
searchText = ''
|
|
16
|
+
results: any[] = []
|
|
17
|
+
searchTextChanged = new Subject<string>()
|
|
18
|
+
destroy$ = new Subject<void>()
|
|
19
|
+
|
|
20
|
+
constructor(private mapManager: MapManagerService) {
|
|
21
|
+
this.searchTextChanged
|
|
22
|
+
.pipe(
|
|
23
|
+
debounceTime(300),
|
|
24
|
+
switchMap((searchText) => {
|
|
25
|
+
const options: GeoadminOptions = {
|
|
26
|
+
origins: ['zipcode', 'gg25', 'address'],
|
|
27
|
+
limit: 6,
|
|
28
|
+
}
|
|
29
|
+
return from(queryGeoadmin(searchText, options)).pipe(
|
|
30
|
+
catchError((error) => {
|
|
31
|
+
console.error(error)
|
|
32
|
+
return []
|
|
33
|
+
})
|
|
34
|
+
)
|
|
35
|
+
}),
|
|
36
|
+
takeUntil(this.destroy$)
|
|
37
|
+
)
|
|
38
|
+
.subscribe((results) => {
|
|
39
|
+
this.results = results
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ngOnDestroy() {
|
|
44
|
+
this.destroy$.next()
|
|
45
|
+
this.destroy$.complete()
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
onSearchChange(searchText: string) {
|
|
49
|
+
if (!searchText) {
|
|
50
|
+
this.clearSearch()
|
|
51
|
+
return
|
|
52
|
+
} else {
|
|
53
|
+
this.searchTextChanged.next(searchText)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
clearSearch() {
|
|
58
|
+
this.searchText = ''
|
|
59
|
+
this.results = []
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
zoomToLocation(result) {
|
|
63
|
+
const map = this.mapManager.map
|
|
64
|
+
const view = map.getView()
|
|
65
|
+
const geometry = result.geom
|
|
66
|
+
|
|
67
|
+
const polygonCoords = geometry.coordinates
|
|
68
|
+
const transformedCoords = polygonCoords[0].map((coord) => fromLonLat(coord))
|
|
69
|
+
|
|
70
|
+
const polygon = new Polygon([transformedCoords])
|
|
71
|
+
|
|
72
|
+
view.fit(polygon, {
|
|
73
|
+
duration: 100,
|
|
74
|
+
maxZoom: 12,
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
onEnterPress() {
|
|
79
|
+
if (this.results && this.results.length > 0) {
|
|
80
|
+
this.zoomToLocation(this.results[0])
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
>
|
|
9
9
|
record.metadata.download
|
|
10
10
|
</p>
|
|
11
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
class="flex flex-wrap justify-start sm:justify-end sm:pb-4"
|
|
13
|
+
data-cy="download-format-filters"
|
|
14
|
+
>
|
|
12
15
|
<gn-ui-button
|
|
13
16
|
class="m-1 format-filter"
|
|
14
17
|
[extraClass]="
|
|
@@ -43,9 +43,15 @@ export const FORMATS = {
|
|
|
43
43
|
color: '#328556',
|
|
44
44
|
mimeTypes: ['x-gis/x-shapefile'],
|
|
45
45
|
},
|
|
46
|
+
gml: {
|
|
47
|
+
extensions: ['gml'],
|
|
48
|
+
priority: 5,
|
|
49
|
+
color: '#c92bce',
|
|
50
|
+
mimeTypes: ['application/gml+xml', 'text/xml; subtype=gml'],
|
|
51
|
+
},
|
|
46
52
|
kml: {
|
|
47
53
|
extensions: ['kml', 'kmz'],
|
|
48
|
-
priority:
|
|
54
|
+
priority: 6,
|
|
49
55
|
color: '#348009',
|
|
50
56
|
mimeTypes: [
|
|
51
57
|
'application/vnd.google-earth.kml+xml',
|
|
@@ -54,34 +60,40 @@ export const FORMATS = {
|
|
|
54
60
|
},
|
|
55
61
|
gpkg: {
|
|
56
62
|
extensions: ['gpkg', 'geopackage'],
|
|
57
|
-
priority:
|
|
63
|
+
priority: 7,
|
|
58
64
|
color: '#ea79ba',
|
|
59
65
|
mimeTypes: ['application/geopackage+sqlite3'],
|
|
60
66
|
},
|
|
61
67
|
zip: {
|
|
62
68
|
extensions: ['zip', 'tar.gz'],
|
|
63
|
-
priority:
|
|
69
|
+
priority: 8,
|
|
64
70
|
color: '#f2bb3a',
|
|
65
71
|
mimeTypes: ['application/zip', 'application/x-zip'],
|
|
66
72
|
},
|
|
67
73
|
pdf: {
|
|
68
74
|
extensions: ['pdf'],
|
|
69
|
-
priority:
|
|
75
|
+
priority: 9,
|
|
70
76
|
color: '#db544a',
|
|
71
77
|
mimeTypes: ['application/pdf'],
|
|
72
78
|
},
|
|
73
79
|
jpg: {
|
|
74
80
|
extensions: ['jpg', 'jpeg', 'jfif', 'pjpeg', 'pjp'],
|
|
75
|
-
priority:
|
|
81
|
+
priority: 9,
|
|
76
82
|
color: '#673ab7',
|
|
77
83
|
mimeTypes: ['image/jpg'],
|
|
78
84
|
},
|
|
79
85
|
svg: {
|
|
80
86
|
extensions: ['svg'],
|
|
81
|
-
priority:
|
|
87
|
+
priority: 10,
|
|
82
88
|
color: '#d98294',
|
|
83
89
|
mimeTypes: ['image/svg+xml'],
|
|
84
90
|
},
|
|
91
|
+
dxf: {
|
|
92
|
+
extensions: ['dxf'],
|
|
93
|
+
priority: 11,
|
|
94
|
+
color: '#de630b',
|
|
95
|
+
mimeTypes: ['application/x-dxf', 'image/x-dxf'],
|
|
96
|
+
},
|
|
85
97
|
} as const
|
|
86
98
|
|
|
87
99
|
export type FileFormat = keyof typeof FORMATS
|
|
@@ -102,13 +114,24 @@ export function getLinkPriority(link: DatasetDistribution): number {
|
|
|
102
114
|
return getFormatPriority(getFileFormat(link))
|
|
103
115
|
}
|
|
104
116
|
|
|
105
|
-
export function
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
117
|
+
export function getFileFormatFromServiceOutput(
|
|
118
|
+
serviceOutput: string
|
|
119
|
+
): FileFormat | null {
|
|
120
|
+
function formatMatcher(format: typeof FORMATS[FileFormat]): boolean {
|
|
121
|
+
const output = serviceOutput.toLowerCase()
|
|
122
|
+
return (
|
|
123
|
+
format.extensions.some((extension: string) =>
|
|
124
|
+
output.includes(extension)
|
|
125
|
+
) ||
|
|
126
|
+
format.mimeTypes.some((mimeType: string) => output.includes(mimeType))
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
for (const formatName in FORMATS) {
|
|
130
|
+
if (formatMatcher(FORMATS[formatName])) {
|
|
131
|
+
return formatName as FileFormat
|
|
109
132
|
}
|
|
110
133
|
}
|
|
111
|
-
return
|
|
134
|
+
return null
|
|
112
135
|
}
|
|
113
136
|
|
|
114
137
|
export function getFileFormat(link: DatasetDistribution): FileFormat {
|
package/translations/de.json
CHANGED
|
@@ -177,6 +177,7 @@
|
|
|
177
177
|
"map.add.layer.wfs": "Aus WFS",
|
|
178
178
|
"map.add.layer.wms": "Aus WMS",
|
|
179
179
|
"map.addFromFile.placeholder": "Klicke hier oder ziehe eine Datei herein",
|
|
180
|
+
"map.geocoding.placeholder": "",
|
|
180
181
|
"map.help.addFromFile": "Klicke oder ziehe eine Datei herein um eine Karte hinzuzufügen (momentan wird nur das GeoJSON-Format unterstützt).",
|
|
181
182
|
"map.layer.add": "Hinzufügen",
|
|
182
183
|
"map.layers.available": "Verfügbare Layer",
|
package/translations/en.json
CHANGED
|
@@ -177,6 +177,7 @@
|
|
|
177
177
|
"map.add.layer.wfs": "From WFS",
|
|
178
178
|
"map.add.layer.wms": "From WMS",
|
|
179
179
|
"map.addFromFile.placeholder": "Click or drop a file here",
|
|
180
|
+
"map.geocoding.placeholder": "Search for a place",
|
|
180
181
|
"map.help.addFromFile": "Click or drag and drop a file to add to the map (currently supports GeoJSON format only).",
|
|
181
182
|
"map.layer.add": "Add",
|
|
182
183
|
"map.layers.available": "Available Layers",
|
package/translations/es.json
CHANGED
package/translations/fr.json
CHANGED
package/translations/it.json
CHANGED
package/translations/nl.json
CHANGED
package/translations/pt.json
CHANGED
package/translations/sk.json
CHANGED