@equinor/videx-map 2.1.7 → 2.1.9
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/README.md +55 -5
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm install --save @equinor/videx-map
|
|
|
17
17
|
## Usage
|
|
18
18
|
```js
|
|
19
19
|
// ES6
|
|
20
|
-
import { WellboreModule, FaultlineModule,
|
|
20
|
+
import { WellboreModule, FaultlineModule, FieldModule, GeoJSONModule, OutlineModule } from '@equinor/videx-map';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
<br/>
|
|
@@ -31,17 +31,18 @@ Module responsible for visualizing wellbores with roots and paths.
|
|
|
31
31
|
### Configurations
|
|
32
32
|
|
|
33
33
|
- <b>scale</b> - Relative scale of everything. (Default: 1.0)
|
|
34
|
-
- <b>wellboreWidth</b> - Width of wellbore. (Default: 0.15)
|
|
35
|
-
- <b>rootRadius</b> - Width of root. (Default: 0.4)
|
|
36
34
|
- <b>labelScale</b> - Scale of labels. (Default: 0.011)
|
|
37
35
|
- <b>labelBgOpacity</b> - Opacity of label background. (Default: 0.5)
|
|
38
|
-
- <b>fontSize</b> - Size of font. (Default:
|
|
39
|
-
- <b>batchSize</b> - Amount of wellbores per batch. (Default:
|
|
36
|
+
- <b>fontSize</b> - Size of font. (Default: 18)
|
|
37
|
+
- <b>batchSize</b> - Amount of wellbores per batch. (Default: 20)
|
|
40
38
|
- <b>zoomOrigin</b> - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
|
|
41
39
|
- <b>customEventHandler</b> - Provide your custom event handler.
|
|
42
40
|
- <b>scaling</b> - Zoom event handler.
|
|
43
41
|
- <b>gridSize</b> - Grid size to control resolution of spatial indexing.
|
|
42
|
+
- <b>wellboreResize</b> - Resize configurations of wellbores.
|
|
44
43
|
- <b>rootResize</b> - Resize configurations of roots.
|
|
44
|
+
- <b>wellboreDash</b> - Size of wellbore dash. (Default: 0.01)
|
|
45
|
+
- <b>tick</b> - Object `{ width, height }` for tick marks along wellbore lines.
|
|
45
46
|
- <b>onWellboreClick</b> - Function to be called when a wellbore is selected.
|
|
46
47
|
- <b>onHighlightOn</b> - Function to be called when wellbores are highlighted.
|
|
47
48
|
- <b>onHighlightOff</b> - Function to be called when highlight is removed.
|
|
@@ -71,6 +72,24 @@ const wellbores: WellboreModule = new WellboreModule({
|
|
|
71
72
|
});
|
|
72
73
|
```
|
|
73
74
|
|
|
75
|
+
## Field Module
|
|
76
|
+
Module responsible for visualizing oil and gas fields with filled polygons, outlines, and labels.
|
|
77
|
+
|
|
78
|
+
### Configurations
|
|
79
|
+
|
|
80
|
+
- <b>initialHash</b> - Initial scale of field hash pattern. (Default: 1.0)
|
|
81
|
+
- <b>minHash</b> - Minimum scale of field hash pattern. (Default: 0.0)
|
|
82
|
+
- <b>maxHash</b> - Maximum scale of field hash pattern. (Default: Infinity)
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
// Example configuration
|
|
86
|
+
const fields: FieldModule = new FieldModule({
|
|
87
|
+
initialHash: 0.5,
|
|
88
|
+
minHash: 0.1,
|
|
89
|
+
maxHash: 2.0,
|
|
90
|
+
});
|
|
91
|
+
```
|
|
92
|
+
|
|
74
93
|
## Faultline Module
|
|
75
94
|
Module responsible for visualizing faultlines on fields.
|
|
76
95
|
|
|
@@ -87,6 +106,37 @@ const faultlines: FaultlineModule = new FaultlineModule({
|
|
|
87
106
|
});
|
|
88
107
|
```
|
|
89
108
|
|
|
109
|
+
## GeoJSON Module
|
|
110
|
+
Module responsible for visualizing arbitrary GeoJSON data, supporting `Point`, `LineString`, `Polygon`, and `MultiPolygon` geometry types.
|
|
111
|
+
|
|
112
|
+
### Configurations
|
|
113
|
+
|
|
114
|
+
- <b>customEventHandler</b> - Provide your custom event handler.
|
|
115
|
+
- <b>onFeatureHover</b> - Function called when a feature is hovered.
|
|
116
|
+
- <b>outlineResize</b> - Resize configuration for outlines.
|
|
117
|
+
- <b>labelResize</b> - Resize configuration for labels.
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
// Example usage
|
|
121
|
+
const geojson: GeoJSONModule = new GeoJSONModule({
|
|
122
|
+
onFeatureHover: (event, data) => {
|
|
123
|
+
// Handle hover ...
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// Pass a GeoJSON FeatureCollection and an optional props mapper
|
|
128
|
+
geojson.set(featureCollection, feature => ({
|
|
129
|
+
id: feature.properties.id,
|
|
130
|
+
label: feature.properties.name,
|
|
131
|
+
style: {
|
|
132
|
+
lineColor: '#FF0000',
|
|
133
|
+
lineWidth: 2,
|
|
134
|
+
fillColor: '#00FF00',
|
|
135
|
+
fillOpacity: 0.5,
|
|
136
|
+
},
|
|
137
|
+
}));
|
|
138
|
+
```
|
|
139
|
+
|
|
90
140
|
## Outline Module
|
|
91
141
|
Module responsible for visualizing field outlines.
|
|
92
142
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/videx-map",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "Component for Pixi-overlay in Leaflet.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
49
49
|
"@rollup/plugin-terser": "^1.0.0",
|
|
50
50
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
|
-
"@storybook/html-webpack5": "^8.6.
|
|
51
|
+
"@storybook/html-webpack5": "^8.6.18",
|
|
52
52
|
"@types/d3-color": "^3.1.3",
|
|
53
53
|
"@types/d3-scale-chromatic": "^3.1.0",
|
|
54
54
|
"@types/d3-selection": "^3.0.11",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"husky": "^9.1.7",
|
|
65
65
|
"jsdom": "^27.1.0",
|
|
66
66
|
"leaflet": "^1.9.4",
|
|
67
|
-
"lint-staged": "^
|
|
68
|
-
"prettier": "3.8.
|
|
67
|
+
"lint-staged": "^17.0.5",
|
|
68
|
+
"prettier": "^3.8.3",
|
|
69
69
|
"proj4": "^2.20.2",
|
|
70
70
|
"rimraf": "^6.1.2",
|
|
71
71
|
"rollup": "^4.46.3",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"tslib": "^2.8.1",
|
|
77
77
|
"typedoc": "^0.28.15",
|
|
78
78
|
"typescript": "^5.9.2",
|
|
79
|
-
"vitest": "^4.
|
|
79
|
+
"vitest": "^4.1.7",
|
|
80
80
|
"vitest-webgl-canvas-mock": "^1.1.0"
|
|
81
81
|
},
|
|
82
82
|
"lint-staged": {
|
|
@@ -85,15 +85,15 @@
|
|
|
85
85
|
]
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@equinor/videx-linear-algebra": "^1.0.
|
|
89
|
-
"@equinor/videx-math": "^1.1.
|
|
90
|
-
"@equinor/videx-vector2": "^1.0.
|
|
88
|
+
"@equinor/videx-linear-algebra": "^1.0.20",
|
|
89
|
+
"@equinor/videx-math": "^1.1.8",
|
|
90
|
+
"@equinor/videx-vector2": "^1.0.53",
|
|
91
91
|
"d3-color": "^3.1.0",
|
|
92
92
|
"d3-scale-chromatic": "^3.1.0",
|
|
93
93
|
"d3-selection": "^3.0.0",
|
|
94
94
|
"earcut": "^3.0.2",
|
|
95
95
|
"pixi.js": "^8.17.1",
|
|
96
|
-
"uuid": "^
|
|
97
|
-
"yaml": "^2.
|
|
96
|
+
"uuid": "^14.0.0",
|
|
97
|
+
"yaml": "^2.9.0"
|
|
98
98
|
}
|
|
99
99
|
}
|