geokernel-electron 1.2.5 → 1.2.7

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 CHANGED
@@ -56,6 +56,13 @@ viewer.setControlEnabled(1, true);
56
56
  viewer.setCommandEnabled(10, false);
57
57
  viewer.addTextShape(28.97, 41.01, "1", { textColor: "#FFFFFF", bold: true });
58
58
 
59
+ // Lightweight named overlays update without invalidating map-layer caches.
60
+ viewer.setOverlayPoint("vehicle", 28.97, 41.01, {
61
+ pointColor: "#2563EB", lineColor: "#1E3A8A", pointSize: 20, lineWidth: 2,
62
+ });
63
+ viewer.removeOverlayShape("vehicle");
64
+ viewer.clearOverlayShapes();
65
+
59
66
  const native = createNativeLibrary();
60
67
  console.log(native.getFunction("GeoKernelViewer_GetLayerCount"));
61
68
  ```
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geokernel-electron",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "Electron bindings for the GeoKernel GIS SDK.",
5
5
  "main": "src/index.js",
6
6
  "type": "commonjs",
@@ -72,6 +72,7 @@ const SIGNATURES = Object.freeze({
72
72
  "GeoKernelViewer_ClearLayerVisibleScaleRange": ["bool", ["void_p", "int"]],
73
73
  "GeoKernelViewer_ClearMeasure": ["void", ["void_p"]],
74
74
  "GeoKernelViewer_ClearNewFeatureAttributes": ["void", ["void_p"]],
75
+ "GeoKernelViewer_ClearOverlayShapes": ["void", ["void_p"]],
75
76
  "GeoKernelViewer_ClearRoutingGraph": ["void", ["void_p"]],
76
77
  "GeoKernelViewer_ClearSelectedFeatures": ["void", ["void_p"]],
77
78
  "GeoKernelViewer_ClearShapes": ["void", ["void_p"]],
@@ -194,6 +195,7 @@ const SIGNATURES = Object.freeze({
194
195
  "GeoKernelViewer_RelatePolylinesPattern": ["bool", ["void_p", "double_p", "int", "double_p", "int", "wchar_p"]],
195
196
  "GeoKernelViewer_RemoveLayer": ["bool", ["void_p", "int"]],
196
197
  "GeoKernelViewer_RemoveLayerByName": ["bool", ["void_p", "wchar_p"]],
198
+ "GeoKernelViewer_RemoveOverlayShape": ["bool", ["void_p", "wchar_p"]],
197
199
  "GeoKernelViewer_Resize": ["void", ["void_p", "int", "int"]],
198
200
  "GeoKernelViewer_RollbackEditLayer": ["bool", ["void_p", "int"]],
199
201
  "GeoKernelViewer_SaveLayerAsShapefile": ["bool", ["void_p", "int", "wchar_p"]],
@@ -228,6 +230,7 @@ const SIGNATURES = Object.freeze({
228
230
  "GeoKernelViewer_SetMiniMapBackgroundColor": ["void", ["void_p", "int"]],
229
231
  "GeoKernelViewer_SetMiniMapVisible": ["void", ["void_p", "bool"]],
230
232
  "GeoKernelViewer_SetNewFeatureAttributesJson": ["void", ["void_p", "wchar_p"]],
233
+ "GeoKernelViewer_SetOverlayPoint": ["bool", ["void_p", "wchar_p", "double", "double", "wchar_p"]],
231
234
  "GeoKernelViewer_SetRenderBackendPreference": ["void", ["void_p", "int"]],
232
235
  "GeoKernelViewer_SetRenderBackendPreferenceName": ["void", ["void_p", "wchar_p"]],
233
236
  "GeoKernelViewer_SetRenderDebugFile": ["void", ["void_p", "bool"]],
package/src/viewer.js CHANGED
@@ -1287,6 +1287,27 @@ class ViewerWindow {
1287
1287
  return this._call("GeoKernelViewer_AddPointShape", Number(x), Number(y), jsonText(style));
1288
1288
  }
1289
1289
 
1290
+ setOverlayPoint(id, x, y, style = {}) {
1291
+ if (typeof id !== "string" || id.trim().length === 0) {
1292
+ throw new TypeError("id must be a non-empty string.");
1293
+ }
1294
+ return this._call(
1295
+ "GeoKernelViewer_SetOverlayPoint",
1296
+ id, Number(x), Number(y), jsonText(style),
1297
+ );
1298
+ }
1299
+
1300
+ removeOverlayShape(id) {
1301
+ if (typeof id !== "string" || id.trim().length === 0) {
1302
+ throw new TypeError("id must be a non-empty string.");
1303
+ }
1304
+ return this._call("GeoKernelViewer_RemoveOverlayShape", id);
1305
+ }
1306
+
1307
+ clearOverlayShapes() {
1308
+ this._call("GeoKernelViewer_ClearOverlayShapes");
1309
+ }
1310
+
1290
1311
  addTextShape(x, y, text, style = {}) {
1291
1312
  return this._call(
1292
1313
  "GeoKernelViewer_AddTextShape",