@equinor/videx-map 1.14.2 → 1.14.4
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/EventHandler.d.ts +21 -21
- package/dist/ExplorationLayer.d.ts +38 -38
- package/dist/FaultlineModule.d.ts +51 -51
- package/dist/FieldModule.d.ts +113 -113
- package/dist/GeoJSONModule/GeoJSONModule.d.ts +47 -47
- package/dist/GeoJSONModule/constants.d.ts +13 -13
- package/dist/GeoJSONModule/index.d.ts +6 -6
- package/dist/GeoJSONModule/interfaces.d.ts +15 -15
- package/dist/GeoJSONModule/labels.d.ts +46 -46
- package/dist/GeoJSONModule/linestring.d.ts +55 -55
- package/dist/GeoJSONModule/multipolygon.d.ts +94 -94
- package/dist/GeoJSONModule/point.d.ts +26 -26
- package/dist/GeoJSONModule/polygon.d.ts +96 -96
- package/dist/GeoJSONModule/shader.d.ts +10 -10
- package/dist/ModuleInterface.d.ts +26 -26
- package/dist/OutlineModule.d.ts +81 -81
- package/dist/ResizeConfigInterface.d.ts +14 -14
- package/dist/WellboreModule.d.ts +126 -126
- package/dist/index.d.ts +8 -8
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/pixiOverlayInterfaces.d.ts +16 -16
- package/dist/utils/ComparableArray.d.ts +60 -60
- package/dist/utils/LineDictionary.d.ts +89 -89
- package/dist/utils/LineInterpolator.d.ts +84 -84
- package/dist/utils/Log.d.ts +1 -1
- package/dist/utils/Mesh.d.ts +46 -46
- package/dist/utils/PointDictionary.d.ts +58 -58
- package/dist/utils/Radius.d.ts +2 -2
- package/dist/utils/Rect.d.ts +27 -27
- package/dist/utils/TriangleDictionary.d.ts +21 -21
- package/dist/utils/WellboreMesh.d.ts +51 -51
- package/dist/utils/centerOfMass.d.ts +8 -8
- package/dist/utils/fields/Highlighter.d.ts +33 -33
- package/dist/utils/fields/LabelManager.d.ts +62 -62
- package/dist/utils/fields/groupLabels.d.ts +5 -5
- package/dist/utils/fields/preprocessFields.d.ts +29 -29
- package/dist/utils/generateCircle.d.ts +10 -10
- package/dist/utils/linePoint.d.ts +27 -27
- package/dist/utils/lineReducer.d.ts +9 -9
- package/dist/utils/wellbores/AsyncLoop.d.ts +35 -35
- package/dist/utils/wellbores/Colors.d.ts +40 -40
- package/dist/utils/wellbores/Config.d.ts +80 -80
- package/dist/utils/wellbores/DataManager.d.ts +15 -15
- package/dist/utils/wellbores/Highlight.d.ts +18 -18
- package/dist/utils/wellbores/LabelType.d.ts +9 -9
- package/dist/utils/wellbores/Projector.d.ts +20 -20
- package/dist/utils/wellbores/RealtimeWellbore.d.ts +21 -21
- package/dist/utils/wellbores/Shader.d.ts +41 -41
- package/dist/utils/wellbores/data/Group.d.ts +48 -48
- package/dist/utils/wellbores/data/RootData.d.ts +29 -28
- package/dist/utils/wellbores/data/SourceData.d.ts +25 -25
- package/dist/utils/wellbores/data/WellboreData.d.ts +76 -76
- package/dist/utils/wellbores/data/WellboreEventData.d.ts +16 -16
- package/dist/utils/wellbores/data/details/Detail.d.ts +20 -20
- package/dist/utils/wellbores/data/details/DetailOptions.d.ts +7 -7
- package/dist/utils/wellbores/data/details/ShoeDetail.d.ts +14 -14
- package/dist/utils/wellbores/data/details/index.d.ts +11 -11
- package/dist/utils/wellbores/data/index.d.ts +6 -6
- package/dist/utils/wellbores/highlight-helper.d.ts +6 -6
- package/dist/utils/wellbores/intervals.d.ts +15 -15
- package/dist/utils/wellbores/labels/Label.d.ts +39 -39
- package/dist/utils/wellbores/labels/index.d.ts +2 -2
- package/dist/utils/wellbores/labels/label-helper.d.ts +3 -3
- package/dist/utils/wellbores/registries/CallbackRegistry.d.ts +23 -23
- package/dist/utils/wellbores/registries/ColorRegistry.d.ts +22 -22
- package/dist/utils/wellbores/registries/index.d.ts +2 -2
- package/package.json +16 -13
package/dist/EventHandler.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export interface EventHandlerCallbacks {
|
|
2
|
-
mousemove: (event: MouseEvent) => boolean;
|
|
3
|
-
mouseout: (event: MouseEvent) => boolean;
|
|
4
|
-
mousedown: (event: MouseEvent) => boolean;
|
|
5
|
-
mouseup: (event: MouseEvent) => boolean;
|
|
6
|
-
click: (event: Event) => boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface EventHandler {
|
|
9
|
-
map: L.Map;
|
|
10
|
-
element: HTMLElement;
|
|
11
|
-
callbacks: EventHandlerCallbacks;
|
|
12
|
-
register(map: L.Map, element: HTMLElement, callbacks: EventHandlerCallbacks): void;
|
|
13
|
-
unregister(): void;
|
|
14
|
-
}
|
|
15
|
-
export declare class DefaultEventHandler implements EventHandler {
|
|
16
|
-
map: L.Map;
|
|
17
|
-
element: HTMLElement;
|
|
18
|
-
callbacks: EventHandlerCallbacks;
|
|
19
|
-
register(map: L.Map, element: HTMLElement, callbacks: EventHandlerCallbacks): void;
|
|
20
|
-
unregister(): void;
|
|
21
|
-
}
|
|
1
|
+
export interface EventHandlerCallbacks {
|
|
2
|
+
mousemove: (event: MouseEvent) => boolean;
|
|
3
|
+
mouseout: (event: MouseEvent) => boolean;
|
|
4
|
+
mousedown: (event: MouseEvent) => boolean;
|
|
5
|
+
mouseup: (event: MouseEvent) => boolean;
|
|
6
|
+
click: (event: Event) => boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface EventHandler {
|
|
9
|
+
map: L.Map;
|
|
10
|
+
element: HTMLElement;
|
|
11
|
+
callbacks: EventHandlerCallbacks;
|
|
12
|
+
register(map: L.Map, element: HTMLElement, callbacks: EventHandlerCallbacks): void;
|
|
13
|
+
unregister(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare class DefaultEventHandler implements EventHandler {
|
|
16
|
+
map: L.Map;
|
|
17
|
+
element: HTMLElement;
|
|
18
|
+
callbacks: EventHandlerCallbacks;
|
|
19
|
+
register(map: L.Map, element: HTMLElement, callbacks: EventHandlerCallbacks): void;
|
|
20
|
+
unregister(): void;
|
|
21
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import * as PIXI from 'pixi.js';
|
|
2
|
-
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
-
import { RootUniforms } from './utils/wellbores/Shader';
|
|
4
|
-
import PointDictionary from './utils/PointDictionary';
|
|
5
|
-
/**
|
|
6
|
-
* Data assigned each point in point dictionary.
|
|
7
|
-
*/
|
|
8
|
-
interface PointData {
|
|
9
|
-
mesh: PIXI.Mesh;
|
|
10
|
-
uniforms: RootUniforms;
|
|
11
|
-
}
|
|
12
|
-
interface selection {
|
|
13
|
-
point: PointData;
|
|
14
|
-
/** Original z-index. */
|
|
15
|
-
zIndex: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Exploration layer
|
|
19
|
-
*
|
|
20
|
-
* Layer for displaying exploration wells.
|
|
21
|
-
*/
|
|
22
|
-
export default class ExplorationLayer extends ModuleInterface {
|
|
23
|
-
/** Dictionary used to manage points. */
|
|
24
|
-
pointDict: PointDictionary<PointData>;
|
|
25
|
-
/** Initial scale. */
|
|
26
|
-
prevScale: number;
|
|
27
|
-
/** Current selection */
|
|
28
|
-
selection: selection;
|
|
29
|
-
appendExploration(scale?: number): void;
|
|
30
|
-
/**
|
|
31
|
-
* @param scale
|
|
32
|
-
* @returns Clamped scale
|
|
33
|
-
* @private
|
|
34
|
-
*/
|
|
35
|
-
clampScale(scale: number): number;
|
|
36
|
-
highlight(lat: number, long: number): boolean;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
+
import { RootUniforms } from './utils/wellbores/Shader';
|
|
4
|
+
import PointDictionary from './utils/PointDictionary';
|
|
5
|
+
/**
|
|
6
|
+
* Data assigned each point in point dictionary.
|
|
7
|
+
*/
|
|
8
|
+
interface PointData {
|
|
9
|
+
mesh: PIXI.Mesh;
|
|
10
|
+
uniforms: RootUniforms;
|
|
11
|
+
}
|
|
12
|
+
interface selection {
|
|
13
|
+
point: PointData;
|
|
14
|
+
/** Original z-index. */
|
|
15
|
+
zIndex: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Exploration layer
|
|
19
|
+
*
|
|
20
|
+
* Layer for displaying exploration wells.
|
|
21
|
+
*/
|
|
22
|
+
export default class ExplorationLayer extends ModuleInterface {
|
|
23
|
+
/** Dictionary used to manage points. */
|
|
24
|
+
pointDict: PointDictionary<PointData>;
|
|
25
|
+
/** Initial scale. */
|
|
26
|
+
prevScale: number;
|
|
27
|
+
/** Current selection */
|
|
28
|
+
selection: selection;
|
|
29
|
+
appendExploration(scale?: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* @param scale
|
|
32
|
+
* @returns Clamped scale
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
clampScale(scale: number): number;
|
|
36
|
+
highlight(lat: number, long: number): boolean;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as PIXI from 'pixi.js';
|
|
2
|
-
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
-
/** Data format on incoming faultlines */
|
|
4
|
-
interface FaultlineData {
|
|
5
|
-
coordinates: [number, number][];
|
|
6
|
-
geometry: string;
|
|
7
|
-
modelGuid: string;
|
|
8
|
-
omniaUpdateDate: string;
|
|
9
|
-
segID: number;
|
|
10
|
-
source: string;
|
|
11
|
-
sourceCreateDate: string;
|
|
12
|
-
sourceFileName: string;
|
|
13
|
-
sourceUpdateDate: string;
|
|
14
|
-
}
|
|
15
|
-
/** Interface for faultline config. */
|
|
16
|
-
export interface InputConfig {
|
|
17
|
-
/** Color of faultline on format 0xRRGGBB. (Default: 0x727D88) */
|
|
18
|
-
color?: number;
|
|
19
|
-
/** Alpha of faultlines. (Default: 1.0) */
|
|
20
|
-
alpha?: number;
|
|
21
|
-
/** Width of outline. (Default: 0.125) */
|
|
22
|
-
outlineWidth?: number;
|
|
23
|
-
}
|
|
24
|
-
interface Config {
|
|
25
|
-
/** Color of faultline on format 0xRRGGBB. (Default: 0x727D88) */
|
|
26
|
-
color: number;
|
|
27
|
-
/** Alpha of faultlines. (Default: 1.0) */
|
|
28
|
-
alpha: number;
|
|
29
|
-
/** Width of outline. (Default: 0.125) */
|
|
30
|
-
outlineWidth: number;
|
|
31
|
-
}
|
|
32
|
-
/** Module for displaying faultlines. */
|
|
33
|
-
export default class FaultlineModule extends ModuleInterface {
|
|
34
|
-
/** Graphic elements currently existing in world space. */
|
|
35
|
-
spawned: PIXI.Graphics[];
|
|
36
|
-
/** Pool of initialized graphic elements. */
|
|
37
|
-
pool: PIXI.Graphics[];
|
|
38
|
-
/** Default config. */
|
|
39
|
-
config: Config;
|
|
40
|
-
constructor(config?: InputConfig);
|
|
41
|
-
destroy(): void;
|
|
42
|
-
/**
|
|
43
|
-
* Set collection of faultlines to display. Clears previous content on execution.
|
|
44
|
-
* @param data Faultlines to draw
|
|
45
|
-
*/
|
|
46
|
-
set(data: FaultlineData[]): void;
|
|
47
|
-
/** Clear all spawned graphic elements and return to pool. */
|
|
48
|
-
clear(): void;
|
|
49
|
-
resize(_zoom: number): void;
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
+
/** Data format on incoming faultlines */
|
|
4
|
+
interface FaultlineData {
|
|
5
|
+
coordinates: [number, number][];
|
|
6
|
+
geometry: string;
|
|
7
|
+
modelGuid: string;
|
|
8
|
+
omniaUpdateDate: string;
|
|
9
|
+
segID: number;
|
|
10
|
+
source: string;
|
|
11
|
+
sourceCreateDate: string;
|
|
12
|
+
sourceFileName: string;
|
|
13
|
+
sourceUpdateDate: string;
|
|
14
|
+
}
|
|
15
|
+
/** Interface for faultline config. */
|
|
16
|
+
export interface InputConfig {
|
|
17
|
+
/** Color of faultline on format 0xRRGGBB. (Default: 0x727D88) */
|
|
18
|
+
color?: number;
|
|
19
|
+
/** Alpha of faultlines. (Default: 1.0) */
|
|
20
|
+
alpha?: number;
|
|
21
|
+
/** Width of outline. (Default: 0.125) */
|
|
22
|
+
outlineWidth?: number;
|
|
23
|
+
}
|
|
24
|
+
interface Config {
|
|
25
|
+
/** Color of faultline on format 0xRRGGBB. (Default: 0x727D88) */
|
|
26
|
+
color: number;
|
|
27
|
+
/** Alpha of faultlines. (Default: 1.0) */
|
|
28
|
+
alpha: number;
|
|
29
|
+
/** Width of outline. (Default: 0.125) */
|
|
30
|
+
outlineWidth: number;
|
|
31
|
+
}
|
|
32
|
+
/** Module for displaying faultlines. */
|
|
33
|
+
export default class FaultlineModule extends ModuleInterface {
|
|
34
|
+
/** Graphic elements currently existing in world space. */
|
|
35
|
+
spawned: PIXI.Graphics[];
|
|
36
|
+
/** Pool of initialized graphic elements. */
|
|
37
|
+
pool: PIXI.Graphics[];
|
|
38
|
+
/** Default config. */
|
|
39
|
+
config: Config;
|
|
40
|
+
constructor(config?: InputConfig);
|
|
41
|
+
destroy(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Set collection of faultlines to display. Clears previous content on execution.
|
|
44
|
+
* @param data Faultlines to draw
|
|
45
|
+
*/
|
|
46
|
+
set(data: FaultlineData[]): void;
|
|
47
|
+
/** Clear all spawned graphic elements and return to pool. */
|
|
48
|
+
clear(): void;
|
|
49
|
+
resize(_zoom: number): void;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
package/dist/FieldModule.d.ts
CHANGED
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import * as PIXI from 'pixi.js';
|
|
2
|
-
import Vector2 from '@equinor/videx-vector2';
|
|
3
|
-
import { ModuleInterface } from './ModuleInterface';
|
|
4
|
-
import { MeshData, MeshNormalData } from './utils/Mesh';
|
|
5
|
-
import Highlighter from './utils/fields/Highlighter';
|
|
6
|
-
import LabelManager from './utils/fields/LabelManager';
|
|
7
|
-
import TriangleDictionary from './utils/TriangleDictionary';
|
|
8
|
-
type vec3 = [number, number, number];
|
|
9
|
-
interface FillUniform {
|
|
10
|
-
col1: vec3;
|
|
11
|
-
col2: vec3;
|
|
12
|
-
opacity: number;
|
|
13
|
-
hashed: boolean;
|
|
14
|
-
hashDisp: number;
|
|
15
|
-
hashWidth: number;
|
|
16
|
-
}
|
|
17
|
-
interface OutlineUniform {
|
|
18
|
-
color: vec3;
|
|
19
|
-
width: number;
|
|
20
|
-
}
|
|
21
|
-
/** Collection of data describing colors used for fill. */
|
|
22
|
-
interface FieldStyle {
|
|
23
|
-
fillColor1: vec3;
|
|
24
|
-
fillColor2: vec3;
|
|
25
|
-
fillOpacity: number;
|
|
26
|
-
outlineColor: vec3;
|
|
27
|
-
hashed: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface Field {
|
|
30
|
-
type: string;
|
|
31
|
-
geometry: {
|
|
32
|
-
type: string;
|
|
33
|
-
/**
|
|
34
|
-
* The type of data found within coordinates depends on type.
|
|
35
|
-
* For 'Polygon', coordinates is given as [number, number][][].
|
|
36
|
-
* for 'MultiPolygon', coordinates is given as [number, number][][][].
|
|
37
|
-
*/
|
|
38
|
-
coordinates: [number, number][][] | [number, number][][][];
|
|
39
|
-
};
|
|
40
|
-
properties: {
|
|
41
|
-
discname: string;
|
|
42
|
-
group: number;
|
|
43
|
-
guid?: number;
|
|
44
|
-
hctype: string;
|
|
45
|
-
label: string;
|
|
46
|
-
lat: number;
|
|
47
|
-
long: number;
|
|
48
|
-
polygonId: number;
|
|
49
|
-
status: string;
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
export interface FieldMesh {
|
|
53
|
-
fill: {
|
|
54
|
-
mesh: PIXI.Mesh;
|
|
55
|
-
uniform: FillUniform;
|
|
56
|
-
};
|
|
57
|
-
outline: {
|
|
58
|
-
mesh: PIXI.Mesh;
|
|
59
|
-
uniform: OutlineUniform;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
/** Interface for field config. */
|
|
63
|
-
interface Config {
|
|
64
|
-
/** Initial scale of field hash (Default: 1.0). */
|
|
65
|
-
initialHash?: number;
|
|
66
|
-
/** Minimum scale of field hash (Default: 0.0). */
|
|
67
|
-
minHash?: number;
|
|
68
|
-
/** Maximum scale of field hash (Default: Infinity). */
|
|
69
|
-
maxHash?: number;
|
|
70
|
-
}
|
|
71
|
-
/** Module for displaying fields. */
|
|
72
|
-
export default class FieldModule extends ModuleInterface {
|
|
73
|
-
/** Vertex shader for the fill. */
|
|
74
|
-
static vertexShaderFill: string;
|
|
75
|
-
/** Fragment shader for the fill. */
|
|
76
|
-
static fragmentShaderFill: string;
|
|
77
|
-
/** Vertex shader for the outlines. */
|
|
78
|
-
static vertexShaderOutline: string;
|
|
79
|
-
/** Fragment shader for the outlines. */
|
|
80
|
-
static fragmentShaderOutline: string;
|
|
81
|
-
/** Collection of fields with meshes. */
|
|
82
|
-
fields: FieldMesh[];
|
|
83
|
-
/** Settings for how to render fields. */
|
|
84
|
-
config: Config;
|
|
85
|
-
dict: TriangleDictionary<number>;
|
|
86
|
-
highlighter: Highlighter;
|
|
87
|
-
labelManager: LabelManager;
|
|
88
|
-
/** Index of previously highlighted field */
|
|
89
|
-
prevField: number;
|
|
90
|
-
constructor(config?: Config);
|
|
91
|
-
set(data: Field[]): void;
|
|
92
|
-
/**
|
|
93
|
-
* Draw each polygon in a polygon collection.
|
|
94
|
-
* @param polygons
|
|
95
|
-
*/
|
|
96
|
-
drawPolygons(meshData: MeshData, outlineData: MeshNormalData, fieldStyle: FieldStyle, zIndex: number): FieldMesh;
|
|
97
|
-
/**
|
|
98
|
-
* Get the fill color of a field.
|
|
99
|
-
* @param props Properties of field
|
|
100
|
-
* @returns Color used to fill
|
|
101
|
-
*/
|
|
102
|
-
getFieldStyle(guid: number, hctype: string): FieldStyle;
|
|
103
|
-
/**
|
|
104
|
-
* Project a collection of polygons.
|
|
105
|
-
* @param points Points within polygons
|
|
106
|
-
* @returns Projected polygons
|
|
107
|
-
*/
|
|
108
|
-
projectPolygons(points: [number, number][]): Vector2[];
|
|
109
|
-
resize(_zoom: number): void;
|
|
110
|
-
highlight(lat: number, long: number): boolean;
|
|
111
|
-
tryUnselect(): void;
|
|
112
|
-
}
|
|
113
|
-
export {};
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
import Vector2 from '@equinor/videx-vector2';
|
|
3
|
+
import { ModuleInterface } from './ModuleInterface';
|
|
4
|
+
import { MeshData, MeshNormalData } from './utils/Mesh';
|
|
5
|
+
import Highlighter from './utils/fields/Highlighter';
|
|
6
|
+
import LabelManager from './utils/fields/LabelManager';
|
|
7
|
+
import TriangleDictionary from './utils/TriangleDictionary';
|
|
8
|
+
type vec3 = [number, number, number];
|
|
9
|
+
interface FillUniform {
|
|
10
|
+
col1: vec3;
|
|
11
|
+
col2: vec3;
|
|
12
|
+
opacity: number;
|
|
13
|
+
hashed: boolean;
|
|
14
|
+
hashDisp: number;
|
|
15
|
+
hashWidth: number;
|
|
16
|
+
}
|
|
17
|
+
interface OutlineUniform {
|
|
18
|
+
color: vec3;
|
|
19
|
+
width: number;
|
|
20
|
+
}
|
|
21
|
+
/** Collection of data describing colors used for fill. */
|
|
22
|
+
interface FieldStyle {
|
|
23
|
+
fillColor1: vec3;
|
|
24
|
+
fillColor2: vec3;
|
|
25
|
+
fillOpacity: number;
|
|
26
|
+
outlineColor: vec3;
|
|
27
|
+
hashed: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface Field {
|
|
30
|
+
type: string;
|
|
31
|
+
geometry: {
|
|
32
|
+
type: string;
|
|
33
|
+
/**
|
|
34
|
+
* The type of data found within coordinates depends on type.
|
|
35
|
+
* For 'Polygon', coordinates is given as [number, number][][].
|
|
36
|
+
* for 'MultiPolygon', coordinates is given as [number, number][][][].
|
|
37
|
+
*/
|
|
38
|
+
coordinates: [number, number][][] | [number, number][][][];
|
|
39
|
+
};
|
|
40
|
+
properties: {
|
|
41
|
+
discname: string;
|
|
42
|
+
group: number;
|
|
43
|
+
guid?: number;
|
|
44
|
+
hctype: string;
|
|
45
|
+
label: string;
|
|
46
|
+
lat: number;
|
|
47
|
+
long: number;
|
|
48
|
+
polygonId: number;
|
|
49
|
+
status: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface FieldMesh {
|
|
53
|
+
fill: {
|
|
54
|
+
mesh: PIXI.Mesh;
|
|
55
|
+
uniform: FillUniform;
|
|
56
|
+
};
|
|
57
|
+
outline: {
|
|
58
|
+
mesh: PIXI.Mesh;
|
|
59
|
+
uniform: OutlineUniform;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** Interface for field config. */
|
|
63
|
+
interface Config {
|
|
64
|
+
/** Initial scale of field hash (Default: 1.0). */
|
|
65
|
+
initialHash?: number;
|
|
66
|
+
/** Minimum scale of field hash (Default: 0.0). */
|
|
67
|
+
minHash?: number;
|
|
68
|
+
/** Maximum scale of field hash (Default: Infinity). */
|
|
69
|
+
maxHash?: number;
|
|
70
|
+
}
|
|
71
|
+
/** Module for displaying fields. */
|
|
72
|
+
export default class FieldModule extends ModuleInterface {
|
|
73
|
+
/** Vertex shader for the fill. */
|
|
74
|
+
static vertexShaderFill: string;
|
|
75
|
+
/** Fragment shader for the fill. */
|
|
76
|
+
static fragmentShaderFill: string;
|
|
77
|
+
/** Vertex shader for the outlines. */
|
|
78
|
+
static vertexShaderOutline: string;
|
|
79
|
+
/** Fragment shader for the outlines. */
|
|
80
|
+
static fragmentShaderOutline: string;
|
|
81
|
+
/** Collection of fields with meshes. */
|
|
82
|
+
fields: FieldMesh[];
|
|
83
|
+
/** Settings for how to render fields. */
|
|
84
|
+
config: Config;
|
|
85
|
+
dict: TriangleDictionary<number>;
|
|
86
|
+
highlighter: Highlighter;
|
|
87
|
+
labelManager: LabelManager;
|
|
88
|
+
/** Index of previously highlighted field */
|
|
89
|
+
prevField: number;
|
|
90
|
+
constructor(config?: Config);
|
|
91
|
+
set(data: Field[]): void;
|
|
92
|
+
/**
|
|
93
|
+
* Draw each polygon in a polygon collection.
|
|
94
|
+
* @param polygons
|
|
95
|
+
*/
|
|
96
|
+
drawPolygons(meshData: MeshData, outlineData: MeshNormalData, fieldStyle: FieldStyle, zIndex: number): FieldMesh;
|
|
97
|
+
/**
|
|
98
|
+
* Get the fill color of a field.
|
|
99
|
+
* @param props Properties of field
|
|
100
|
+
* @returns Color used to fill
|
|
101
|
+
*/
|
|
102
|
+
getFieldStyle(guid: number, hctype: string): FieldStyle;
|
|
103
|
+
/**
|
|
104
|
+
* Project a collection of polygons.
|
|
105
|
+
* @param points Points within polygons
|
|
106
|
+
* @returns Projected polygons
|
|
107
|
+
*/
|
|
108
|
+
projectPolygons(points: [number, number][]): Vector2[];
|
|
109
|
+
resize(_zoom: number): void;
|
|
110
|
+
highlight(lat: number, long: number): boolean;
|
|
111
|
+
tryUnselect(): void;
|
|
112
|
+
}
|
|
113
|
+
export {};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import * as PIXI from 'pixi.js';
|
|
2
|
-
import Vector2 from '@equinor/videx-vector2';
|
|
3
|
-
import { ModuleInterface } from '../ModuleInterface';
|
|
4
|
-
import { EventHandler } from '../EventHandler';
|
|
5
|
-
import { default as GeoJSONMultiPolygon } from './multipolygon';
|
|
6
|
-
import { default as GeoJSONPolygon } from './polygon';
|
|
7
|
-
import { default as GeoJSONLineString } from './linestring';
|
|
8
|
-
import { default as GeoJSONPoint } from './point';
|
|
9
|
-
import { ResizeConfig, LabelResizeConfig } from '../ResizeConfigInterface';
|
|
10
|
-
import { FeatureProps } from './interfaces';
|
|
11
|
-
/** Interface for config. */
|
|
12
|
-
interface Config {
|
|
13
|
-
customEventHandler?: EventHandler;
|
|
14
|
-
onFeatureHover?: (event: MouseEvent, data: any) => void;
|
|
15
|
-
outlineResize?: ResizeConfig;
|
|
16
|
-
labelResize?: LabelResizeConfig;
|
|
17
|
-
}
|
|
18
|
-
/** Module for displaying fields. */
|
|
19
|
-
export default class GeoJSONModule extends ModuleInterface {
|
|
20
|
-
onFeatureHover: (event: MouseEvent, data: any) => void;
|
|
21
|
-
points: GeoJSONPoint;
|
|
22
|
-
linestrings: GeoJSONLineString;
|
|
23
|
-
polygons: GeoJSONPolygon;
|
|
24
|
-
multipolygons: GeoJSONMultiPolygon;
|
|
25
|
-
_eventHandler: EventHandler;
|
|
26
|
-
mapmoving: boolean;
|
|
27
|
-
labelRoot: PIXI.Container;
|
|
28
|
-
config?: Config;
|
|
29
|
-
constructor(config?: Config);
|
|
30
|
-
set(data: GeoJSON.FeatureCollection, props?: (feature: any) => FeatureProps): void;
|
|
31
|
-
/**
|
|
32
|
-
* Check for features at the given coordinates.
|
|
33
|
-
* Will give a list of feature data if any are hit or an empty list if not.
|
|
34
|
-
* @param pos Target position in lat-long
|
|
35
|
-
* @returns List of features at the given position
|
|
36
|
-
*/
|
|
37
|
-
testPosition(pos: Vector2): any;
|
|
38
|
-
onAdd(map: import('leaflet').Map): void;
|
|
39
|
-
onRemove(_map: import('leaflet').Map): void;
|
|
40
|
-
resize(zoom: number): void;
|
|
41
|
-
private handleMouseMove;
|
|
42
|
-
private handleMouseOut;
|
|
43
|
-
private handleMouseClick;
|
|
44
|
-
private handleMouseDown;
|
|
45
|
-
private handleMouseUp;
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
import Vector2 from '@equinor/videx-vector2';
|
|
3
|
+
import { ModuleInterface } from '../ModuleInterface';
|
|
4
|
+
import { EventHandler } from '../EventHandler';
|
|
5
|
+
import { default as GeoJSONMultiPolygon } from './multipolygon';
|
|
6
|
+
import { default as GeoJSONPolygon } from './polygon';
|
|
7
|
+
import { default as GeoJSONLineString } from './linestring';
|
|
8
|
+
import { default as GeoJSONPoint } from './point';
|
|
9
|
+
import { ResizeConfig, LabelResizeConfig } from '../ResizeConfigInterface';
|
|
10
|
+
import { FeatureProps } from './interfaces';
|
|
11
|
+
/** Interface for config. */
|
|
12
|
+
interface Config {
|
|
13
|
+
customEventHandler?: EventHandler;
|
|
14
|
+
onFeatureHover?: (event: MouseEvent, data: any) => void;
|
|
15
|
+
outlineResize?: ResizeConfig;
|
|
16
|
+
labelResize?: LabelResizeConfig;
|
|
17
|
+
}
|
|
18
|
+
/** Module for displaying fields. */
|
|
19
|
+
export default class GeoJSONModule extends ModuleInterface {
|
|
20
|
+
onFeatureHover: (event: MouseEvent, data: any) => void;
|
|
21
|
+
points: GeoJSONPoint;
|
|
22
|
+
linestrings: GeoJSONLineString;
|
|
23
|
+
polygons: GeoJSONPolygon;
|
|
24
|
+
multipolygons: GeoJSONMultiPolygon;
|
|
25
|
+
_eventHandler: EventHandler;
|
|
26
|
+
mapmoving: boolean;
|
|
27
|
+
labelRoot: PIXI.Container;
|
|
28
|
+
config?: Config;
|
|
29
|
+
constructor(config?: Config);
|
|
30
|
+
set(data: GeoJSON.FeatureCollection, props?: (feature: any) => FeatureProps): void;
|
|
31
|
+
/**
|
|
32
|
+
* Check for features at the given coordinates.
|
|
33
|
+
* Will give a list of feature data if any are hit or an empty list if not.
|
|
34
|
+
* @param pos Target position in lat-long
|
|
35
|
+
* @returns List of features at the given position
|
|
36
|
+
*/
|
|
37
|
+
testPosition(pos: Vector2): any;
|
|
38
|
+
onAdd(map: import('leaflet').Map): void;
|
|
39
|
+
onRemove(_map: import('leaflet').Map): void;
|
|
40
|
+
resize(zoom: number): void;
|
|
41
|
+
private handleMouseMove;
|
|
42
|
+
private handleMouseOut;
|
|
43
|
+
private handleMouseClick;
|
|
44
|
+
private handleMouseDown;
|
|
45
|
+
private handleMouseUp;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export declare class Defaults {
|
|
2
|
-
static readonly DEFAULT_Z_INDEX = 1000;
|
|
3
|
-
static readonly DEFAULT_LINE_WIDTH = 0.15;
|
|
4
|
-
static readonly INITIAL_ZOOM = 20;
|
|
5
|
-
static readonly DEFAULT_FONT_FAMILY = "Arial";
|
|
6
|
-
static readonly DEFAULT_FONT_SIZE = 64;
|
|
7
|
-
static readonly DEFAULT_FONT_WEIGHT = "600";
|
|
8
|
-
static readonly DEFAULT_LABEL_COLOR = 4539717;
|
|
9
|
-
static readonly DEFAULT_LABEL_ALIGN = "center";
|
|
10
|
-
static readonly INITIAL_HASH = 1;
|
|
11
|
-
static readonly DEFAULT_MIN_HASH = 0;
|
|
12
|
-
static readonly DEFAULT_BASE_SCALE = 0.1;
|
|
13
|
-
}
|
|
1
|
+
export declare class Defaults {
|
|
2
|
+
static readonly DEFAULT_Z_INDEX = 1000;
|
|
3
|
+
static readonly DEFAULT_LINE_WIDTH = 0.15;
|
|
4
|
+
static readonly INITIAL_ZOOM = 20;
|
|
5
|
+
static readonly DEFAULT_FONT_FAMILY = "Arial";
|
|
6
|
+
static readonly DEFAULT_FONT_SIZE = 64;
|
|
7
|
+
static readonly DEFAULT_FONT_WEIGHT = "600";
|
|
8
|
+
static readonly DEFAULT_LABEL_COLOR = 4539717;
|
|
9
|
+
static readonly DEFAULT_LABEL_ALIGN = "center";
|
|
10
|
+
static readonly INITIAL_HASH = 1;
|
|
11
|
+
static readonly DEFAULT_MIN_HASH = 0;
|
|
12
|
+
static readonly DEFAULT_BASE_SCALE = 0.1;
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as GeoJSONMultiPolygon } from './multipolygon';
|
|
2
|
-
export { default as GeoJSONPolygon } from './polygon';
|
|
3
|
-
export { default as GeoJSONLineString } from './linestring';
|
|
4
|
-
export { default as GeoJSONPoint } from './point';
|
|
5
|
-
export { default as GeoJSONModule } from './GeoJSONModule';
|
|
6
|
-
export * from './interfaces';
|
|
1
|
+
export { default as GeoJSONMultiPolygon } from './multipolygon';
|
|
2
|
+
export { default as GeoJSONPolygon } from './polygon';
|
|
3
|
+
export { default as GeoJSONLineString } from './linestring';
|
|
4
|
+
export { default as GeoJSONPoint } from './point';
|
|
5
|
+
export { default as GeoJSONModule } from './GeoJSONModule';
|
|
6
|
+
export * from './interfaces';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export interface FeatureStyle {
|
|
2
|
-
lineColor: string;
|
|
3
|
-
lineWidth: number;
|
|
4
|
-
fillColor?: string;
|
|
5
|
-
fillColor2?: string;
|
|
6
|
-
fillOpacity?: number;
|
|
7
|
-
hashed?: boolean;
|
|
8
|
-
labelScale?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface FeatureProps {
|
|
11
|
-
id: number;
|
|
12
|
-
label: string;
|
|
13
|
-
style: FeatureStyle;
|
|
14
|
-
additionalData?: any;
|
|
15
|
-
}
|
|
1
|
+
export interface FeatureStyle {
|
|
2
|
+
lineColor: string;
|
|
3
|
+
lineWidth: number;
|
|
4
|
+
fillColor?: string;
|
|
5
|
+
fillColor2?: string;
|
|
6
|
+
fillOpacity?: number;
|
|
7
|
+
hashed?: boolean;
|
|
8
|
+
labelScale?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface FeatureProps {
|
|
11
|
+
id: number;
|
|
12
|
+
label: string;
|
|
13
|
+
style: FeatureStyle;
|
|
14
|
+
additionalData?: any;
|
|
15
|
+
}
|