@igo2/geo 19.0.0-next.6 → 19.0.0-next.8
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/fesm2022/igo2-geo.mjs +496 -216
- package/fesm2022/igo2-geo.mjs.map +1 -1
- package/lib/datasource/shared/capabilities.service.d.ts +2 -1
- package/lib/datasource/shared/datasources/wms-datasource.d.ts +2 -0
- package/lib/datasource/shared/datasources/wms-datasource.interface.d.ts +1 -0
- package/lib/datasource/shared/datasources/wms-wfs.utils.d.ts +3 -2
- package/lib/filter/ogc-filter-time/ogc-filter-time.component.d.ts +1 -0
- package/lib/filter/shared/date.utils.d.ts +9 -0
- package/lib/filter/shared/filter.utils.d.ts +26 -0
- package/lib/filter/shared/ogc-filter.d.ts +0 -7
- package/lib/filter/shared/ogc-filter.interface.d.ts +9 -2
- package/lib/filter/shared/ogc-filter.service.d.ts +1 -0
- package/lib/filter/shared/time-filter.interface.d.ts +2 -2
- package/lib/filter/time-filter-form/time-filter-form.component.d.ts +10 -5
- package/lib/filter/time-filter-item/time-filter-item.component.d.ts +1 -0
- package/lib/layer/shared/layers/vector-layer.d.ts +13 -12
- package/package.json +5 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { TimeFilterOptions } from '../../filter/shared/time-filter.interface';
|
|
3
4
|
import type { LegendOptions } from '../../layer/shared/layers/legend.interface';
|
|
4
5
|
import { MapService } from '../../map/shared/map.service';
|
|
5
6
|
import { TypeCapabilitiesStrings } from './capabilities.interface';
|
|
@@ -28,7 +29,7 @@ export declare class CapabilitiesService {
|
|
|
28
29
|
private parseArcgisOptions;
|
|
29
30
|
private parseTileOrImageArcgisOptions;
|
|
30
31
|
private findDataSourceInCapabilities;
|
|
31
|
-
getTimeFilter(layer: any):
|
|
32
|
+
getTimeFilter(layer: any): TimeFilterOptions;
|
|
32
33
|
getStyle(Style: any): LegendOptions;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<CapabilitiesService, never>;
|
|
34
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<CapabilitiesService>;
|
|
@@ -19,6 +19,7 @@ export declare class WMSDataSource extends DataSource {
|
|
|
19
19
|
protected wfsService: WFSService;
|
|
20
20
|
ol: olSourceImageWMS;
|
|
21
21
|
get params(): any;
|
|
22
|
+
set stylesParams(value: string);
|
|
22
23
|
get queryTitle(): string;
|
|
23
24
|
get mapLabel(): string;
|
|
24
25
|
get queryHtmlTarget(): string;
|
|
@@ -29,6 +30,7 @@ export declare class WMSDataSource extends DataSource {
|
|
|
29
30
|
readonly timeFilter$: BehaviorSubject<TimeFilterOptions>;
|
|
30
31
|
get saveableOptions(): Partial<WMSDataSourceOptions>;
|
|
31
32
|
constructor(options: WMSDataSourceOptions, wfsService: WFSService);
|
|
33
|
+
private dateFormat;
|
|
32
34
|
refresh(): void;
|
|
33
35
|
private buildDynamicDownloadUrlFromParamsWFS;
|
|
34
36
|
protected createOlSource(): olSourceImageWMS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extent } from 'ol/extent';
|
|
2
2
|
import olProjection from 'ol/proj/Projection';
|
|
3
|
-
import { OgcFiltersOptions } from '../../../filter/shared/ogc-filter.interface';
|
|
3
|
+
import { IOgcFiltersOption, OgcFiltersOptions } from '../../../filter/shared/ogc-filter.interface';
|
|
4
4
|
import { WFSDataSourceOptions } from './wfs-datasource.interface';
|
|
5
5
|
import { WMSDataSourceOptions } from './wms-datasource.interface';
|
|
6
6
|
export declare const defaultEpsg = "EPSG:3857";
|
|
@@ -17,7 +17,7 @@ export declare const jsonRegex: RegExp;
|
|
|
17
17
|
* @param ogcFilters OgcFiltersOptions
|
|
18
18
|
* @returns A string representing the datasource options, based on filter and views
|
|
19
19
|
*/
|
|
20
|
-
export declare function buildUrl(options: WFSDataSourceOptions, extent: Extent, proj: olProjection,
|
|
20
|
+
export declare function buildUrl(options: WFSDataSourceOptions, extent: Extent, proj: olProjection, randomParam?: boolean): string;
|
|
21
21
|
/**
|
|
22
22
|
* This method build/standardize WFS call query params based on the layer property.
|
|
23
23
|
* @param wfsDataSourceOptions WFSDataSourceOptions The common wfs datasource options interface
|
|
@@ -40,3 +40,4 @@ export declare function formatWFSQueryString(dataSourceOptions: WFSDataSourceOpt
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function checkWfsParams(wfsDataSourceOptions: any, srcType?: string): any;
|
|
42
42
|
export declare function getFormatFromOptions(options: WFSDataSourceOptions | WMSDataSourceOptions): any;
|
|
43
|
+
export declare function getSaveableOgcParams(options: OgcFiltersOptions): IOgcFiltersOption;
|
|
@@ -82,6 +82,7 @@ export declare class OgcFilterTimeComponent implements OnInit {
|
|
|
82
82
|
getDateFromStringWithoutTime(stringDate: string): Date;
|
|
83
83
|
resetFilter(): void;
|
|
84
84
|
toggleFilterState(): void;
|
|
85
|
+
private isValidDate;
|
|
85
86
|
static ɵfac: i0.ɵɵFactoryDeclaration<OgcFilterTimeComponent, never>;
|
|
86
87
|
static ɵcmp: i0.ɵɵComponentDeclaration<OgcFilterTimeComponent, "igo-ogc-filter-time", never, { "datasource": { "alias": "datasource"; "required": false; }; "currentFilter": { "alias": "currentFilter"; "required": false; }; }, { "changeProperty": "changeProperty"; }, never, never, true, never>;
|
|
87
88
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param date: string
|
|
3
|
+
* @example date = <[2014-08-25, 2018-08-25]>
|
|
4
|
+
* @example date = 2014-08-25, 2018-08-25
|
|
5
|
+
* @example date = 2014-08-25/ 2018-08-25
|
|
6
|
+
* @example date = 2014-08-25
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseDateString(date: string | [min: string, max: string]): Date | [min: Date, max: Date] | undefined;
|
|
9
|
+
export declare function isDateOrRangeInRange(dateOrRange: Date | [min: Date, max: Date], [min, max]: [min: Date, max: Date]): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AnyBaseOgcFilterOptions, IgoLogicalArrayOptions, OgcFilterConditionsArrayOptions, OgcFilterSpatialOptions } from './ogc-filter.interface';
|
|
2
|
+
export declare const TimeFrame: readonly ["now", "today"];
|
|
3
|
+
export type TimeFrame = (typeof TimeFrame)[number];
|
|
4
|
+
export declare const TimeUnit: readonly ["years", "months", "weeks", "days", "hours", "seconds"];
|
|
5
|
+
export type TimeUnit = (typeof TimeUnit)[number];
|
|
6
|
+
export declare const ArithmeticSymbol: readonly ["+", "-"];
|
|
7
|
+
export type ArithmeticSymbol = (typeof ArithmeticSymbol)[number];
|
|
8
|
+
/**
|
|
9
|
+
* this function to parse date with specific format
|
|
10
|
+
* exemple 'today' or 'today + 1 days' or 'now + 1 years'
|
|
11
|
+
* @param value string date
|
|
12
|
+
* @returns date
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseDateOperation(dateOperation: string): string;
|
|
15
|
+
export declare function isIgoLogicalArray(filters: IgoLogicalArrayOptions | AnyBaseOgcFilterOptions): filters is IgoLogicalArrayOptions;
|
|
16
|
+
export declare function isFilterAttributeOptions(filters: AnyBaseOgcFilterOptions): filters is Exclude<AnyBaseOgcFilterOptions & {
|
|
17
|
+
filterid?: string;
|
|
18
|
+
}, OgcFilterConditionsArrayOptions | OgcFilterSpatialOptions>;
|
|
19
|
+
/**
|
|
20
|
+
* Recursive
|
|
21
|
+
* Search inside filters of OgcFiltersOptions
|
|
22
|
+
*/
|
|
23
|
+
export declare function searchFilter(filters: IgoLogicalArrayOptions | AnyBaseOgcFilterOptions, key: 'propertyName' | 'filterid', value: string): ((IgoLogicalArrayOptions | AnyBaseOgcFilterOptions) & {
|
|
24
|
+
filterid?: string;
|
|
25
|
+
}) | undefined;
|
|
26
|
+
export declare function isTimeFrame(value: string): boolean;
|
|
@@ -27,11 +27,4 @@ export declare class OgcFilterWriter {
|
|
|
27
27
|
formatGroupAndFilter(ogcFilters: OgcFiltersOptions, selectors: any): any[];
|
|
28
28
|
formatProcessedOgcFilter(processedFilter: string, layersOrTypenames: string): string;
|
|
29
29
|
parseFilterOptionDate(value: string, defaultValue?: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* this function to parse date with specific format
|
|
32
|
-
* exemple 'today + 1 days' or 'now + 1 years'
|
|
33
|
-
* @param value string date
|
|
34
|
-
* @returns date
|
|
35
|
-
*/
|
|
36
|
-
private parseDateOperation;
|
|
37
30
|
}
|
|
@@ -28,7 +28,9 @@ export type IgoOgcFilterObject = IgoLogicalArrayOptions | AnyBaseOgcFilterOption
|
|
|
28
28
|
export interface OgcFiltersOptions {
|
|
29
29
|
enabled?: boolean;
|
|
30
30
|
editable?: boolean;
|
|
31
|
-
filters?: IgoLogicalArrayOptions | AnyBaseOgcFilterOptions
|
|
31
|
+
filters?: (IgoLogicalArrayOptions | AnyBaseOgcFilterOptions) & {
|
|
32
|
+
filterid?: string;
|
|
33
|
+
};
|
|
32
34
|
pushButtons?: IgoOgcSelector;
|
|
33
35
|
checkboxes?: IgoOgcSelector;
|
|
34
36
|
radioButtons?: IgoOgcSelector;
|
|
@@ -46,6 +48,7 @@ export interface IgoOgcSelector {
|
|
|
46
48
|
selectorType: 'pushButton' | 'checkbox' | 'radioButton' | 'select' | 'autocomplete';
|
|
47
49
|
order?: number;
|
|
48
50
|
}
|
|
51
|
+
export declare const OgcSelectorFields: readonly ["pushButtons", "checkboxes", "radioButtons", "select", "autocomplete"];
|
|
49
52
|
export interface SelectorGroup {
|
|
50
53
|
enabled?: boolean;
|
|
51
54
|
title?: string;
|
|
@@ -168,7 +171,7 @@ export interface OgcInterfaceFilterOptions {
|
|
|
168
171
|
end?: string;
|
|
169
172
|
step?: string;
|
|
170
173
|
restrictToStep?: boolean;
|
|
171
|
-
sliderOptions
|
|
174
|
+
sliderOptions?: SliderOptionsInterface;
|
|
172
175
|
displayFormat?: string;
|
|
173
176
|
escapeChar?: string;
|
|
174
177
|
expression?: string | number;
|
|
@@ -196,3 +199,7 @@ export interface SliderOptionsInterface extends OgcFilterDuringOptions {
|
|
|
196
199
|
displayFormat?: string;
|
|
197
200
|
enabled?: boolean;
|
|
198
201
|
}
|
|
202
|
+
export interface IOgcFiltersOption extends Omit<OgcFiltersOptions, 'interfaceOgcFilters'> {
|
|
203
|
+
interfaceOgcFilters: IOgcInterfaceFilterOptions[];
|
|
204
|
+
}
|
|
205
|
+
export type IOgcInterfaceFilterOptions = Pick<OgcInterfaceFilterOptions, 'propertyName' | 'begin' | 'end' | 'active' | 'operator' | 'expression'>;
|
|
@@ -5,6 +5,7 @@ export declare class OGCFilterService {
|
|
|
5
5
|
filterByOgc(wmsDatasource: WMSDataSource, filterString: string): void;
|
|
6
6
|
setOgcWFSFiltersOptions(wfsDatasource: OgcFilterableDataSource): void;
|
|
7
7
|
setOgcWMSFiltersOptions(wmsDatasource: OgcFilterableDataSource): void;
|
|
8
|
+
private mergeInterfaceFilters;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<OGCFilterService, never>;
|
|
9
10
|
static ɵprov: i0.ɵɵInjectableDeclaration<OGCFilterService>;
|
|
10
11
|
}
|
|
@@ -3,8 +3,8 @@ export interface TimeFilterOptions {
|
|
|
3
3
|
min?: string;
|
|
4
4
|
max?: string;
|
|
5
5
|
range?: boolean;
|
|
6
|
-
value?: string;
|
|
7
|
-
|
|
6
|
+
value?: string | [string, string];
|
|
7
|
+
default?: string | [string, string];
|
|
8
8
|
type?: TimeFilterType;
|
|
9
9
|
format?: string;
|
|
10
10
|
style?: TimeFilterStyle;
|
|
@@ -24,7 +24,7 @@ export declare class TimeFilterFormComponent implements OnInit {
|
|
|
24
24
|
layer: Layer;
|
|
25
25
|
options: TimeFilterOptions;
|
|
26
26
|
set currentValue(value: string);
|
|
27
|
-
|
|
27
|
+
dateChange: EventEmitter<Date | [Date, Date]>;
|
|
28
28
|
yearChange: EventEmitter<string | [string, string]>;
|
|
29
29
|
mySlider: any;
|
|
30
30
|
get type(): TimeFilterType;
|
|
@@ -35,14 +35,19 @@ export declare class TimeFilterFormComponent implements OnInit {
|
|
|
35
35
|
get min(): Date;
|
|
36
36
|
get max(): Date;
|
|
37
37
|
get is(): boolean;
|
|
38
|
+
get allYearsInterval(): string[];
|
|
38
39
|
constructor(dateAdapter: DateAdapter<Date>);
|
|
39
40
|
ngOnInit(): void;
|
|
40
41
|
storeCurrentFilterValue(): void;
|
|
41
|
-
|
|
42
|
+
private processSliderValue;
|
|
43
|
+
private processCalendarYearType;
|
|
44
|
+
private processCalendarDateType;
|
|
45
|
+
private getDateValue;
|
|
46
|
+
private checkCalendarValue;
|
|
47
|
+
private checkFilterValue;
|
|
42
48
|
handleDateChange(): void;
|
|
43
49
|
handleYearChange(): void;
|
|
44
|
-
|
|
45
|
-
handleListYearStartChange(): void;
|
|
50
|
+
private setUpYearsInterval;
|
|
46
51
|
dateToNumber(date: Date): number;
|
|
47
52
|
setSliderThumbLabel(label: string): void;
|
|
48
53
|
findThumbLabel(test: any[]): any;
|
|
@@ -73,5 +78,5 @@ export declare class TimeFilterFormComponent implements OnInit {
|
|
|
73
78
|
*/
|
|
74
79
|
getStepDefinition(step: any): number;
|
|
75
80
|
static ɵfac: i0.ɵɵFactoryDeclaration<TimeFilterFormComponent, never>;
|
|
76
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimeFilterFormComponent, "igo-time-filter-form", never, { "layer": { "alias": "layer"; "required": false; }; "options": { "alias": "options"; "required": false; }; "currentValue": { "alias": "currentValue"; "required": false; }; }, { "
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TimeFilterFormComponent, "igo-time-filter-form", never, { "layer": { "alias": "layer"; "required": false; }; "options": { "alias": "options"; "required": false; }; "currentValue": { "alias": "currentValue"; "required": false; }; }, { "dateChange": "dateChange"; "yearChange": "yearChange"; }, never, never, true, never>;
|
|
77
82
|
}
|
|
@@ -19,6 +19,7 @@ export declare class TimeFilterItemComponent implements OnInit, OnDestroy {
|
|
|
19
19
|
ngOnDestroy(): void;
|
|
20
20
|
handleYearChange(year: string | [string, string]): void;
|
|
21
21
|
handleDateChange(date: Date | [Date, Date]): void;
|
|
22
|
+
private reformDate;
|
|
22
23
|
private toggleLegend;
|
|
23
24
|
toggleLegendOnClick(): void;
|
|
24
25
|
setVisible(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthInterceptor } from '@igo2/auth';
|
|
2
2
|
import { MessageService } from '@igo2/core/message';
|
|
3
|
-
import
|
|
3
|
+
import OlFeature from 'ol/Feature';
|
|
4
4
|
import { Extent } from 'ol/extent';
|
|
5
5
|
import olLayerVector from 'ol/layer/Vector';
|
|
6
6
|
import olProjection from 'ol/proj/Projection';
|
|
@@ -11,8 +11,7 @@ import { FeatureDataSource } from '../../../datasource/shared/datasources/featur
|
|
|
11
11
|
import { WebSocketDataSource } from '../../../datasource/shared/datasources/websocket-datasource';
|
|
12
12
|
import { WFSDataSource } from '../../../datasource/shared/datasources/wfs-datasource';
|
|
13
13
|
import { WFSDataSourceOptions } from '../../../datasource/shared/datasources/wfs-datasource.interface';
|
|
14
|
-
import type { MapBase } from '../../../map/shared
|
|
15
|
-
import { MapExtent } from '../../../map/shared/map.interface';
|
|
14
|
+
import type { MapBase, MapExtent } from '../../../map/shared';
|
|
16
15
|
import { GeoDBService } from '../../../offline/geoDB/geoDB.service';
|
|
17
16
|
import { LayerDBService } from '../../../offline/layerDB/layerDB.service';
|
|
18
17
|
import { GeoNetworkService } from '../../../offline/shared/geo-network.service';
|
|
@@ -26,10 +25,8 @@ export declare class VectorLayer extends Layer {
|
|
|
26
25
|
geoDBService?: GeoDBService;
|
|
27
26
|
layerDBService?: LayerDBService;
|
|
28
27
|
type: LayerType;
|
|
29
|
-
private
|
|
30
|
-
private
|
|
31
|
-
private previousOgcFilters;
|
|
32
|
-
private xhrAccumulator;
|
|
28
|
+
private lastRequest;
|
|
29
|
+
private ongoingRequests;
|
|
33
30
|
dataSource: FeatureDataSource | WFSDataSource | ArcGISRestDataSource | WebSocketDataSource | ClusterDataSource;
|
|
34
31
|
options: VectorLayerOptions;
|
|
35
32
|
ol: olLayerVector<olSourceVector>;
|
|
@@ -43,21 +40,22 @@ export declare class VectorLayer extends Layer {
|
|
|
43
40
|
private removeLayerFromIDB;
|
|
44
41
|
private maintainOptionsInIdb;
|
|
45
42
|
private maintainFeaturesInIdb;
|
|
46
|
-
protected flash(feature:
|
|
43
|
+
protected flash(feature: OlFeature): void;
|
|
47
44
|
init(map: MapBase | undefined): void;
|
|
48
45
|
setExtent(extent: MapExtent): void;
|
|
49
46
|
onUnwatch(): void;
|
|
50
47
|
stopAnimation(): void;
|
|
51
48
|
enableTrackFeature(id: string | number): void;
|
|
52
49
|
centerMapOnFeature(id: string | number): void;
|
|
53
|
-
trackFeature(id:
|
|
50
|
+
trackFeature(id: string | number, feat: {
|
|
51
|
+
feature: OlFeature;
|
|
52
|
+
}): void;
|
|
54
53
|
disableTrackFeature(): void;
|
|
55
54
|
/**
|
|
56
55
|
* Custom loader for a WFS datasource
|
|
57
56
|
* @internal
|
|
58
57
|
* @param vectorSource the vector source to be created
|
|
59
58
|
* @param options olOptions from source
|
|
60
|
-
* @param interceptor the interceptor of the data
|
|
61
59
|
* @param extent the extent of the requested data
|
|
62
60
|
* @param resolution the current resolution
|
|
63
61
|
* @param proj the projection to retrieve the data
|
|
@@ -65,7 +63,10 @@ export declare class VectorLayer extends Layer {
|
|
|
65
63
|
* @param failure failure callback
|
|
66
64
|
* @param randomParam random parameter to ensure cache is not causing problems in retrieving new data
|
|
67
65
|
*/
|
|
68
|
-
customWFSLoader(vectorSource: olSourceVector, options: WFSDataSourceOptions,
|
|
66
|
+
customWFSLoader(vectorSource: olSourceVector, options: WFSDataSourceOptions, extent: Extent, resolution: number, proj: olProjection, success: (features: OlFeature[]) => void, failure: () => void, randomParam?: boolean): void;
|
|
67
|
+
private abortRequests;
|
|
68
|
+
private getProjection;
|
|
69
|
+
private batchGetFeatures;
|
|
69
70
|
/**
|
|
70
71
|
* Custom loader to get feature from a WFS datasource
|
|
71
72
|
* @internal
|
|
@@ -78,13 +79,13 @@ export declare class VectorLayer extends Layer {
|
|
|
78
79
|
* @param failure failure callback
|
|
79
80
|
*/
|
|
80
81
|
private getFeatures;
|
|
82
|
+
private removeRequest;
|
|
81
83
|
/**
|
|
82
84
|
* Custom loader for vector layer.
|
|
83
85
|
* @internal
|
|
84
86
|
* @param vectorSource the vector source to be created
|
|
85
87
|
* @param url the url string or function to retrieve the data
|
|
86
88
|
* @param extent the extent of the requested data
|
|
87
|
-
* @param resolution the current resolution
|
|
88
89
|
* @param projection the projection to retrieve the data
|
|
89
90
|
*/
|
|
90
91
|
private customLoader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igo2/geo",
|
|
3
|
-
"version": "19.0.0-next.
|
|
3
|
+
"version": "19.0.0-next.8",
|
|
4
4
|
"description": "IGO Library",
|
|
5
5
|
"author": "IGO Community",
|
|
6
6
|
"keywords": [
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"@angular/material": "^19.0.0",
|
|
49
49
|
"@angular/material-moment-adapter": "^19.0.0",
|
|
50
50
|
"@angular/platform-browser": "^19.0.0",
|
|
51
|
-
"@igo2/auth": "^19.0.0-next.
|
|
52
|
-
"@igo2/common": "^19.0.0-next.
|
|
53
|
-
"@igo2/core": "^19.0.0-next.
|
|
54
|
-
"@igo2/utils": "^19.0.0-next.
|
|
51
|
+
"@igo2/auth": "^19.0.0-next.8",
|
|
52
|
+
"@igo2/common": "^19.0.0-next.8",
|
|
53
|
+
"@igo2/core": "^19.0.0-next.8",
|
|
54
|
+
"@igo2/utils": "^19.0.0-next.8",
|
|
55
55
|
"@mat-datetimepicker/core": "^15.0.1",
|
|
56
56
|
"file-saver": "^2.0.2",
|
|
57
57
|
"flexsearch": "0.7.21",
|