@artstesh/maps 5.0.9 → 5.0.10
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/dist/esm2022/map/map-plate/map-plate.component.mjs +4 -1
- package/dist/esm2022/map/messages/commands/draw-selection-area.command.mjs +17 -0
- package/dist/esm2022/map/messages/index.mjs +2 -1
- package/dist/esm2022/map/messages/queries/filter-features-in-area.query.mjs +15 -0
- package/dist/esm2022/map/messages/queries/get-features-in-area.query.mjs +15 -0
- package/dist/esm2022/map/models/dictionary.mjs +54 -0
- package/dist/esm2022/map/models/index.mjs +2 -1
- package/dist/esm2022/map/services/drawing/drawing.service.mjs +25 -3
- package/dist/esm2022/map/services/feature.service.mjs +30 -0
- package/dist/esm2022/map/services/map-management.service.mjs +36 -7
- package/dist/esm2022/map/services/message-registrator.service.mjs +12 -5
- package/dist/esm2022/src/map/map-plate/map-plate.component.mjs +4 -1
- package/dist/esm2022/src/map/messages/commands/draw-selection-area.command.mjs +17 -0
- package/dist/esm2022/src/map/messages/index.mjs +2 -1
- package/dist/esm2022/src/map/messages/queries/filter-features-in-area.query.mjs +15 -0
- package/dist/esm2022/src/map/messages/queries/get-features-in-area.query.mjs +15 -0
- package/dist/esm2022/src/map/models/dictionary.mjs +54 -0
- package/dist/esm2022/src/map/models/index.mjs +2 -1
- package/dist/esm2022/src/map/services/drawing/drawing.service.mjs +25 -3
- package/dist/esm2022/src/map/services/feature.service.mjs +30 -0
- package/dist/esm2022/src/map/services/map-management.service.mjs +36 -7
- package/dist/esm2022/src/map/services/message-registrator.service.mjs +12 -5
- package/dist/fesm2022/maps-components-src-map.mjs +186 -14
- package/dist/fesm2022/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2022/maps-components.mjs +186 -14
- package/dist/fesm2022/maps-components.mjs.map +1 -1
- package/dist/map/messages/commands/draw-selection-area.command.d.ts +12 -0
- package/dist/map/messages/index.d.ts +1 -0
- package/dist/map/messages/queries/filter-features-in-area.query.d.ts +10 -0
- package/dist/map/messages/queries/get-features-in-area.query.d.ts +11 -0
- package/dist/map/models/dictionary.d.ts +17 -0
- package/dist/map/models/index.d.ts +1 -0
- package/dist/map/services/drawing/drawing.service.d.ts +2 -0
- package/dist/map/services/feature.service.d.ts +11 -0
- package/dist/map/services/map-management.service.d.ts +1 -0
- package/dist/map/services/message-registrator.service.d.ts +2 -1
- package/dist/src/map/messages/commands/draw-selection-area.command.d.ts +12 -0
- package/dist/src/map/messages/index.d.ts +1 -0
- package/dist/src/map/messages/queries/filter-features-in-area.query.d.ts +10 -0
- package/dist/src/map/messages/queries/get-features-in-area.query.d.ts +11 -0
- package/dist/src/map/models/dictionary.d.ts +17 -0
- package/dist/src/map/models/index.d.ts +1 -0
- package/dist/src/map/services/drawing/drawing.service.d.ts +2 -0
- package/dist/src/map/services/feature.service.d.ts +11 -0
- package/dist/src/map/services/map-management.service.d.ts +1 -0
- package/dist/src/map/services/message-registrator.service.d.ts +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
|
+
import { Dictionary, DrawingType } from '../../models';
|
|
3
|
+
import Style from 'ol/style/Style';
|
|
4
|
+
import { IIdentified } from '../../models/i-identified';
|
|
5
|
+
export declare class DrawSelectionAreaCommand extends PostboyCallbackMessage<Dictionary<IIdentified[]>> {
|
|
6
|
+
type: DrawingType;
|
|
7
|
+
style: Style;
|
|
8
|
+
ignore: Set<string>;
|
|
9
|
+
static readonly ID: string;
|
|
10
|
+
constructor(type: DrawingType, style: Style, ignore?: Set<string>);
|
|
11
|
+
get id(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
|
+
import { Feature } from 'ol';
|
|
3
|
+
import { Geometry } from 'ol/geom';
|
|
4
|
+
export declare class FilterFeaturesInAreaQuery extends PostboyCallbackMessage<Feature<Geometry>[]> {
|
|
5
|
+
area: Geometry;
|
|
6
|
+
features: Feature<Geometry>[];
|
|
7
|
+
static readonly ID: string;
|
|
8
|
+
constructor(area: Geometry, features: Feature<Geometry>[]);
|
|
9
|
+
get id(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
|
+
import { Geometry } from 'ol/geom';
|
|
3
|
+
import { Dictionary } from '../../models';
|
|
4
|
+
import { IIdentified } from '../../models/i-identified';
|
|
5
|
+
export declare class GetFeaturesInAreaQuery extends PostboyCallbackMessage<Dictionary<IIdentified[]>> {
|
|
6
|
+
area: Geometry;
|
|
7
|
+
ignore: Set<string>;
|
|
8
|
+
static readonly ID: string;
|
|
9
|
+
constructor(area: Geometry, ignore?: Set<string>);
|
|
10
|
+
get id(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class Dictionary<T> {
|
|
2
|
+
collection: DictionaryType<T>;
|
|
3
|
+
private _keys;
|
|
4
|
+
get keys(): string[];
|
|
5
|
+
get size(): number;
|
|
6
|
+
static clone<T>(dic: Dictionary<T>, action?: (e: T, k: string) => T): Dictionary<T>;
|
|
7
|
+
static create<T>(dic: DictionaryType<T>, action?: (e: T, k: string) => T): Dictionary<T>;
|
|
8
|
+
find(predicate: (value: T) => boolean): T | null;
|
|
9
|
+
has: (key: string) => boolean;
|
|
10
|
+
take(key: string): T | null;
|
|
11
|
+
put(key: string, value?: T | null): void;
|
|
12
|
+
rmv(key: string): void;
|
|
13
|
+
forEach(callback: (value: T, index: number) => void): void;
|
|
14
|
+
}
|
|
15
|
+
export type DictionaryType<T> = {
|
|
16
|
+
[id: string]: T;
|
|
17
|
+
};
|
|
@@ -7,6 +7,8 @@ export declare class DrawingService implements IPostboyDependingService {
|
|
|
7
7
|
private map?;
|
|
8
8
|
constructor(postboy: MapPostboyService);
|
|
9
9
|
up(): void;
|
|
10
|
+
private observeSelectArea;
|
|
11
|
+
private observeDrawing;
|
|
10
12
|
private onEnd;
|
|
11
13
|
private observeMapRender;
|
|
12
14
|
private draw;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPostboyDependingService } from '@artstesh/postboy';
|
|
2
|
+
import { MapPostboyService } from './map-postboy.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FeatureService implements IPostboyDependingService {
|
|
5
|
+
private postboy;
|
|
6
|
+
constructor(postboy: MapPostboyService);
|
|
7
|
+
up(): void;
|
|
8
|
+
private static booleanIntersects;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FeatureService>;
|
|
11
|
+
}
|
|
@@ -14,6 +14,7 @@ export declare class MapManagementService implements IPostboyDependingService {
|
|
|
14
14
|
private observeAddLayer;
|
|
15
15
|
private observePlaceFeatures;
|
|
16
16
|
private observeRemoveLayer;
|
|
17
|
+
private observeFeaturesInArea;
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<MapManagementService, never>;
|
|
18
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<MapManagementService>;
|
|
19
20
|
}
|
|
@@ -6,9 +6,10 @@ import { MapClickService } from './map-click.service';
|
|
|
6
6
|
import { MapFeatureService } from './map-feature.service';
|
|
7
7
|
import { DrawingService } from './drawing/drawing.service';
|
|
8
8
|
import { DrawingGenerationService } from './drawing/drawing-generation.service';
|
|
9
|
+
import { FeatureService } from './feature.service';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
11
|
-
constructor(service: MapPostboyService, management: MapManagementService, state: MapStateService,
|
|
12
|
+
constructor(service: MapPostboyService, management: MapManagementService, state: MapStateService, mapFeature: MapFeatureService, interaction: MapClickService, drawing: DrawingService, drawGenerator: DrawingGenerationService, feature: FeatureService);
|
|
12
13
|
protected _up(): void;
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageRegistratorService, never>;
|
|
14
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<MessageRegistratorService>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
|
+
import { Dictionary, DrawingType } from '../../models';
|
|
3
|
+
import Style from 'ol/style/Style';
|
|
4
|
+
import { IIdentified } from '../../models/i-identified';
|
|
5
|
+
export declare class DrawSelectionAreaCommand extends PostboyCallbackMessage<Dictionary<IIdentified[]>> {
|
|
6
|
+
type: DrawingType;
|
|
7
|
+
style: Style;
|
|
8
|
+
ignore: Set<string>;
|
|
9
|
+
static readonly ID: string;
|
|
10
|
+
constructor(type: DrawingType, style: Style, ignore?: Set<string>);
|
|
11
|
+
get id(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
|
+
import { Feature } from 'ol';
|
|
3
|
+
import { Geometry } from 'ol/geom';
|
|
4
|
+
export declare class FilterFeaturesInAreaQuery extends PostboyCallbackMessage<Feature<Geometry>[]> {
|
|
5
|
+
area: Geometry;
|
|
6
|
+
features: Feature<Geometry>[];
|
|
7
|
+
static readonly ID: string;
|
|
8
|
+
constructor(area: Geometry, features: Feature<Geometry>[]);
|
|
9
|
+
get id(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
|
+
import { Geometry } from 'ol/geom';
|
|
3
|
+
import { Dictionary } from '../../models';
|
|
4
|
+
import { IIdentified } from '../../models/i-identified';
|
|
5
|
+
export declare class GetFeaturesInAreaQuery extends PostboyCallbackMessage<Dictionary<IIdentified[]>> {
|
|
6
|
+
area: Geometry;
|
|
7
|
+
ignore: Set<string>;
|
|
8
|
+
static readonly ID: string;
|
|
9
|
+
constructor(area: Geometry, ignore?: Set<string>);
|
|
10
|
+
get id(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class Dictionary<T> {
|
|
2
|
+
collection: DictionaryType<T>;
|
|
3
|
+
private _keys;
|
|
4
|
+
get keys(): string[];
|
|
5
|
+
get size(): number;
|
|
6
|
+
static clone<T>(dic: Dictionary<T>, action?: (e: T, k: string) => T): Dictionary<T>;
|
|
7
|
+
static create<T>(dic: DictionaryType<T>, action?: (e: T, k: string) => T): Dictionary<T>;
|
|
8
|
+
find(predicate: (value: T) => boolean): T | null;
|
|
9
|
+
has: (key: string) => boolean;
|
|
10
|
+
take(key: string): T | null;
|
|
11
|
+
put(key: string, value?: T | null): void;
|
|
12
|
+
rmv(key: string): void;
|
|
13
|
+
forEach(callback: (value: T, index: number) => void): void;
|
|
14
|
+
}
|
|
15
|
+
export type DictionaryType<T> = {
|
|
16
|
+
[id: string]: T;
|
|
17
|
+
};
|
|
@@ -7,6 +7,8 @@ export declare class DrawingService implements IPostboyDependingService {
|
|
|
7
7
|
private map?;
|
|
8
8
|
constructor(postboy: MapPostboyService);
|
|
9
9
|
up(): void;
|
|
10
|
+
private observeSelectArea;
|
|
11
|
+
private observeDrawing;
|
|
10
12
|
private onEnd;
|
|
11
13
|
private observeMapRender;
|
|
12
14
|
private draw;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPostboyDependingService } from '@artstesh/postboy';
|
|
2
|
+
import { MapPostboyService } from './map-postboy.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FeatureService implements IPostboyDependingService {
|
|
5
|
+
private postboy;
|
|
6
|
+
constructor(postboy: MapPostboyService);
|
|
7
|
+
up(): void;
|
|
8
|
+
private static booleanIntersects;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FeatureService>;
|
|
11
|
+
}
|
|
@@ -14,6 +14,7 @@ export declare class MapManagementService implements IPostboyDependingService {
|
|
|
14
14
|
private observeAddLayer;
|
|
15
15
|
private observePlaceFeatures;
|
|
16
16
|
private observeRemoveLayer;
|
|
17
|
+
private observeFeaturesInArea;
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<MapManagementService, never>;
|
|
18
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<MapManagementService>;
|
|
19
20
|
}
|
|
@@ -6,9 +6,10 @@ import { MapClickService } from './map-click.service';
|
|
|
6
6
|
import { MapFeatureService } from './map-feature.service';
|
|
7
7
|
import { DrawingService } from './drawing/drawing.service';
|
|
8
8
|
import { DrawingGenerationService } from './drawing/drawing-generation.service';
|
|
9
|
+
import { FeatureService } from './feature.service';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
11
|
-
constructor(service: MapPostboyService, management: MapManagementService, state: MapStateService,
|
|
12
|
+
constructor(service: MapPostboyService, management: MapManagementService, state: MapStateService, mapFeature: MapFeatureService, interaction: MapClickService, drawing: DrawingService, drawGenerator: DrawingGenerationService, feature: FeatureService);
|
|
12
13
|
protected _up(): void;
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageRegistratorService, never>;
|
|
14
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<MessageRegistratorService>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artstesh/maps",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.10",
|
|
4
4
|
"author": "artstesh",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Let's draw a map ;)",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"zone.js": "~0.13.0",
|
|
45
45
|
"ol-geocoder": "^4.0.0",
|
|
46
46
|
"ol": "^6.9.0",
|
|
47
|
-
"@artstesh/postboy": "^1.0.
|
|
47
|
+
"@artstesh/postboy": "^1.0.6"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@angular-builders/custom-webpack": "^16.0.0",
|