@artstesh/maps 4.1.29 → 4.1.31

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.
@@ -398,7 +398,7 @@ class ModifyFeatureCommand extends PostboyCallbackMessage {
398
398
  * Constructs an instance of the class.
399
399
  *
400
400
  * @param {PolygonModel} model - The model representing the polygon data.
401
- * @param {Style} style - The style to be applied to the polygon.
401
+ * @param {StyleLike} style - The style to be applied to the polygon.
402
402
  * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the feature, defaults to GeoJson.
403
403
  * @param {boolean} [draggable=true] - Determines whether the polygon is draggable, defaults to true.
404
404
  */
@@ -1175,7 +1175,7 @@ class MapClickService {
1175
1175
  const model = new MapClickEvent(ev.coordinate, {}, {});
1176
1176
  this.map?.forEachFeatureAtPixel(ev.pixel, (f, l) => {
1177
1177
  this.getFeatureCollectionWithInner([f])
1178
- .filter((f) => f.getId() != null)
1178
+ .filter((f) => f.getId() != null && !!l)
1179
1179
  .forEach((fs) => {
1180
1180
  let layerName = l.get('name');
1181
1181
  if (!model.entities[layerName])
@@ -1363,6 +1363,7 @@ class FeatureModificationService {
1363
1363
  });
1364
1364
  }
1365
1365
  clearInteraction(layer) {
1366
+ layer?.getSource()?.clear();
1366
1367
  if (this.modify)
1367
1368
  this.map?.removeInteraction(this.modify);
1368
1369
  if (this.translate)