geokernel-electron 1.1.35 → 1.1.37
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/bin/linux-x64/libGeoKernel.Viewer.so +0 -0
- package/bin/win32-x64/GeoKernel.Core.dll +0 -0
- package/bin/win32-x64/GeoKernel.Formats.dll +0 -0
- package/bin/win32-x64/GeoKernel.Viewer.dll +0 -0
- package/package.json +1 -1
- package/src/native-signatures.js +56 -1
- package/src/native-types.js +16 -0
- package/src/types.js +32 -0
- package/src/viewer.js +272 -5
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/native-signatures.js
CHANGED
|
@@ -6,23 +6,32 @@
|
|
|
6
6
|
const SIGNATURES = Object.freeze({
|
|
7
7
|
"GeoKernelViewer_AddArcMakeConnectedLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int_p", "int", "wchar_p"]],
|
|
8
8
|
"GeoKernelViewer_AddArcSplitOnCrossLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int_p", "int", "wchar_p"]],
|
|
9
|
+
"GeoKernelViewer_AddAttributedPointLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "wchar_p", "wchar_p", "int"]],
|
|
9
10
|
"GeoKernelViewer_AddEmptyVectorLayer": ["int", ["void_p", "wchar_p", "int", "wchar_p"]],
|
|
10
11
|
"GeoKernelViewer_AddFixedPolylineLayer": ["int", ["void_p", "wchar_p", "double_p", "int_p", "int", "int", "wchar_p"]],
|
|
12
|
+
"GeoKernelViewer_AddLayerAttributeDefinition": ["bool", ["void_p", "int", "wchar_p", "int", "int", "int"]],
|
|
11
13
|
"GeoKernelViewer_AddLayerFile": ["bool", ["void_p", "wchar_p"]],
|
|
12
14
|
"GeoKernelViewer_AddLayerFileWithCallbacks": ["bool", ["void_p", "wchar_p", "wchar_p", "progress_callback", "cancel_callback", "index_state_callback", "void_p"]],
|
|
13
15
|
"GeoKernelViewer_AddLayerFileWithOptionsJson": ["bool", ["void_p", "wchar_p", "wchar_p"]],
|
|
14
16
|
"GeoKernelViewer_AddOpenStreetMapLayer": ["int", ["void_p", "bool"]],
|
|
15
17
|
"GeoKernelViewer_AddPointBufferLayer": ["int", ["void_p", "wchar_p", "double", "double", "double", "int", "wchar_p"]],
|
|
18
|
+
"GeoKernelViewer_AddPointBufferShape": ["bool", ["void_p", "double", "double", "double", "int", "wchar_p"]],
|
|
16
19
|
"GeoKernelViewer_AddPointLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "wchar_p"]],
|
|
20
|
+
"GeoKernelViewer_AddPointShape": ["bool", ["void_p", "double", "double", "wchar_p"]],
|
|
17
21
|
"GeoKernelViewer_AddPointToEditLayer": ["bool", ["void_p", "int", "double", "double"]],
|
|
18
22
|
"GeoKernelViewer_AddPointToEditLayerWithAttributes": ["bool", ["void_p", "int", "double", "double", "wchar_p"]],
|
|
19
23
|
"GeoKernelViewer_AddPolygonBufferLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double", "int", "wchar_p"]],
|
|
24
|
+
"GeoKernelViewer_AddPolygonBufferShape": ["bool", ["void_p", "double_p", "int", "double", "int", "wchar_p"]],
|
|
20
25
|
"GeoKernelViewer_AddPolygonConvexHullLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "wchar_p"]],
|
|
21
26
|
"GeoKernelViewer_AddPolygonConvexHullTwoLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int", "wchar_p"]],
|
|
22
27
|
"GeoKernelViewer_AddPolygonDifferenceLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int", "wchar_p"]],
|
|
23
28
|
"GeoKernelViewer_AddPolygonFindAndDeleteLoopsLayer": ["int", ["void_p", "wchar_p", "double_p", "int_p", "int", "wchar_p"]],
|
|
24
29
|
"GeoKernelViewer_AddPolygonIntersectionLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int", "wchar_p"]],
|
|
25
30
|
"GeoKernelViewer_AddPolygonLayer": ["int", ["void_p", "wchar_p", "double_p", "int_p", "int", "wchar_p"]],
|
|
31
|
+
"GeoKernelViewer_AddPolygonPartsShape": ["bool", ["void_p", "double_p", "int_p", "int", "wchar_p"]],
|
|
32
|
+
"GeoKernelViewer_AddPolygonPartsShapeWithAttributes": ["bool", ["void_p", "double_p", "int_p", "int", "wchar_p", "wchar_p"]],
|
|
33
|
+
"GeoKernelViewer_AddPolygonShape": ["bool", ["void_p", "double_p", "int", "wchar_p"]],
|
|
34
|
+
"GeoKernelViewer_AddPolygonShapeWithAttributes": ["bool", ["void_p", "double_p", "int", "wchar_p", "wchar_p"]],
|
|
26
35
|
"GeoKernelViewer_AddPolygonSplitByArcLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int", "wchar_p"]],
|
|
27
36
|
"GeoKernelViewer_AddPolygonSymmetricalDifferenceLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int", "wchar_p"]],
|
|
28
37
|
"GeoKernelViewer_AddPolygonToEditLayer": ["bool", ["void_p", "int", "double_p", "int"]],
|
|
@@ -30,7 +39,9 @@ const SIGNATURES = Object.freeze({
|
|
|
30
39
|
"GeoKernelViewer_AddPolygonUnionLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double_p", "int", "wchar_p"]],
|
|
31
40
|
"GeoKernelViewer_AddPolygonUnionOnListLayer": ["int", ["void_p", "wchar_p", "double_p", "int_p", "int", "wchar_p"]],
|
|
32
41
|
"GeoKernelViewer_AddPolylineBufferLayer": ["int", ["void_p", "wchar_p", "double_p", "int", "double", "int", "wchar_p"]],
|
|
42
|
+
"GeoKernelViewer_AddPolylineBufferShape": ["bool", ["void_p", "double_p", "int", "double", "int", "wchar_p"]],
|
|
33
43
|
"GeoKernelViewer_AddPolylineLayer": ["int", ["void_p", "wchar_p", "double_p", "int_p", "int", "wchar_p"]],
|
|
44
|
+
"GeoKernelViewer_AddPolylineShape": ["bool", ["void_p", "double_p", "int", "wchar_p"]],
|
|
34
45
|
"GeoKernelViewer_AddPolylineToEditLayer": ["bool", ["void_p", "int", "double_p", "int"]],
|
|
35
46
|
"GeoKernelViewer_AddPolylineToEditLayerWithAttributes": ["bool", ["void_p", "int", "double_p", "int", "wchar_p"]],
|
|
36
47
|
"GeoKernelViewer_AddShortestRouteLayerBetweenPoints": ["bool", ["void_p", "double", "double", "double", "double", "int", "double", "double", "wchar_p", "bool", "out_route_summary_p"]],
|
|
@@ -42,6 +53,8 @@ const SIGNATURES = Object.freeze({
|
|
|
42
53
|
"GeoKernelViewer_AddXyzLayer": ["int", ["void_p", "wchar_p", "wchar_p", "int", "int", "int", "wchar_p", "bool", "wchar_p"]],
|
|
43
54
|
"GeoKernelViewer_ApplyLayerCategorizedRenderer": ["bool", ["void_p", "int", "wchar_p", "wchar_p", "int", "bool", "int", "int", "double", "double"]],
|
|
44
55
|
"GeoKernelViewer_ApplyLayerGraduatedRenderer": ["bool", ["void_p", "int", "wchar_p", "int", "int", "wchar_p", "double", "double_p", "int", "int", "bool", "int", "int", "double", "double"]],
|
|
56
|
+
"GeoKernelViewer_ArcMakeConnectedJson": ["int", ["void_p", "double_p", "int", "double_p", "int_p", "int", "out_wchar_p", "int"]],
|
|
57
|
+
"GeoKernelViewer_ArcSplitOnCrossJson": ["int", ["void_p", "double_p", "int", "double_p", "int_p", "int", "out_wchar_p", "int"]],
|
|
45
58
|
"GeoKernelViewer_BeginEditLayer": ["bool", ["void_p", "int"]],
|
|
46
59
|
"GeoKernelViewer_BuildRoutingGraphForLayer": ["bool", ["void_p", "int", "double", "bool", "wchar_p", "wchar_p", "double"]],
|
|
47
60
|
"GeoKernelViewer_CancelEditSketch": ["void", ["void_p"]],
|
|
@@ -64,6 +77,8 @@ const SIGNATURES = Object.freeze({
|
|
|
64
77
|
"GeoKernelViewer_CloseProject": ["void", ["void_p"]],
|
|
65
78
|
"GeoKernelViewer_CommitEditLayer": ["bool", ["void_p", "int"]],
|
|
66
79
|
"GeoKernelViewer_ContainsColorRamp": ["bool", ["void_p", "wchar_p"]],
|
|
80
|
+
"GeoKernelViewer_ConvexHullPolygonJson": ["int", ["void_p", "double_p", "int", "out_wchar_p", "int"]],
|
|
81
|
+
"GeoKernelViewer_ConvexHullTwoPolygonsJson": ["int", ["void_p", "double_p", "int", "double_p", "int", "out_wchar_p", "int"]],
|
|
67
82
|
"GeoKernelViewer_CoordinateSystemFromAuthorityJson": ["int", ["wchar_p", "int", "out_wchar_p", "int"]],
|
|
68
83
|
"GeoKernelViewer_CoordinateSystemFromEpsgJson": ["int", ["int", "out_wchar_p", "int"]],
|
|
69
84
|
"GeoKernelViewer_Create": ["void_p", ["int", "int"]],
|
|
@@ -73,8 +88,12 @@ const SIGNATURES = Object.freeze({
|
|
|
73
88
|
"GeoKernelViewer_DeleteSelectedVertexFromEditLayer": ["bool", ["void_p"]],
|
|
74
89
|
"GeoKernelViewer_DeleteShapeFromEditLayer": ["bool", ["void_p", "int", "int"]],
|
|
75
90
|
"GeoKernelViewer_Destroy": ["void", ["void_p"]],
|
|
91
|
+
"GeoKernelViewer_DifferencePolygonsJson": ["int", ["void_p", "double_p", "int", "double_p", "int", "out_wchar_p", "int"]],
|
|
92
|
+
"GeoKernelViewer_FindAndDeleteLoopsJson": ["int", ["void_p", "double_p", "int_p", "int", "out_wchar_p", "int"]],
|
|
76
93
|
"GeoKernelViewer_FindMatchingArcIndex": ["int", ["void_p", "double_p", "int", "double_p", "int_p", "int"]],
|
|
77
94
|
"GeoKernelViewer_FinishMeasure": ["void", ["void_p"]],
|
|
95
|
+
"GeoKernelViewer_FixPolygonJson": ["int", ["void_p", "double_p", "int", "out_wchar_p", "int"]],
|
|
96
|
+
"GeoKernelViewer_FixPolylineJson": ["int", ["void_p", "double_p", "int_p", "int", "int", "out_wchar_p", "int"]],
|
|
78
97
|
"GeoKernelViewer_FullExtent": ["void", ["void_p"]],
|
|
79
98
|
"GeoKernelViewer_GetActiveEditLayerIndex": ["int", ["void_p"]],
|
|
80
99
|
"GeoKernelViewer_GetColorRampNamesJson": ["int", ["void_p", "out_wchar_p", "int"]],
|
|
@@ -110,6 +129,8 @@ const SIGNATURES = Object.freeze({
|
|
|
110
129
|
"GeoKernelViewer_GetNewFeatureAttributesJson": ["int", ["void_p", "out_wchar_p", "int"]],
|
|
111
130
|
"GeoKernelViewer_GetPolygonCentroidInfoJson": ["int", ["void_p", "double_p", "int", "out_wchar_p", "int"]],
|
|
112
131
|
"GeoKernelViewer_GetPolylineCrossingsJson": ["int", ["void_p", "double_p", "int", "double_p", "int", "out_wchar_p", "int"]],
|
|
132
|
+
"GeoKernelViewer_GetRasterOverviewDiagnosticsJson": ["int", ["void_p", "int", "bool", "out_wchar_p", "int"]],
|
|
133
|
+
"GeoKernelViewer_GetRasterWorldTransformJson": ["int", ["void_p", "int", "double", "double", "out_wchar_p", "int"]],
|
|
113
134
|
"GeoKernelViewer_GetRenderBackendDiagnostics": ["int", ["void_p", "out_wchar_p", "int"]],
|
|
114
135
|
"GeoKernelViewer_GetRenderBackendPreference": ["int", ["void_p"]],
|
|
115
136
|
"GeoKernelViewer_GetRenderBackendPreferenceName": ["int", ["void_p", "out_wchar_p", "int"]],
|
|
@@ -132,6 +153,7 @@ const SIGNATURES = Object.freeze({
|
|
|
132
153
|
"GeoKernelViewer_GetUseHardwareAcceleration": ["bool", ["void_p"]],
|
|
133
154
|
"GeoKernelViewer_GetVerboseMode": ["bool", ["void_p"]],
|
|
134
155
|
"GeoKernelViewer_GetViewExtent": ["bool", ["void_p", "out_extent_p"]],
|
|
156
|
+
"GeoKernelViewer_GetXyzLayerDiagnosticsJson": ["int", ["void_p", "int", "out_wchar_p", "int"]],
|
|
135
157
|
"GeoKernelViewer_HasActiveEditSketch": ["bool", ["void_p"]],
|
|
136
158
|
"GeoKernelViewer_HasRoutingGraph": ["bool", ["void_p"]],
|
|
137
159
|
"GeoKernelViewer_HitTestFeatureCountInExtent": ["int", ["void_p", "double", "double", "double", "double"]],
|
|
@@ -141,6 +163,7 @@ const SIGNATURES = Object.freeze({
|
|
|
141
163
|
"GeoKernelViewer_HitTestFeaturesJson": ["int", ["void_p", "double", "double", "double", "out_wchar_p", "int"]],
|
|
142
164
|
"GeoKernelViewer_HitTestTopFeatureAtJson": ["int", ["void_p", "double", "double", "int", "out_wchar_p", "int"]],
|
|
143
165
|
"GeoKernelViewer_InsertSelectedFeatureVertexInEditLayer": ["bool", ["void_p", "int", "int", "double", "double"]],
|
|
166
|
+
"GeoKernelViewer_IntersectionPolygonsJson": ["int", ["void_p", "double_p", "int", "double_p", "int", "out_wchar_p", "int"]],
|
|
144
167
|
"GeoKernelViewer_InvalidateRenderCache": ["void", ["void_p", "bool", "bool"]],
|
|
145
168
|
"GeoKernelViewer_IsLayerDirty": ["bool", ["void_p", "int"]],
|
|
146
169
|
"GeoKernelViewer_IsLayerEditing": ["bool", ["void_p", "int"]],
|
|
@@ -149,9 +172,11 @@ const SIGNATURES = Object.freeze({
|
|
|
149
172
|
"GeoKernelViewer_OpenProject": ["bool", ["void_p", "wchar_p"]],
|
|
150
173
|
"GeoKernelViewer_OpenProjectWithProgress": ["bool", ["void_p", "wchar_p", "progress_callback", "void_p"]],
|
|
151
174
|
"GeoKernelViewer_ProcessEvents": ["void", []],
|
|
175
|
+
"GeoKernelViewer_ReadGeoJsonGeometryJson": ["int", ["void_p", "wchar_p", "out_wchar_p", "int"]],
|
|
152
176
|
"GeoKernelViewer_ReadGeoJsonLineStringJson": ["int", ["void_p", "wchar_p", "out_wchar_p", "int"]],
|
|
153
177
|
"GeoKernelViewer_ReadGeoJsonPoint": ["bool", ["void_p", "wchar_p", "out_double_p", "out_double_p"]],
|
|
154
178
|
"GeoKernelViewer_ReadGeoJsonPolygonJson": ["int", ["void_p", "wchar_p", "out_wchar_p", "int"]],
|
|
179
|
+
"GeoKernelViewer_ReadWkbGeometryJson": ["int", ["void_p", "ubyte_p", "int", "out_wchar_p", "int"]],
|
|
155
180
|
"GeoKernelViewer_ReadWkbLineStringJson": ["int", ["void_p", "ubyte_p", "int", "out_wchar_p", "int"]],
|
|
156
181
|
"GeoKernelViewer_ReadWkbPoint": ["bool", ["void_p", "ubyte_p", "int", "out_double_p", "out_double_p"]],
|
|
157
182
|
"GeoKernelViewer_ReadWkbPolygonJson": ["int", ["void_p", "ubyte_p", "int", "bool", "out_wchar_p", "int"]],
|
|
@@ -168,8 +193,11 @@ const SIGNATURES = Object.freeze({
|
|
|
168
193
|
"GeoKernelViewer_RemoveLayerByName": ["bool", ["void_p", "wchar_p"]],
|
|
169
194
|
"GeoKernelViewer_Resize": ["void", ["void_p", "int", "int"]],
|
|
170
195
|
"GeoKernelViewer_RollbackEditLayer": ["bool", ["void_p", "int"]],
|
|
196
|
+
"GeoKernelViewer_SaveLayerAsShapefile": ["bool", ["void_p", "int", "wchar_p"]],
|
|
171
197
|
"GeoKernelViewer_SaveProject": ["bool", ["void_p", "wchar_p"]],
|
|
172
198
|
"GeoKernelViewer_ScreenToWorld": ["bool", ["void_p", "double", "double", "out_double_p", "out_double_p"]],
|
|
199
|
+
"GeoKernelViewer_SelectFeatureHit": ["bool", ["void_p", "double", "double", "double", "int", "int", "int"]],
|
|
200
|
+
"GeoKernelViewer_SelectFeaturesInScreenRect": ["int", ["void_p", "int", "int", "int", "int", "int"]],
|
|
173
201
|
"GeoKernelViewer_SelectTopFeatureAt": ["bool", ["void_p", "double", "double", "int"]],
|
|
174
202
|
"GeoKernelViewer_SetActivationTypeName": ["void", ["void_p", "wchar_p"]],
|
|
175
203
|
"GeoKernelViewer_SetActiveEditLayerIndex": ["bool", ["void_p", "int"]],
|
|
@@ -218,14 +246,22 @@ const SIGNATURES = Object.freeze({
|
|
|
218
246
|
"GeoKernelViewer_SetViewExtent": ["void", ["void_p", "extent"]],
|
|
219
247
|
"GeoKernelViewer_Show": ["void", ["void_p"]],
|
|
220
248
|
"GeoKernelViewer_SimplifyPolygonRingJson": ["int", ["void_p", "double_p", "int", "double", "out_wchar_p", "int"]],
|
|
249
|
+
"GeoKernelViewer_SplitPolygonByArcJson": ["int", ["void_p", "double_p", "int", "double_p", "int", "out_wchar_p", "int"]],
|
|
221
250
|
"GeoKernelViewer_StartMeasureArea": ["void", ["void_p"]],
|
|
222
251
|
"GeoKernelViewer_StartMeasureDistance": ["void", ["void_p"]],
|
|
252
|
+
"GeoKernelViewer_SymmetricalDifferencePolygonsJson": ["int", ["void_p", "double_p", "int", "double_p", "int", "out_wchar_p", "int"]],
|
|
223
253
|
"GeoKernelViewer_ToggleTopFeatureSelectionAt": ["bool", ["void_p", "double", "double", "int"]],
|
|
254
|
+
"GeoKernelViewer_TransformPoint": ["bool", ["int", "int", "double", "double", "out_double_p", "out_double_p"]],
|
|
224
255
|
"GeoKernelViewer_UndoEditLayer": ["bool", ["void_p", "int"]],
|
|
256
|
+
"GeoKernelViewer_UnionPolygonsJson": ["int", ["void_p", "double_p", "int", "double_p", "int", "out_wchar_p", "int"]],
|
|
257
|
+
"GeoKernelViewer_UnionPolygonsOnListJson": ["int", ["void_p", "double_p", "int_p", "int", "out_wchar_p", "int"]],
|
|
225
258
|
"GeoKernelViewer_WorldToScreen": ["bool", ["void_p", "double", "double", "out_double_p", "out_double_p"]],
|
|
226
259
|
"GeoKernelViewer_WriteGeoJsonLineString": ["int", ["void_p", "double_p", "int", "out_wchar_p", "int"]],
|
|
227
260
|
"GeoKernelViewer_WriteGeoJsonPoint": ["int", ["void_p", "double", "double", "out_wchar_p", "int"]],
|
|
228
261
|
"GeoKernelViewer_WriteGeoJsonPolygon": ["int", ["void_p", "double_p", "int_p", "int", "out_wchar_p", "int"]],
|
|
262
|
+
"GeoKernelViewer_WriteLayerLastShapeGeoJson": ["int", ["void_p", "int", "out_wchar_p", "int"]],
|
|
263
|
+
"GeoKernelViewer_WriteLayerLastShapeWkb": ["int", ["void_p", "int", "out_ubyte_p", "int"]],
|
|
264
|
+
"GeoKernelViewer_WriteLayerLastShapeWkt": ["int", ["void_p", "int", "out_wchar_p", "int"]],
|
|
229
265
|
"GeoKernelViewer_WriteWkbLineString": ["int", ["void_p", "double_p", "int", "out_ubyte_p", "int"]],
|
|
230
266
|
"GeoKernelViewer_WriteWkbPoint": ["int", ["void_p", "double", "double", "out_ubyte_p", "int"]],
|
|
231
267
|
"GeoKernelViewer_WriteWkbPolygon": ["int", ["void_p", "double_p", "int_p", "int", "out_ubyte_p", "int"]],
|
|
@@ -238,12 +274,31 @@ const SIGNATURES = Object.freeze({
|
|
|
238
274
|
"GeoKernelViewer_ZoomToLayer": ["bool", ["void_p", "int"]],
|
|
239
275
|
"GeoKernelViewer_ZoomToScreenRect": ["void", ["void_p", "int", "int", "int", "int"]],
|
|
240
276
|
"GeoKernelViewer_ZoomToSelectedFeatures": ["bool", ["void_p"]],
|
|
241
|
-
"
|
|
277
|
+
"GeoKernelWindow_AddCancellableLayerLoadToolbar": ["bool", ["void_p", "void_p", "wchar_p"]],
|
|
278
|
+
"GeoKernelWindow_AddCommandToolbar": ["bool", ["void_p", "wchar_p", "command_callback", "void_p"]],
|
|
279
|
+
"GeoKernelWindow_AddControlPanel": ["bool", ["void_p", "wchar_p", "control_callback", "void_p"]],
|
|
280
|
+
"GeoKernelWindow_AddLayerManagementToolbar": ["bool", ["void_p", "void_p", "wchar_p"]],
|
|
281
|
+
"GeoKernelWindow_AddLayerPanel": ["bool", ["void_p", "void_p", "int"]],
|
|
282
|
+
"GeoKernelWindow_AddLayerSelector": ["bool", ["void_p", "void_p", "int"]],
|
|
283
|
+
"GeoKernelWindow_AddLayerStyleToolbar": ["bool", ["void_p", "void_p", "wchar_p"]],
|
|
284
|
+
"GeoKernelWindow_AddLegendPanel": ["bool", ["void_p", "wchar_p"]],
|
|
285
|
+
"GeoKernelWindow_AddLogPanel": ["bool", ["void_p", "wchar_p"]],
|
|
242
286
|
"GeoKernelWindow_AddMeasureToolbar": ["void", ["void_p", "void_p"]],
|
|
287
|
+
"GeoKernelWindow_AddNavigationToolbar": ["void", ["void_p", "void_p"]],
|
|
288
|
+
"GeoKernelWindow_AddSpatialIndexBenchmarkToolbar": ["bool", ["void_p", "void_p", "wchar_p"]],
|
|
289
|
+
"GeoKernelWindow_AddViewerPane": ["void_p", ["void_p", "wchar_p"]],
|
|
290
|
+
"GeoKernelWindow_AppendLog": ["void", ["void_p", "wchar_p"]],
|
|
291
|
+
"GeoKernelWindow_ClearLog": ["void", ["void_p"]],
|
|
243
292
|
"GeoKernelWindow_Create": ["void_p", ["int", "int", "wchar_p"]],
|
|
244
293
|
"GeoKernelWindow_Destroy": ["void", ["void_p"]],
|
|
294
|
+
"GeoKernelWindow_GetSelectedLayerIndex": ["int", ["void_p"]],
|
|
245
295
|
"GeoKernelWindow_IsVisible": ["bool", ["void_p"]],
|
|
246
296
|
"GeoKernelWindow_SetCentralViewer": ["void_p", ["void_p"]],
|
|
297
|
+
"GeoKernelWindow_SetControlValue": ["bool", ["void_p", "int", "double", "wchar_p"]],
|
|
298
|
+
"GeoKernelWindow_SetLegendItemsJson": ["bool", ["void_p", "wchar_p"]],
|
|
299
|
+
"GeoKernelWindow_SetLegendTitle": ["bool", ["void_p", "wchar_p"]],
|
|
300
|
+
"GeoKernelWindow_SetLegendWidth": ["bool", ["void_p", "int"]],
|
|
301
|
+
"GeoKernelWindow_SetStatusText": ["void", ["void_p", "wchar_p"]],
|
|
247
302
|
"GeoKernelWindow_Show": ["void", ["void_p"]],
|
|
248
303
|
});
|
|
249
304
|
|
package/src/native-types.js
CHANGED
|
@@ -59,6 +59,18 @@ const GeoKernelViewerSpatialIndexStateCallback = koffi.proto(
|
|
|
59
59
|
["int", "void *"],
|
|
60
60
|
);
|
|
61
61
|
|
|
62
|
+
const GeoKernelWindowCommandCallback = koffi.proto(
|
|
63
|
+
"GeoKernelWindowCommandCallback",
|
|
64
|
+
"void",
|
|
65
|
+
["int", "void *"],
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const GeoKernelWindowControlCallback = koffi.proto(
|
|
69
|
+
"GeoKernelWindowControlCallback",
|
|
70
|
+
"void",
|
|
71
|
+
["int", "double", "str16", "void *"],
|
|
72
|
+
);
|
|
73
|
+
|
|
62
74
|
const TYPES = Object.freeze({
|
|
63
75
|
void: "void",
|
|
64
76
|
void_p: "void *",
|
|
@@ -86,6 +98,8 @@ const TYPES = Object.freeze({
|
|
|
86
98
|
progress_callback: koffi.pointer(GeoKernelViewerLayerLoadProgressCallback),
|
|
87
99
|
cancel_callback: koffi.pointer(GeoKernelViewerLayerLoadCancellationCallback),
|
|
88
100
|
index_state_callback: koffi.pointer(GeoKernelViewerSpatialIndexStateCallback),
|
|
101
|
+
command_callback: koffi.pointer(GeoKernelWindowCommandCallback),
|
|
102
|
+
control_callback: koffi.pointer(GeoKernelWindowControlCallback),
|
|
89
103
|
});
|
|
90
104
|
|
|
91
105
|
module.exports = {
|
|
@@ -97,5 +111,7 @@ module.exports = {
|
|
|
97
111
|
GeoKernelViewerRouteSummary,
|
|
98
112
|
GeoKernelViewerScreenRectangle,
|
|
99
113
|
GeoKernelViewerSpatialIndexStateCallback,
|
|
114
|
+
GeoKernelWindowCommandCallback,
|
|
115
|
+
GeoKernelWindowControlCallback,
|
|
100
116
|
TYPES,
|
|
101
117
|
};
|
package/src/types.js
CHANGED
|
@@ -13,6 +13,37 @@ const ViewerTool = Object.freeze({
|
|
|
13
13
|
EDIT_VERTICES: 9,
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
+
const ViewerEventType = Object.freeze({
|
|
17
|
+
ACTIVE_TOOL_CHANGED: 1,
|
|
18
|
+
LAYERS_CHANGED: 2,
|
|
19
|
+
LAYER_ADDED: 3,
|
|
20
|
+
LAYER_REMOVED: 4,
|
|
21
|
+
LAYER_VISIBILITY_CHANGED: 5,
|
|
22
|
+
LAYER_EDIT_STATE_CHANGED: 6,
|
|
23
|
+
LAYER_EDIT_SESSION_STARTED: 7,
|
|
24
|
+
LAYER_EDIT_SESSION_COMMITTED: 8,
|
|
25
|
+
LAYER_EDIT_SESSION_ROLLED_BACK: 9,
|
|
26
|
+
LAYER_ORDER_CHANGED: 10,
|
|
27
|
+
SELECTION_CHANGED: 11,
|
|
28
|
+
VISIBLE_EXTENT_CHANGED: 12,
|
|
29
|
+
ZOOM_CHANGED: 13,
|
|
30
|
+
VIEW_CHANGED: 14,
|
|
31
|
+
BUSY_CHANGED: 15,
|
|
32
|
+
PROJECT_OPENED: 16,
|
|
33
|
+
PROJECT_CLOSED: 17,
|
|
34
|
+
MAP_SELECTION_BOX_FINISHED: 18,
|
|
35
|
+
MOUSE_COORDINATES_CHANGED: 19,
|
|
36
|
+
MAP_MOUSE_DOWN: 20,
|
|
37
|
+
MAP_MOUSE_MOVE: 21,
|
|
38
|
+
MAP_MOUSE_UP: 22,
|
|
39
|
+
LAYER_ADDING: 23,
|
|
40
|
+
LAYER_REMOVING: 24,
|
|
41
|
+
INDEX_CREATING: 25,
|
|
42
|
+
INDEX_CREATED: 26,
|
|
43
|
+
INDEX_LOADED: 27,
|
|
44
|
+
RENDER_BACKEND_CHANGED: 28,
|
|
45
|
+
});
|
|
46
|
+
|
|
16
47
|
const ShapeType = Object.freeze({
|
|
17
48
|
UNKNOWN: 0,
|
|
18
49
|
POINT: 1,
|
|
@@ -114,6 +145,7 @@ module.exports = {
|
|
|
114
145
|
SpatialIndexType,
|
|
115
146
|
SymbolStyleTarget,
|
|
116
147
|
ViewerTool,
|
|
148
|
+
ViewerEventType,
|
|
117
149
|
extent,
|
|
118
150
|
point,
|
|
119
151
|
routeSummary,
|
package/src/viewer.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const fs = require("fs");
|
|
4
|
+
const koffi = require("koffi");
|
|
5
|
+
const { GeoKernelViewerEventData, TYPES } = require("./native-types");
|
|
4
6
|
|
|
5
7
|
const { createNativeLibrary } = require("./native");
|
|
6
8
|
const { MAP_STYLES, argb } = require("./styles");
|
|
@@ -63,10 +65,20 @@ class ViewerWindow {
|
|
|
63
65
|
throw new Error("GeoKernelWindow_Create failed.");
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
const paneTitles = Array.isArray(options.viewerPanes) ? options.viewerPanes : null;
|
|
69
|
+
const paneHandles = paneTitles?.map((paneTitle) =>
|
|
70
|
+
this.library.function("GeoKernelWindow_AddViewerPane")(this.windowHandle, paneTitle));
|
|
71
|
+
this.viewerHandle = paneHandles?.[0] ?? this.library.windowSetCentralViewer(this.windowHandle);
|
|
72
|
+
if (!this.viewerHandle || paneHandles?.some((handle) => !handle)) {
|
|
68
73
|
this.library.windowDestroy(this.windowHandle);
|
|
69
|
-
throw new Error(
|
|
74
|
+
throw new Error(paneTitles
|
|
75
|
+
? "GeoKernelWindow_AddViewerPane failed."
|
|
76
|
+
: "GeoKernelWindow_SetCentralViewer failed.");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
this.paneFacades = [];
|
|
80
|
+
if (paneHandles) {
|
|
81
|
+
this.paneFacades = paneHandles.slice(1).map((handle) => this._createPaneFacade(handle));
|
|
70
82
|
}
|
|
71
83
|
|
|
72
84
|
if (options.navigationToolbar !== false) {
|
|
@@ -77,15 +89,53 @@ class ViewerWindow {
|
|
|
77
89
|
this.library.function("GeoKernelWindow_AddMeasureToolbar")(this.windowHandle, this.viewerHandle);
|
|
78
90
|
}
|
|
79
91
|
|
|
92
|
+
if (options.layerManagementToolbar) {
|
|
93
|
+
this.addLayerManagementToolbar(options.layerManagementToolbar);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (options.layerPanel) {
|
|
97
|
+
this.addLayerPanel(options.layerPanel);
|
|
98
|
+
}
|
|
99
|
+
if (options.layerSelector) {
|
|
100
|
+
this.addLayerSelector(options.layerSelector);
|
|
101
|
+
}
|
|
102
|
+
if (options.layerStyleToolbar) {
|
|
103
|
+
this.addLayerStyleToolbar(options.layerStyleToolbar);
|
|
104
|
+
}
|
|
105
|
+
|
|
80
106
|
this.interval = null;
|
|
81
107
|
this.visibleOnce = false;
|
|
82
108
|
this.startedAt = 0;
|
|
109
|
+
this.commandCallbacks = [];
|
|
110
|
+
this.controlCallbacks = [];
|
|
111
|
+
this.eventCallbacks = [];
|
|
83
112
|
}
|
|
84
113
|
|
|
85
114
|
setActivationType(value) {
|
|
86
115
|
this.library.setActivationType(this.viewerHandle, value);
|
|
87
116
|
}
|
|
88
117
|
|
|
118
|
+
pane(index) {
|
|
119
|
+
if (index === 0) return this;
|
|
120
|
+
return this.paneFacades[index - 1] ?? null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
_createPaneFacade(viewerHandle) {
|
|
124
|
+
const pane = Object.create(ViewerWindow.prototype);
|
|
125
|
+
pane.library = this.library;
|
|
126
|
+
pane.windowHandle = this.windowHandle;
|
|
127
|
+
pane.viewerHandle = viewerHandle;
|
|
128
|
+
pane.interval = null;
|
|
129
|
+
pane.visibleOnce = false;
|
|
130
|
+
pane.startedAt = 0;
|
|
131
|
+
pane.commandCallbacks = [];
|
|
132
|
+
pane.controlCallbacks = [];
|
|
133
|
+
pane.eventCallbacks = [];
|
|
134
|
+
pane.paneFacades = [];
|
|
135
|
+
pane.isPaneFacade = true;
|
|
136
|
+
return pane;
|
|
137
|
+
}
|
|
138
|
+
|
|
89
139
|
setLicenseManagerUrl(value) {
|
|
90
140
|
this.library.setLicenseManagerUrl(this.viewerHandle, value ?? "");
|
|
91
141
|
}
|
|
@@ -98,6 +148,159 @@ class ViewerWindow {
|
|
|
98
148
|
this.library.setTool(this.viewerHandle, tool);
|
|
99
149
|
}
|
|
100
150
|
|
|
151
|
+
addLayerManagementToolbar(configuration) {
|
|
152
|
+
const ok = this.library.function("GeoKernelWindow_AddLayerManagementToolbar")(
|
|
153
|
+
this.windowHandle,
|
|
154
|
+
this.viewerHandle,
|
|
155
|
+
jsonText(configuration),
|
|
156
|
+
);
|
|
157
|
+
if (!ok) {
|
|
158
|
+
throw new Error("GeoKernelWindow_AddLayerManagementToolbar failed.");
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
addLayerPanel(options = {}) {
|
|
163
|
+
const features =
|
|
164
|
+
(options.allowReorder === true ? 1 : 0) |
|
|
165
|
+
(options.allowVisibility === true ? 2 : 0);
|
|
166
|
+
const ok = this.library.function("GeoKernelWindow_AddLayerPanel")(
|
|
167
|
+
this.windowHandle,
|
|
168
|
+
this.viewerHandle,
|
|
169
|
+
features,
|
|
170
|
+
);
|
|
171
|
+
if (!ok) {
|
|
172
|
+
throw new Error("GeoKernelWindow_AddLayerPanel failed.");
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
addLayerSelector(options = {}) {
|
|
177
|
+
const actions = { zoom: 1 };
|
|
178
|
+
const action = actions[options.action] ?? 0;
|
|
179
|
+
const ok = this.library.function("GeoKernelWindow_AddLayerSelector")(
|
|
180
|
+
this.windowHandle,
|
|
181
|
+
this.viewerHandle,
|
|
182
|
+
action,
|
|
183
|
+
);
|
|
184
|
+
if (!ok) {
|
|
185
|
+
throw new Error("GeoKernelWindow_AddLayerSelector failed.");
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
addLayerStyleToolbar(options = {}) {
|
|
190
|
+
const ok = this.library.function("GeoKernelWindow_AddLayerStyleToolbar")(
|
|
191
|
+
this.windowHandle,
|
|
192
|
+
this.viewerHandle,
|
|
193
|
+
jsonText(options),
|
|
194
|
+
);
|
|
195
|
+
if (!ok) {
|
|
196
|
+
throw new Error("GeoKernelWindow_AddLayerStyleToolbar failed.");
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
addSpatialIndexBenchmarkToolbar(options = {}) {
|
|
201
|
+
const ok = this.library.function("GeoKernelWindow_AddSpatialIndexBenchmarkToolbar")(
|
|
202
|
+
this.windowHandle,
|
|
203
|
+
this.viewerHandle,
|
|
204
|
+
jsonText(options),
|
|
205
|
+
);
|
|
206
|
+
if (!ok) throw new Error("GeoKernelWindow_AddSpatialIndexBenchmarkToolbar failed.");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
addCancellableLayerLoadToolbar(options = {}) {
|
|
210
|
+
const ok = this.library.function("GeoKernelWindow_AddCancellableLayerLoadToolbar")(
|
|
211
|
+
this.windowHandle, this.viewerHandle, jsonText(options),
|
|
212
|
+
);
|
|
213
|
+
if (!ok) throw new Error("GeoKernelWindow_AddCancellableLayerLoadToolbar failed.");
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
addCommandToolbar(commands, onCommand) {
|
|
217
|
+
const callback = koffi.register((commandId) => onCommand(commandId), TYPES.command_callback);
|
|
218
|
+
this.commandCallbacks.push(callback);
|
|
219
|
+
const ok = this.library.function("GeoKernelWindow_AddCommandToolbar")(
|
|
220
|
+
this.windowHandle, jsonText({ commands }), callback, null,
|
|
221
|
+
);
|
|
222
|
+
if (!ok) throw new Error("GeoKernelWindow_AddCommandToolbar failed.");
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
addControlPanel(configuration, onChange) {
|
|
226
|
+
const callback = koffi.register(
|
|
227
|
+
(controlId, numericValue, textValue) => onChange(controlId, numericValue, textValue ?? ""),
|
|
228
|
+
TYPES.control_callback,
|
|
229
|
+
);
|
|
230
|
+
this.controlCallbacks.push(callback);
|
|
231
|
+
const ok = this.library.function("GeoKernelWindow_AddControlPanel")(
|
|
232
|
+
this.windowHandle, jsonText(configuration), callback, null,
|
|
233
|
+
);
|
|
234
|
+
if (!ok) throw new Error("GeoKernelWindow_AddControlPanel failed.");
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
setControlValue(controlId, value) {
|
|
238
|
+
const numericValue = typeof value === "number" ? value : 0;
|
|
239
|
+
const textValue = typeof value === "string" ? value : null;
|
|
240
|
+
return this.library.function("GeoKernelWindow_SetControlValue")(
|
|
241
|
+
this.windowHandle, Number(controlId), numericValue, textValue,
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
setStatusText(text) {
|
|
246
|
+
this.library.function("GeoKernelWindow_SetStatusText")(this.windowHandle, text ?? "");
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
addLogPanel(title = "Event log") {
|
|
250
|
+
const ok = this.library.function("GeoKernelWindow_AddLogPanel")(this.windowHandle, title);
|
|
251
|
+
if (!ok) throw new Error("GeoKernelWindow_AddLogPanel failed.");
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
addLegendPanel(title = "Legend") {
|
|
255
|
+
const ok = this.library.function("GeoKernelWindow_AddLegendPanel")(this.windowHandle, title);
|
|
256
|
+
if (!ok) throw new Error("GeoKernelWindow_AddLegendPanel failed.");
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
setLegendTitle(title) {
|
|
260
|
+
return this.library.function("GeoKernelWindow_SetLegendTitle")(this.windowHandle, title);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
setLegendWidth(width) {
|
|
264
|
+
return this.library.function("GeoKernelWindow_SetLegendWidth")(this.windowHandle, Number(width));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
setLegendItems(items) {
|
|
268
|
+
return this.library.function("GeoKernelWindow_SetLegendItemsJson")(
|
|
269
|
+
this.windowHandle, jsonText(items),
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
appendLog(text) {
|
|
274
|
+
this.library.function("GeoKernelWindow_AppendLog")(this.windowHandle, text ?? "");
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
clearLog() {
|
|
278
|
+
this.library.function("GeoKernelWindow_ClearLog")(this.windowHandle);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
selectedLayerIndex() {
|
|
282
|
+
return this.library.function("GeoKernelWindow_GetSelectedLayerIndex")(this.windowHandle);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
setEventCallback(onEvent) {
|
|
286
|
+
this.library.function("GeoKernelViewer_SetEventCallback")(this.viewerHandle, null, null);
|
|
287
|
+
for (const callback of this.eventCallbacks) koffi.unregister(callback);
|
|
288
|
+
this.eventCallbacks = [];
|
|
289
|
+
if (typeof onEvent !== "function") return;
|
|
290
|
+
|
|
291
|
+
const callback = koffi.register((dataPointer, text) => {
|
|
292
|
+
const data = koffi.decode(dataPointer, GeoKernelViewerEventData);
|
|
293
|
+
onEvent({
|
|
294
|
+
...data,
|
|
295
|
+
extent: { ...data.extent },
|
|
296
|
+
screenRectangle: { ...data.screenRectangle },
|
|
297
|
+
text: text ?? "",
|
|
298
|
+
});
|
|
299
|
+
}, TYPES.event_callback);
|
|
300
|
+
this.eventCallbacks.push(callback);
|
|
301
|
+
this.library.function("GeoKernelViewer_SetEventCallback")(this.viewerHandle, callback, null);
|
|
302
|
+
}
|
|
303
|
+
|
|
101
304
|
getTool() {
|
|
102
305
|
return this._call("GeoKernelViewer_GetTool");
|
|
103
306
|
}
|
|
@@ -193,11 +396,42 @@ class ViewerWindow {
|
|
|
193
396
|
return this._call("GeoKernelViewer_AddEmptyVectorLayer", name, Number(shapeType), jsonText(style));
|
|
194
397
|
}
|
|
195
398
|
|
|
399
|
+
beginEditLayer(index) { return this._call("GeoKernelViewer_BeginEditLayer", Number(index)); }
|
|
400
|
+
commitEditLayer(index) { return this._call("GeoKernelViewer_CommitEditLayer", Number(index)); }
|
|
401
|
+
rollbackEditLayer(index) { return this._call("GeoKernelViewer_RollbackEditLayer", Number(index)); }
|
|
402
|
+
isLayerEditing(index) { return this._call("GeoKernelViewer_IsLayerEditing", Number(index)); }
|
|
403
|
+
setActiveEditLayerIndex(index) { return this._call("GeoKernelViewer_SetActiveEditLayerIndex", Number(index)); }
|
|
404
|
+
addPointToEditLayer(index, x, y) { return this._call("GeoKernelViewer_AddPointToEditLayer", Number(index), Number(x), Number(y)); }
|
|
405
|
+
addPolylineToEditLayer(index, points) {
|
|
406
|
+
const xy = xyArray(points);
|
|
407
|
+
return this._call("GeoKernelViewer_AddPolylineToEditLayer", Number(index), xy, xy.length / 2);
|
|
408
|
+
}
|
|
409
|
+
addPolygonToEditLayer(index, points) {
|
|
410
|
+
const xy = xyArray(points);
|
|
411
|
+
return this._call("GeoKernelViewer_AddPolygonToEditLayer", Number(index), xy, xy.length / 2);
|
|
412
|
+
}
|
|
413
|
+
|
|
196
414
|
addPointLayer(name, points, style) {
|
|
197
415
|
const xy = xyArray(points);
|
|
198
416
|
return this._call("GeoKernelViewer_AddPointLayer", name, xy, xy.length / 2, jsonText(style));
|
|
199
417
|
}
|
|
200
418
|
|
|
419
|
+
addAttributedPointLayer(name, points, attributes, style, sourceEpsg = 4326) {
|
|
420
|
+
if (!Array.isArray(attributes) || attributes.length !== points.length) {
|
|
421
|
+
throw new Error("Attributed point layers require one attribute object per point.");
|
|
422
|
+
}
|
|
423
|
+
const xy = xyArray(points);
|
|
424
|
+
return this._call(
|
|
425
|
+
"GeoKernelViewer_AddAttributedPointLayer",
|
|
426
|
+
name,
|
|
427
|
+
xy,
|
|
428
|
+
xy.length / 2,
|
|
429
|
+
jsonText(attributes),
|
|
430
|
+
jsonText(style),
|
|
431
|
+
Number(sourceEpsg),
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
|
|
201
435
|
addPolylineLayer(name, parts, style) {
|
|
202
436
|
const arrays = partsArrays(parts);
|
|
203
437
|
return this._call("GeoKernelViewer_AddPolylineLayer", name, arrays.xy, arrays.counts, arrays.counts.length, jsonText(style));
|
|
@@ -212,6 +446,10 @@ class ViewerWindow {
|
|
|
212
446
|
this.library.setMapBackgroundColor(this.viewerHandle, argb(color));
|
|
213
447
|
}
|
|
214
448
|
|
|
449
|
+
invalidateRenderCache(clearTileCache = false, clearLayerCache = false) {
|
|
450
|
+
this._call("GeoKernelViewer_InvalidateRenderCache", Boolean(clearTileCache), Boolean(clearLayerCache));
|
|
451
|
+
}
|
|
452
|
+
|
|
215
453
|
getBackground() {
|
|
216
454
|
return this._call("GeoKernelViewer_GetMapBackgroundColor");
|
|
217
455
|
}
|
|
@@ -330,7 +568,7 @@ class ViewerWindow {
|
|
|
330
568
|
options.colorRampName ?? "Unique",
|
|
331
569
|
options.categoryLimit ?? 64,
|
|
332
570
|
options.reverseColorRamp ?? false,
|
|
333
|
-
options.sampleLimit ??
|
|
571
|
+
options.sampleLimit ?? 5000,
|
|
334
572
|
options.styleTarget ?? 0,
|
|
335
573
|
options.startSize ?? 4.0,
|
|
336
574
|
options.endSize ?? 14.0,
|
|
@@ -351,7 +589,7 @@ class ViewerWindow {
|
|
|
351
589
|
breaks.length,
|
|
352
590
|
options.colorRampMode ?? 0,
|
|
353
591
|
options.reverseColorRamp ?? false,
|
|
354
|
-
options.sampleLimit ??
|
|
592
|
+
options.sampleLimit ?? 5000,
|
|
355
593
|
options.styleTarget ?? 0,
|
|
356
594
|
options.startSize ?? 4.0,
|
|
357
595
|
options.endSize ?? 18.0,
|
|
@@ -506,6 +744,14 @@ class ViewerWindow {
|
|
|
506
744
|
this._call("GeoKernelViewer_ClearShapes");
|
|
507
745
|
}
|
|
508
746
|
|
|
747
|
+
clearSelectedFeatures() {
|
|
748
|
+
this._call("GeoKernelViewer_ClearSelectedFeatures");
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
selectedFeatureCount() {
|
|
752
|
+
return this._call("GeoKernelViewer_GetSelectedFeatureCount");
|
|
753
|
+
}
|
|
754
|
+
|
|
509
755
|
clearLayers() {
|
|
510
756
|
this._call("GeoKernelViewer_ClearLayers");
|
|
511
757
|
}
|
|
@@ -551,6 +797,27 @@ class ViewerWindow {
|
|
|
551
797
|
this.interval = null;
|
|
552
798
|
}
|
|
553
799
|
|
|
800
|
+
for (const pane of this.paneFacades) {
|
|
801
|
+
if (pane.viewerHandle) {
|
|
802
|
+
pane.library.function("GeoKernelViewer_SetEventCallback")(pane.viewerHandle, null, null);
|
|
803
|
+
for (const callback of pane.eventCallbacks) koffi.unregister(callback);
|
|
804
|
+
pane.eventCallbacks = [];
|
|
805
|
+
pane.clearAll();
|
|
806
|
+
pane.viewerHandle = null;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
this.paneFacades = [];
|
|
810
|
+
|
|
811
|
+
if (this.viewerHandle) {
|
|
812
|
+
this.library.function("GeoKernelViewer_SetEventCallback")(this.viewerHandle, null, null);
|
|
813
|
+
}
|
|
814
|
+
for (const callback of this.eventCallbacks) koffi.unregister(callback);
|
|
815
|
+
this.eventCallbacks = [];
|
|
816
|
+
for (const callback of this.commandCallbacks) koffi.unregister(callback);
|
|
817
|
+
this.commandCallbacks = [];
|
|
818
|
+
for (const callback of this.controlCallbacks) koffi.unregister(callback);
|
|
819
|
+
this.controlCallbacks = [];
|
|
820
|
+
|
|
554
821
|
if (this.viewerHandle) {
|
|
555
822
|
this.clearAll();
|
|
556
823
|
this.viewerHandle = null;
|