@igo2/geo 19.0.0-next.26 → 19.0.0-next.28
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 +1156 -1267
- package/fesm2022/igo2-geo.mjs.map +1 -1
- package/lib/layer/shared/layer.service.d.ts +2 -4
- package/lib/layer/shared/layers/vector-layer.d.ts +4 -15
- package/lib/layer/shared/layers/vector-layer.interface.d.ts +3 -2
- package/lib/offline/geoDB/configFileToGeoDB.service.d.ts +2 -4
- package/lib/offline/geoDB/geoDB.d.ts +36 -0
- package/lib/offline/geoDB/index.d.ts +1 -1
- package/lib/offline/layerDB/index.d.ts +1 -1
- package/lib/offline/layerDB/{layerDB.service.d.ts → layerDB.d.ts} +9 -11
- package/lib/offline/offline.provider.d.ts +2 -0
- package/lib/offline/shared/geo-network.service.d.ts +2 -4
- package/lib/offline/shared/indexed-db.interface.d.ts +16 -0
- package/lib/offline/shared/indexed-db.utils.d.ts +4 -0
- package/locale/en.geo.json +4 -0
- package/locale/fr.geo.json +4 -0
- package/package.json +6 -6
- package/lib/offline/geoDB/geoDB.service.d.ts +0 -36
|
@@ -4,7 +4,6 @@ import { MessageService } from '@igo2/core/message';
|
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { DataSourceService } from '../../datasource/shared/datasource.service';
|
|
6
6
|
import { AnyDataSourceOptions, AnyDataSourceOptionsWithParams, ArcGISRestDataSourceOptions, WMTSDataSourceOptions } from '../../datasource/shared/datasources';
|
|
7
|
-
import { LayerDBService } from '../../offline/layerDB/layerDB.service';
|
|
8
7
|
import { GeoNetworkService } from '../../offline/shared/geo-network.service';
|
|
9
8
|
import { StyleService } from '../../style/style-service/style.service';
|
|
10
9
|
import { AnyLayer, AnyLayerItemOptions, AnyLayerOptions, Layer, LayerGroupOptions } from './layers';
|
|
@@ -16,10 +15,9 @@ export declare class LayerService {
|
|
|
16
15
|
private dataSourceService;
|
|
17
16
|
private messageService;
|
|
18
17
|
private geoNetworkService?;
|
|
19
|
-
private layerDBService?;
|
|
20
18
|
private authInterceptor?;
|
|
21
19
|
unavailableLayers: AnyLayerItemOptions[];
|
|
22
|
-
constructor(http: HttpClient, styleService: StyleService, dataSourceService: DataSourceService, messageService: MessageService, geoNetworkService?: GeoNetworkService,
|
|
20
|
+
constructor(http: HttpClient, styleService: StyleService, dataSourceService: DataSourceService, messageService: MessageService, geoNetworkService?: GeoNetworkService, authInterceptor?: AuthInterceptor);
|
|
23
21
|
createLayers(layersOption: AnyLayerOptions[], contextUri?: string): Observable<(AnyLayer | undefined)[]>;
|
|
24
22
|
createLayer(layerOptions: AnyLayerItemOptions): Layer;
|
|
25
23
|
createAsyncLayer(options: AnyLayerItemOptions, detailedContextUri?: string): Observable<Layer | undefined>;
|
|
@@ -37,6 +35,6 @@ export declare class LayerService {
|
|
|
37
35
|
deleteUnavailableLayers(anyLayerOptions: AnyLayerItemOptions): void;
|
|
38
36
|
sourceOptionsWithParams(sourceOptions: AnyDataSourceOptions): sourceOptions is AnyDataSourceOptionsWithParams;
|
|
39
37
|
sourceOptionsWithLayer(sourceOptions: AnyDataSourceOptions): sourceOptions is ArcGISRestDataSourceOptions | WMTSDataSourceOptions;
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LayerService, [null, null, null, null, { optional: true; }, { optional: true; }
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayerService, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
41
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<LayerService>;
|
|
42
40
|
}
|
|
@@ -12,8 +12,6 @@ import { WebSocketDataSource } from '../../../datasource/shared/datasources/webs
|
|
|
12
12
|
import { WFSDataSource } from '../../../datasource/shared/datasources/wfs-datasource';
|
|
13
13
|
import { WFSDataSourceOptions } from '../../../datasource/shared/datasources/wfs-datasource.interface';
|
|
14
14
|
import type { MapBase, MapExtent } from '../../../map/shared';
|
|
15
|
-
import { GeoDBService } from '../../../offline/geoDB/geoDB.service';
|
|
16
|
-
import { LayerDBService } from '../../../offline/layerDB/layerDB.service';
|
|
17
15
|
import { GeoNetworkService } from '../../../offline/shared/geo-network.service';
|
|
18
16
|
import { Layer } from './layer';
|
|
19
17
|
import { LayerType } from './layer.interface';
|
|
@@ -22,8 +20,6 @@ export declare class VectorLayer extends Layer {
|
|
|
22
20
|
messageService?: MessageService;
|
|
23
21
|
authInterceptor?: AuthInterceptor;
|
|
24
22
|
private geoNetworkService?;
|
|
25
|
-
geoDBService?: GeoDBService;
|
|
26
|
-
layerDBService?: LayerDBService;
|
|
27
23
|
type: LayerType;
|
|
28
24
|
private lastRequest;
|
|
29
25
|
private ongoingRequests;
|
|
@@ -34,8 +30,10 @@ export declare class VectorLayer extends Layer {
|
|
|
34
30
|
private trackFeatureListenerId;
|
|
35
31
|
get browsable(): boolean;
|
|
36
32
|
get exportable(): boolean;
|
|
37
|
-
constructor(options: VectorLayerOptions, messageService?: MessageService, authInterceptor?: AuthInterceptor, geoNetworkService?: GeoNetworkService
|
|
33
|
+
constructor(options: VectorLayerOptions, messageService?: MessageService, authInterceptor?: AuthInterceptor, geoNetworkService?: GeoNetworkService);
|
|
38
34
|
protected createOlLayer(): olLayerVector<olSourceVector>;
|
|
35
|
+
private handleIdbStorage;
|
|
36
|
+
private handlePreload;
|
|
39
37
|
remove(): void;
|
|
40
38
|
private removeLayerFromIDB;
|
|
41
39
|
private maintainOptionsInIdb;
|
|
@@ -80,6 +78,7 @@ export declare class VectorLayer extends Layer {
|
|
|
80
78
|
*/
|
|
81
79
|
private getFeatures;
|
|
82
80
|
private removeRequest;
|
|
81
|
+
private handleOnLoad;
|
|
83
82
|
/**
|
|
84
83
|
* Custom loader for vector layer.
|
|
85
84
|
* @internal
|
|
@@ -89,14 +88,4 @@ export declare class VectorLayer extends Layer {
|
|
|
89
88
|
* @param projection the projection to retrieve the data
|
|
90
89
|
*/
|
|
91
90
|
private customLoader;
|
|
92
|
-
/**
|
|
93
|
-
* Custom loader for vector layer.
|
|
94
|
-
* @internal
|
|
95
|
-
* @param vectorSource the vector source to be created
|
|
96
|
-
* @param layerID the url string or function to retrieve the data
|
|
97
|
-
* @param extent the extent of the requested data
|
|
98
|
-
* @param resolution the current resolution
|
|
99
|
-
* @param projection the projection to retrieve the data
|
|
100
|
-
*/
|
|
101
|
-
private customIDBLoader;
|
|
102
91
|
}
|
|
@@ -32,8 +32,9 @@ export interface VectorLayerOptions extends LayerOptions {
|
|
|
32
32
|
}
|
|
33
33
|
export interface IdbInfo {
|
|
34
34
|
storeToIdb: boolean;
|
|
35
|
-
contextUri
|
|
36
|
-
|
|
35
|
+
contextUri?: string;
|
|
36
|
+
/** Interface restricted for system usage. You don't need to set a value */
|
|
37
|
+
firstLoad?: boolean;
|
|
37
38
|
}
|
|
38
39
|
export interface VectorAnimation {
|
|
39
40
|
duration?: number;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { MessageService } from '@igo2/core/message';
|
|
3
|
-
import { GeoDBService } from './geoDB.service';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class ConfigFileToGeoDBService {
|
|
6
5
|
private http;
|
|
7
|
-
private geoDBService;
|
|
8
6
|
private messageService;
|
|
9
|
-
constructor(http: HttpClient,
|
|
10
|
-
load(
|
|
7
|
+
constructor(http: HttpClient, messageService: MessageService);
|
|
8
|
+
load(urlFile: string): void;
|
|
11
9
|
private isZip;
|
|
12
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigFileToGeoDBService, never>;
|
|
13
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigFileToGeoDBService>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { InsertSourceInsertDBEnum } from './geoDB.enums';
|
|
3
|
+
import { GeoDBData } from './geoDB.interface';
|
|
4
|
+
export declare class GeoDB {
|
|
5
|
+
private db$;
|
|
6
|
+
private compression;
|
|
7
|
+
collisionsMap: Map<string | number, string[]>;
|
|
8
|
+
_newData: number;
|
|
9
|
+
private revertObservablesSubscription;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Only blob can be compressed
|
|
13
|
+
* @param url
|
|
14
|
+
* @param regionID
|
|
15
|
+
* @param object object to handle
|
|
16
|
+
* @param insertSource type of event user or system
|
|
17
|
+
* @param insertEvent Name of the event where the insert has been triggered
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
update(url: string, regionID: number | string, object: object | Blob, insertSource: InsertSourceInsertDBEnum, insertEvent: string): Observable<GeoDBData>;
|
|
21
|
+
private customUpdate;
|
|
22
|
+
add(geoDBData: GeoDBData): Observable<GeoDBData>;
|
|
23
|
+
put(geoDBData: GeoDBData): Observable<GeoDBData>;
|
|
24
|
+
getGeoDBData(url: string): Observable<GeoDBData>;
|
|
25
|
+
get(url: string): Observable<object | Blob>;
|
|
26
|
+
delete(key: string): Observable<object>;
|
|
27
|
+
/** @deprecated Use delete method instead*/
|
|
28
|
+
deleteByKey(key: string): Observable<object>;
|
|
29
|
+
getRegionCountByID(id: number): Observable<number>;
|
|
30
|
+
getRegionByID(id: number): Observable<GeoDBData[]>;
|
|
31
|
+
deleteByRegionID(id: number): Observable<void[]>;
|
|
32
|
+
resetCounters(): void;
|
|
33
|
+
resetCollisionsMap(): void;
|
|
34
|
+
revertCollisions(): void;
|
|
35
|
+
get newData(): number;
|
|
36
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './layerDB.interface';
|
|
2
|
-
export * from './layerDB
|
|
2
|
+
export * from './layerDB';
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { NgxIndexedDBService } from 'ngx-indexed-db';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
3
2
|
import { LayerDBData } from './layerDB.interface';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
readonly dbName: string;
|
|
8
|
-
constructor(ngxIndexedDBService: NgxIndexedDBService);
|
|
3
|
+
export declare class LayerDB {
|
|
4
|
+
private db$;
|
|
5
|
+
constructor();
|
|
9
6
|
/**
|
|
10
7
|
* This method allow to update the stored layer into the indexeddb (layerData)
|
|
11
8
|
* @param layerDBData
|
|
12
9
|
* @returns
|
|
13
10
|
*/
|
|
14
|
-
update(layerDBData: LayerDBData): Observable<
|
|
11
|
+
update(layerDBData: LayerDBData): Observable<LayerDBData>;
|
|
15
12
|
private customUpdate;
|
|
13
|
+
add(layerDBData: LayerDBData): Observable<LayerDBData>;
|
|
16
14
|
/**
|
|
17
15
|
* This method retrieve an idb layer definition
|
|
18
16
|
* @param layerId
|
|
@@ -21,16 +19,16 @@ export declare class LayerDBService {
|
|
|
21
19
|
getByID(layerId: string): Observable<LayerDBData>;
|
|
22
20
|
/**
|
|
23
21
|
* This method delete an idb layer definition
|
|
24
|
-
* @param
|
|
22
|
+
* @param key
|
|
25
23
|
* @returns
|
|
26
24
|
*/
|
|
27
|
-
|
|
25
|
+
delete(key: string): Observable<object>;
|
|
26
|
+
/** @deprecated Use delete method instead*/
|
|
27
|
+
deleteByKey(key: string): Observable<object>;
|
|
28
28
|
/**
|
|
29
29
|
* This method retrive all idb layer definition
|
|
30
30
|
* @param layerId
|
|
31
31
|
* @returns
|
|
32
32
|
*/
|
|
33
33
|
getAll(): Observable<LayerDBData[]>;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LayerDBService, [{ optional: true; }]>;
|
|
35
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LayerDBService>;
|
|
36
34
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { EnvironmentProviders } from '@angular/core';
|
|
2
2
|
import { IOfflineOptions } from './offline.interface';
|
|
3
|
+
/** Ensure to create the indexDB on app initialisation and provide
|
|
4
|
+
* GeoNetworkService, ConfigFileToGeoDBService */
|
|
3
5
|
export declare function provideOffline(options: IOfflineOptions): EnvironmentProviders;
|
|
@@ -2,7 +2,6 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { NetworkService } from '@igo2/core/network';
|
|
3
3
|
import { Type } from 'ol/format/Feature';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { GeoDBService } from '../geoDB/geoDB.service';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare enum ResponseType {
|
|
8
7
|
Arraybuffer = "arraybuffer",
|
|
@@ -17,13 +16,12 @@ export interface SimpleGetOptions {
|
|
|
17
16
|
export declare class GeoNetworkService {
|
|
18
17
|
private http;
|
|
19
18
|
private networkService;
|
|
20
|
-
geoDBService?: GeoDBService;
|
|
21
19
|
private networkOnline;
|
|
22
|
-
constructor(http: HttpClient, networkService: NetworkService
|
|
20
|
+
constructor(http: HttpClient, networkService: NetworkService);
|
|
23
21
|
get(url: string, simpleGetOptions: SimpleGetOptions): Observable<any>;
|
|
24
22
|
private getOnline;
|
|
25
23
|
private getOffline;
|
|
26
24
|
isOnline(): boolean;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GeoNetworkService,
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GeoNetworkService, never>;
|
|
28
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<GeoNetworkService>;
|
|
29
27
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DBSchema } from 'idb';
|
|
2
|
+
import { GeoDBData } from '../geoDB/geoDB.interface';
|
|
3
|
+
import { LayerDBData } from '../layerDB/layerDB.interface';
|
|
4
|
+
export interface IgoDBSchema extends DBSchema {
|
|
5
|
+
geoData: {
|
|
6
|
+
value: GeoDBData;
|
|
7
|
+
key: string;
|
|
8
|
+
indexes: {
|
|
9
|
+
'regionID-idx': string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
layerData: {
|
|
13
|
+
value: LayerDBData;
|
|
14
|
+
key: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
package/locale/en.geo.json
CHANGED
|
@@ -527,6 +527,10 @@
|
|
|
527
527
|
"oldCity": "Old city",
|
|
528
528
|
"mrc": "MRC",
|
|
529
529
|
"regadmin": "Administrative Region",
|
|
530
|
+
"rss": "Social and health regions (RSS)",
|
|
531
|
+
"rls": "Local health networks (RLS)",
|
|
532
|
+
"clsc": "Local community service centers (CLSC)",
|
|
533
|
+
"tours": "Cooling towers",
|
|
530
534
|
"road": "Road",
|
|
531
535
|
"intersection": "Intersection",
|
|
532
536
|
"place": "Place",
|
package/locale/fr.geo.json
CHANGED
|
@@ -526,6 +526,10 @@
|
|
|
526
526
|
"oldCity": "Ancienne municipalité",
|
|
527
527
|
"mrc": "MRC",
|
|
528
528
|
"regadmin": "Région administrative",
|
|
529
|
+
"rss": "Régions sociosanitaires (RSS)",
|
|
530
|
+
"rls": "Réseaux locaux de santé (RLS)",
|
|
531
|
+
"clsc": "Centres locaux de services communautaires (CLSC)",
|
|
532
|
+
"tours": "Tours de refroidissement",
|
|
529
533
|
"road": "Route",
|
|
530
534
|
"intersection": "Intersection",
|
|
531
535
|
"place": "Lieu",
|
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.28",
|
|
4
4
|
"description": "IGO Library",
|
|
5
5
|
"author": "IGO Community",
|
|
6
6
|
"keywords": [
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@angular/material-moment-adapter": "^19.0.0",
|
|
43
43
|
"@angular/material": "^19.0.0",
|
|
44
44
|
"@angular/platform-browser": "^19.0.0",
|
|
45
|
-
"@igo2/auth": "^19.0.0-next.
|
|
46
|
-
"@igo2/common": "^19.0.0-next.
|
|
47
|
-
"@igo2/core": "^19.0.0-next.
|
|
48
|
-
"@igo2/utils": "^19.0.0-next.
|
|
45
|
+
"@igo2/auth": "^19.0.0-next.28",
|
|
46
|
+
"@igo2/common": "^19.0.0-next.28",
|
|
47
|
+
"@igo2/core": "^19.0.0-next.28",
|
|
48
|
+
"@igo2/utils": "^19.0.0-next.28",
|
|
49
49
|
"@mat-datetimepicker/core": "^15.0.1",
|
|
50
50
|
"@turf/boolean-intersects": "^7.2.0",
|
|
51
51
|
"@turf/buffer": "^7.2.0",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"file-saver": "^2.0.2",
|
|
57
57
|
"flexsearch": "0.7.21",
|
|
58
58
|
"html2canvas": "^1.4.1",
|
|
59
|
+
"idb": "^8.0.3",
|
|
59
60
|
"jspdf-autotable": "^5.0.0",
|
|
60
61
|
"jspdf": "^3.0.0",
|
|
61
62
|
"jszip": "^3.10.1",
|
|
62
63
|
"moment": "^2.30.0",
|
|
63
|
-
"ngx-indexed-db": "^19.0.0",
|
|
64
64
|
"nosleep.js": "^0.12.0",
|
|
65
65
|
"ol-mapbox-style": "^12.5.0",
|
|
66
66
|
"ol": "10.5.0",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DBMode, NgxIndexedDBService } from 'ngx-indexed-db';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { InsertSourceInsertDBEnum } from './geoDB.enums';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class GeoDBService {
|
|
6
|
-
private ngxIndexedDBService;
|
|
7
|
-
readonly dbName: string;
|
|
8
|
-
collisionsMap: Map<number, string[]>;
|
|
9
|
-
_newData: number;
|
|
10
|
-
private compression;
|
|
11
|
-
constructor(ngxIndexedDBService: NgxIndexedDBService);
|
|
12
|
-
/**
|
|
13
|
-
* Only blob can be compressed
|
|
14
|
-
* @param url
|
|
15
|
-
* @param regionID
|
|
16
|
-
* @param object object to handle
|
|
17
|
-
* @param insertSource type of event user or system
|
|
18
|
-
* @param insertEvent Name of the event where the insert has been triggered
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
update(url: string, regionID: any, object: any, insertSource: InsertSourceInsertDBEnum, insertEvent: string): Observable<any>;
|
|
22
|
-
private customUpdate;
|
|
23
|
-
get(url: string): Observable<any>;
|
|
24
|
-
getByID(url: string): Observable<any>;
|
|
25
|
-
deleteByKey(url: string): Observable<any>;
|
|
26
|
-
getRegionCountByID(id: number): Observable<number>;
|
|
27
|
-
getRegionByID(id: number): Observable<any[]>;
|
|
28
|
-
deleteByRegionID(id: number): Observable<any>;
|
|
29
|
-
openCursor(keyRange?: IDBKeyRange, mode?: DBMode): Observable<import("ngx-indexed-db").NgxIDBCursorWithValue<unknown, IDBValidKey, IDBValidKey>>;
|
|
30
|
-
resetCounters(): void;
|
|
31
|
-
resetCollisionsMap(): void;
|
|
32
|
-
revertCollisions(): void;
|
|
33
|
-
get newData(): number;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GeoDBService, [{ optional: true; }]>;
|
|
35
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GeoDBService>;
|
|
36
|
-
}
|