geokernel-electron 1.1.33 → 1.1.35
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/assets/images/Delete.svg +1 -0
- package/assets/images/MeasureArea.svg +1 -0
- package/assets/images/MeasureDistance.svg +1 -0
- package/bin/linux-x64/libGeoKernel.Core.so +0 -0
- 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 +1 -1
- package/src/viewer.js +61 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" stroke="#1b1f23" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M14 18h36M24 18v-6h16v6m-21 0 3 36h20l3-36M28 27v18m8-18v18"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="#a8d8d0" stroke="#1b1f23" stroke-width="4" stroke-linejoin="round" d="M12 48 18 16 39 10 54 29 45 53Z"/><circle cx="18" cy="16" r="4"/><circle cx="54" cy="29" r="4"/><circle cx="45" cy="53" r="4"/><circle cx="12" cy="48" r="4"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" stroke="#1b1f23" stroke-width="4" d="M10 16v32m44-32v32M14 32h36M20 26l-6 6 6 6m24-12 6 6-6 6"/></svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/native-signatures.js
CHANGED
|
@@ -239,6 +239,7 @@ const SIGNATURES = Object.freeze({
|
|
|
239
239
|
"GeoKernelViewer_ZoomToScreenRect": ["void", ["void_p", "int", "int", "int", "int"]],
|
|
240
240
|
"GeoKernelViewer_ZoomToSelectedFeatures": ["bool", ["void_p"]],
|
|
241
241
|
"GeoKernelWindow_AddNavigationToolbar": ["void", ["void_p", "void_p"]],
|
|
242
|
+
"GeoKernelWindow_AddMeasureToolbar": ["void", ["void_p", "void_p"]],
|
|
242
243
|
"GeoKernelWindow_Create": ["void_p", ["int", "int", "wchar_p"]],
|
|
243
244
|
"GeoKernelWindow_Destroy": ["void", ["void_p"]],
|
|
244
245
|
"GeoKernelWindow_IsVisible": ["bool", ["void_p"]],
|
|
@@ -249,4 +250,3 @@ const SIGNATURES = Object.freeze({
|
|
|
249
250
|
module.exports = {
|
|
250
251
|
SIGNATURES,
|
|
251
252
|
};
|
|
252
|
-
|
package/src/viewer.js
CHANGED
|
@@ -73,6 +73,10 @@ class ViewerWindow {
|
|
|
73
73
|
this.library.windowAddNavigationToolbar(this.windowHandle, this.viewerHandle);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
if (options.measureToolbar === true) {
|
|
77
|
+
this.library.function("GeoKernelWindow_AddMeasureToolbar")(this.windowHandle, this.viewerHandle);
|
|
78
|
+
}
|
|
79
|
+
|
|
76
80
|
this.interval = null;
|
|
77
81
|
this.visibleOnce = false;
|
|
78
82
|
this.startedAt = 0;
|
|
@@ -212,6 +216,63 @@ class ViewerWindow {
|
|
|
212
216
|
return this._call("GeoKernelViewer_GetMapBackgroundColor");
|
|
213
217
|
}
|
|
214
218
|
|
|
219
|
+
getScaleBarVisible() {
|
|
220
|
+
return Boolean(this._call("GeoKernelViewer_GetScaleBarVisible"));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
getMeasureToolActive() {
|
|
224
|
+
return Boolean(this._call("GeoKernelViewer_GetMeasureToolActive"));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
setMeasureToolActive(active) {
|
|
228
|
+
this._call("GeoKernelViewer_SetMeasureToolActive", Boolean(active));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
startMeasureDistance() {
|
|
232
|
+
this._call("GeoKernelViewer_StartMeasureDistance");
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
startMeasureArea() {
|
|
236
|
+
this._call("GeoKernelViewer_StartMeasureArea");
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
clearMeasure() {
|
|
240
|
+
this._call("GeoKernelViewer_ClearMeasure");
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
getMiniMapVisible() {
|
|
244
|
+
return Boolean(this._call("GeoKernelViewer_GetMiniMapVisible"));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
setMiniMapVisible(visible) {
|
|
248
|
+
this._call("GeoKernelViewer_SetMiniMapVisible", Boolean(visible));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
setMiniMapAnchor(anchor) {
|
|
252
|
+
this._call("GeoKernelViewer_SetMiniMapAnchor", Number(anchor));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
setMiniMapBackgroundColor(color) {
|
|
256
|
+
this._call("GeoKernelViewer_SetMiniMapBackgroundColor", Number(color));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
setScaleBarVisible(visible) {
|
|
260
|
+
this._call("GeoKernelViewer_SetScaleBarVisible", Boolean(visible));
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
setScaleBarAnchor(anchor) {
|
|
264
|
+
this._call("GeoKernelViewer_SetScaleBarAnchor", Number(anchor));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
setScaleBarColors(backgroundColor, foregroundColor, textColor) {
|
|
268
|
+
this._call(
|
|
269
|
+
"GeoKernelViewer_SetScaleBarColors",
|
|
270
|
+
Number(backgroundColor),
|
|
271
|
+
Number(foregroundColor),
|
|
272
|
+
Number(textColor),
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
215
276
|
setLayerStyle(index, style) {
|
|
216
277
|
const payload = typeof style.toLayerStyleJson === "function" ? style.toLayerStyleJson() : style;
|
|
217
278
|
const ok = this.library.setLayerStyleJson(this.viewerHandle, index, jsonText(payload));
|