@regionerne/gis-komponent 0.0.57 → 0.0.59
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.
|
@@ -2291,7 +2291,10 @@ class DocumentSearchService extends SearchProviderBase {
|
|
|
2291
2291
|
layer: l.name,
|
|
2292
2292
|
propertyName: l.documentSearchDisplayProperty,
|
|
2293
2293
|
propertyHeader: l.documentSearchDisplayHeader,
|
|
2294
|
-
items: f.features.map(f =>
|
|
2294
|
+
items: f.features.map(f => ({
|
|
2295
|
+
url: f.properties[l.documentSearchDisplayProperty],
|
|
2296
|
+
header: f.properties[l.documentSearchDisplayHeader] ?? 'Dokument'
|
|
2297
|
+
}))
|
|
2295
2298
|
};
|
|
2296
2299
|
}
|
|
2297
2300
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentSearchService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -2378,6 +2381,7 @@ class ShowDocumentInfoService {
|
|
|
2378
2381
|
}
|
|
2379
2382
|
stop() {
|
|
2380
2383
|
this._currentlyActive = undefined;
|
|
2384
|
+
this._features.next(null);
|
|
2381
2385
|
if (this._listenKey) {
|
|
2382
2386
|
unByKey(this._listenKey);
|
|
2383
2387
|
this._listenKey = null;
|
|
@@ -2387,7 +2391,6 @@ class ShowDocumentInfoService {
|
|
|
2387
2391
|
this._currentlyActive = 'point';
|
|
2388
2392
|
this._listenKey = this._current.map?.on('singleclick', evt => {
|
|
2389
2393
|
const map = this._current.map;
|
|
2390
|
-
// const coordinate25832 = evt.coordinate;
|
|
2391
2394
|
const pixel = evt.pixel; // CSS-pixels
|
|
2392
2395
|
const pixelRadius = 8; // hold den fast – ingen DPR
|
|
2393
2396
|
// to koordinater med pixel-afstand = pixelRadius
|
|
@@ -2400,11 +2403,9 @@ class ShowDocumentInfoService {
|
|
|
2400
2403
|
const MIN_M = 0.5;
|
|
2401
2404
|
const MAX_M = 25;
|
|
2402
2405
|
meterRadius = Math.max(MIN_M, Math.min(meterRadius, MAX_M));
|
|
2403
|
-
console.log('meterRadius', meterRadius);
|
|
2404
2406
|
const point = new Point$1(evt.coordinate);
|
|
2405
2407
|
this._documentSearch.search({ kind: 'point', distance: meterRadius, value: point }, 100).subscribe({
|
|
2406
2408
|
next: result => {
|
|
2407
|
-
console.log("🚀 ~ ShowDocumentInfoService ~ _startByPoint ~ result:", result);
|
|
2408
2409
|
this._features.next(result);
|
|
2409
2410
|
}
|
|
2410
2411
|
});
|
|
@@ -3037,6 +3038,7 @@ class ToolboxComponent {
|
|
|
3037
3038
|
_enablePointSearch() {
|
|
3038
3039
|
if (this.activeMode === 'search-point')
|
|
3039
3040
|
this.geometrySearchResult = [];
|
|
3041
|
+
this._disablePointSearch();
|
|
3040
3042
|
this.pointClickKey = this.map.on('singleclick', (evt) => {
|
|
3041
3043
|
const point = new Point$1(evt.coordinate);
|
|
3042
3044
|
if (this.activeMode === 'search-point') {
|
|
@@ -3189,6 +3191,10 @@ class ToolboxComponent {
|
|
|
3189
3191
|
try {
|
|
3190
3192
|
const feature = wktFormat.readFeature(this.WKTString, { featureProjection: 'EPSG:25832', dataProjection: 'EPSG:25832' });
|
|
3191
3193
|
const featureType = feature.getGeometry()?.getType();
|
|
3194
|
+
if (featureType !== this.selectedDrawItem.geomType) {
|
|
3195
|
+
this._confirmService.open({ message: `WKTen kan ikke indlæses, for dens geometritype er ${featureType} men den valgte type er ${this.selectedDrawItem.geomType}`, primaryText: 'Ok', title: 'Advarsel' }).subscribe();
|
|
3196
|
+
return;
|
|
3197
|
+
}
|
|
3192
3198
|
this._settingsHelper.getStyle(this.selectedDrawItem?.style, this.profile.styleRepositoryWorkspace, this.profile.styleRepositoryGeoserver, featureType).subscribe({
|
|
3193
3199
|
next: featureStyle => {
|
|
3194
3200
|
if (featureType === 'Polygon') {
|
|
@@ -3337,7 +3343,9 @@ class ToolboxComponent {
|
|
|
3337
3343
|
// Set the first item as default
|
|
3338
3344
|
if (!this.selectedDrawItem && this.drawItems && this.drawItems.length > 0) {
|
|
3339
3345
|
this.selectedDrawItem = this.drawItems[0];
|
|
3340
|
-
|
|
3346
|
+
}
|
|
3347
|
+
// Actually start drawing immediately
|
|
3348
|
+
if (this.selectedDrawItem) {
|
|
3341
3349
|
this._doStartDraw(this.selectedDrawItem);
|
|
3342
3350
|
}
|
|
3343
3351
|
}
|
|
@@ -3685,7 +3693,9 @@ class ToolboxComponent {
|
|
|
3685
3693
|
if (this.pointClickKey) {
|
|
3686
3694
|
unByKey(this.pointClickKey);
|
|
3687
3695
|
}
|
|
3696
|
+
this._disablePointSearch();
|
|
3688
3697
|
this._documentSearch.stop();
|
|
3698
|
+
this._showInfo.stopShowInfo();
|
|
3689
3699
|
}
|
|
3690
3700
|
ngOnInit() {
|
|
3691
3701
|
this._originalMapHeight = this.map.getSize()[1];
|
|
@@ -4455,7 +4465,8 @@ class WFSSearchService {
|
|
|
4455
4465
|
return result;
|
|
4456
4466
|
})));
|
|
4457
4467
|
});
|
|
4458
|
-
|
|
4468
|
+
// Force an empty response if no searchable layers
|
|
4469
|
+
return wftSearches.length > 0 ? wftSearches : [of({ title: '', total: 0, items: [] })];
|
|
4459
4470
|
}
|
|
4460
4471
|
setSearcheableLayers(layers) {
|
|
4461
4472
|
this._searcheableLayers = layers;
|
|
@@ -5053,11 +5064,11 @@ class DocumentSearchInfoComponent {
|
|
|
5053
5064
|
}
|
|
5054
5065
|
}
|
|
5055
5066
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentSearchInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5056
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DocumentSearchInfoComponent, isStandalone: true, selector: "document-search-info", ngImport: i0, template: "<div *ngIf=\"features$ | async as features\" class=\"doc-info-panel\">\n <div class=\"doc-info-features\">\n <div *ngFor=\"let feature of features\" class=\"doc-info-layer\">\n <h3 class=\"doc-info-layer-title\">{{feature.layer}}</h3>\n <div *ngFor=\"let item of feature.items\" class=\"doc-info-item\">\n <mat-icon class=\"doc-info-item-icon\">{{getIcon(item)}}</mat-icon>\n <a [href]=\"item\" target=\"_blank\" rel=\"noopener\" class=\"doc-info-item-link\">\n {{
|
|
5067
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DocumentSearchInfoComponent, isStandalone: true, selector: "document-search-info", ngImport: i0, template: "<div *ngIf=\"features$ | async as features\" class=\"doc-info-panel\">\n <div class=\"doc-info-features\">\n <div *ngFor=\"let feature of features\" class=\"doc-info-layer\">\n <h3 class=\"doc-info-layer-title\">{{feature.layer}}</h3>\n <div *ngFor=\"let item of feature.items\" class=\"doc-info-item\">\n <mat-icon class=\"doc-info-item-icon\">{{getIcon(item.url)}}</mat-icon>\n <a [href]=\"item.url\" target=\"_blank\" rel=\"noopener\" class=\"doc-info-item-link\">\n {{ item.header }}\n </a>\n </div>\n </div>\n </div>\n</div>", styles: ["::ng-deep .doc-info-panel{display:block;font-family:Avenir Next W01,Lato,-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:#4c4d51;border:1px solid rgba(255,255,255,.07);padding:.75rem;border-radius:5px;box-shadow:0 2px 4px #0000004d,0 8px 24px #00000059,inset 0 1px #ffffff0f;max-width:420px;max-height:450px;overflow-y:auto;position:relative}::ng-deep .doc-info-panel::-webkit-scrollbar{width:12px}::ng-deep .doc-info-panel::-webkit-scrollbar-track{background:#757474;border-radius:8px}::ng-deep .doc-info-panel::-webkit-scrollbar-thumb{background:#1a1c1f;border-radius:8px;border:2px solid #2a2c30}::ng-deep .doc-info-panel::-webkit-scrollbar-thumb:hover{background:#0f1012}::ng-deep .doc-info-panel::-webkit-scrollbar-button{width:12px;height:16px;background:#2a2c30;border:1px solid #1a1c1f}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:decrement{background:#2a2c30 url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 4l-4 4h8z'/%3E%3C/svg%3E\") no-repeat center;border-radius:8px 8px 0 0}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:decrement:hover{background-color:#1a1c1f}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:increment{background:#2a2c30 url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8l4-4H2z'/%3E%3C/svg%3E\") no-repeat center;border-radius:0 0 8px 8px}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:increment:hover{background-color:#1a1c1f}::ng-deep .doc-info-panel .doc-info-layer{background:#ffffff08;border:1px solid rgba(255,255,255,.06);border-radius:5px;overflow:hidden;margin-bottom:.5rem;transition:border-color .2s ease,box-shadow .2s ease}::ng-deep .doc-info-panel .doc-info-layer:last-child{margin-bottom:0}::ng-deep .doc-info-panel .doc-info-layer:hover{border-color:#ffffff1a;box-shadow:0 2px 12px #0003}::ng-deep .doc-info-panel .doc-info-layer-title{font-size:13px;font-weight:600;color:#bdc1c3cc;padding:.6rem .875rem .5rem;margin:0;border-bottom:1px solid rgba(255,255,255,.06);background:#0000001f}::ng-deep .doc-info-panel .doc-info-item{display:flex;align-items:center;gap:.6rem;padding:.55rem .875rem;border-bottom:1px solid rgba(255,255,255,.06);border-radius:0;transition:background .15s ease}::ng-deep .doc-info-panel .doc-info-item:last-child{border-bottom:none}::ng-deep .doc-info-panel .doc-info-item:hover{background:#ffffff0d}::ng-deep .doc-info-panel .doc-info-item:hover .doc-info-item-icon{transform:scale(1.12);opacity:1}::ng-deep .doc-info-panel .doc-info-item:hover .doc-info-item-link{color:#5cb8ff!important}::ng-deep .doc-info-panel .doc-info-item-icon{font-size:1rem;width:1rem;height:1rem;flex-shrink:0;opacity:.65;color:#8a8a94;transition:transform .15s ease,opacity .15s ease}::ng-deep .doc-info-panel .doc-info-item-link{font-size:12.5px;font-weight:450;color:#4da6f5!important;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:330px;letter-spacing:.01em;transition:color .15s ease;background:none}::ng-deep .doc-info-panel .doc-info-item-link:hover{text-decoration:underline;text-underline-offset:2px;text-decoration-color:#4da6f566;color:#5cb8ff!important;background:none!important}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".pdf\"]){color:#e06c75;opacity:.85}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".docx\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".doc\"]){color:#4da6f5;opacity:.85}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".xlsx\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".xls\"]){color:#56c784;opacity:.85}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".jpg\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".jpeg\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".png\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".gif\"]){color:#b07ce8;opacity:.85}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
5057
5068
|
}
|
|
5058
5069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentSearchInfoComponent, decorators: [{
|
|
5059
5070
|
type: Component,
|
|
5060
|
-
args: [{ selector: 'document-search-info', imports: [CommonModule, FormsModule, AsyncPipe, JsonPipe, MatButtonModule, MatIconModule], template: "<div *ngIf=\"features$ | async as features\" class=\"doc-info-panel\">\n <div class=\"doc-info-features\">\n <div *ngFor=\"let feature of features\" class=\"doc-info-layer\">\n <h3 class=\"doc-info-layer-title\">{{feature.layer}}</h3>\n <div *ngFor=\"let item of feature.items\" class=\"doc-info-item\">\n <mat-icon class=\"doc-info-item-icon\">{{getIcon(item)}}</mat-icon>\n <a [href]=\"item\" target=\"_blank\" rel=\"noopener\" class=\"doc-info-item-link\">\n {{
|
|
5071
|
+
args: [{ selector: 'document-search-info', imports: [CommonModule, FormsModule, AsyncPipe, JsonPipe, MatButtonModule, MatIconModule], template: "<div *ngIf=\"features$ | async as features\" class=\"doc-info-panel\">\n <div class=\"doc-info-features\">\n <div *ngFor=\"let feature of features\" class=\"doc-info-layer\">\n <h3 class=\"doc-info-layer-title\">{{feature.layer}}</h3>\n <div *ngFor=\"let item of feature.items\" class=\"doc-info-item\">\n <mat-icon class=\"doc-info-item-icon\">{{getIcon(item.url)}}</mat-icon>\n <a [href]=\"item.url\" target=\"_blank\" rel=\"noopener\" class=\"doc-info-item-link\">\n {{ item.header }}\n </a>\n </div>\n </div>\n </div>\n</div>", styles: ["::ng-deep .doc-info-panel{display:block;font-family:Avenir Next W01,Lato,-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:#4c4d51;border:1px solid rgba(255,255,255,.07);padding:.75rem;border-radius:5px;box-shadow:0 2px 4px #0000004d,0 8px 24px #00000059,inset 0 1px #ffffff0f;max-width:420px;max-height:450px;overflow-y:auto;position:relative}::ng-deep .doc-info-panel::-webkit-scrollbar{width:12px}::ng-deep .doc-info-panel::-webkit-scrollbar-track{background:#757474;border-radius:8px}::ng-deep .doc-info-panel::-webkit-scrollbar-thumb{background:#1a1c1f;border-radius:8px;border:2px solid #2a2c30}::ng-deep .doc-info-panel::-webkit-scrollbar-thumb:hover{background:#0f1012}::ng-deep .doc-info-panel::-webkit-scrollbar-button{width:12px;height:16px;background:#2a2c30;border:1px solid #1a1c1f}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:decrement{background:#2a2c30 url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 4l-4 4h8z'/%3E%3C/svg%3E\") no-repeat center;border-radius:8px 8px 0 0}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:decrement:hover{background-color:#1a1c1f}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:increment{background:#2a2c30 url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8l4-4H2z'/%3E%3C/svg%3E\") no-repeat center;border-radius:0 0 8px 8px}::ng-deep .doc-info-panel::-webkit-scrollbar-button:vertical:increment:hover{background-color:#1a1c1f}::ng-deep .doc-info-panel .doc-info-layer{background:#ffffff08;border:1px solid rgba(255,255,255,.06);border-radius:5px;overflow:hidden;margin-bottom:.5rem;transition:border-color .2s ease,box-shadow .2s ease}::ng-deep .doc-info-panel .doc-info-layer:last-child{margin-bottom:0}::ng-deep .doc-info-panel .doc-info-layer:hover{border-color:#ffffff1a;box-shadow:0 2px 12px #0003}::ng-deep .doc-info-panel .doc-info-layer-title{font-size:13px;font-weight:600;color:#bdc1c3cc;padding:.6rem .875rem .5rem;margin:0;border-bottom:1px solid rgba(255,255,255,.06);background:#0000001f}::ng-deep .doc-info-panel .doc-info-item{display:flex;align-items:center;gap:.6rem;padding:.55rem .875rem;border-bottom:1px solid rgba(255,255,255,.06);border-radius:0;transition:background .15s ease}::ng-deep .doc-info-panel .doc-info-item:last-child{border-bottom:none}::ng-deep .doc-info-panel .doc-info-item:hover{background:#ffffff0d}::ng-deep .doc-info-panel .doc-info-item:hover .doc-info-item-icon{transform:scale(1.12);opacity:1}::ng-deep .doc-info-panel .doc-info-item:hover .doc-info-item-link{color:#5cb8ff!important}::ng-deep .doc-info-panel .doc-info-item-icon{font-size:1rem;width:1rem;height:1rem;flex-shrink:0;opacity:.65;color:#8a8a94;transition:transform .15s ease,opacity .15s ease}::ng-deep .doc-info-panel .doc-info-item-link{font-size:12.5px;font-weight:450;color:#4da6f5!important;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:330px;letter-spacing:.01em;transition:color .15s ease;background:none}::ng-deep .doc-info-panel .doc-info-item-link:hover{text-decoration:underline;text-underline-offset:2px;text-decoration-color:#4da6f566;color:#5cb8ff!important;background:none!important}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".pdf\"]){color:#e06c75;opacity:.85}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".docx\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".doc\"]){color:#4da6f5;opacity:.85}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".xlsx\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".xls\"]){color:#56c784;opacity:.85}::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".jpg\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".jpeg\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".png\"]),::ng-deep .doc-info-panel .doc-info-item-icon:has(+.doc-info-item-link[href$=\".gif\"]){color:#b07ce8;opacity:.85}\n"] }]
|
|
5061
5072
|
}] });
|
|
5062
5073
|
|
|
5063
5074
|
class GisKomponentComponent {
|