@evergis/api 3.0.111 → 3.0.113

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/api.esm.js CHANGED
@@ -6118,6 +6118,10 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
6118
6118
  urlPath: this.urlPath
6119
6119
  });
6120
6120
  }
6121
+
6122
+ await this.notification.subscribe("service_update"
6123
+ /* ServiceUpdate */
6124
+ );
6121
6125
  } catch (e) {
6122
6126
  throw errorHandler(e);
6123
6127
  }
@@ -6309,12 +6313,13 @@ let EvergisDynamicLayer = /*#__PURE__*/function (_DynamicLayer) {
6309
6313
  }, {
6310
6314
  key: "subscribeRedraw",
6311
6315
  value: function subscribeRedraw() {
6312
- const tag = "service_update_" + this.name.replace(/\//g, '_');
6313
- this.api.notification.subscribe(tag).then(() => {
6314
- this.api.notification.on(tag, () => {
6316
+ this.api.notification.on("service_update"
6317
+ /* ServiceUpdate */
6318
+ , e => {
6319
+ if ((e == null ? void 0 : e.data.layerName) === this.name) {
6315
6320
  this.forceUpdate();
6316
6321
  this.redraw();
6317
- });
6322
+ }
6318
6323
  });
6319
6324
  }
6320
6325
  }]);