@artstesh/maps 1.1.21 → 1.1.22

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.
@@ -774,6 +774,7 @@
774
774
  (function (FeatureOutputFormat) {
775
775
  FeatureOutputFormat[FeatureOutputFormat["GeoJson"] = 1] = "GeoJson";
776
776
  FeatureOutputFormat[FeatureOutputFormat["WKT"] = 2] = "WKT";
777
+ FeatureOutputFormat[FeatureOutputFormat["Geometry"] = 3] = "Geometry";
777
778
  })(exports.FeatureOutputFormat || (exports.FeatureOutputFormat = {}));
778
779
 
779
780
  /**
@@ -1696,7 +1697,9 @@
1696
1697
  DrawingService.prototype.onEnd = function (evt, command, layer) {
1697
1698
  command.finish(command.format === exports.FeatureOutputFormat.GeoJson
1698
1699
  ? new format.GeoJSON().writeFeature(evt.feature)
1699
- : new format.WKT().writeFeature(evt.feature));
1700
+ : command.format === exports.FeatureOutputFormat.WKT
1701
+ ? new format.WKT().writeFeature(evt.feature)
1702
+ : new format.GeoJSON().writeGeometry(evt.feature.getGeometry()));
1700
1703
  this.clearInteraction(layer);
1701
1704
  };
1702
1705
  DrawingService.prototype.observeMapRender = function () {
@@ -1794,7 +1797,9 @@
1794
1797
  FeatureModificationService.prototype.onModified = function (command) {
1795
1798
  command.next(command.format === exports.FeatureOutputFormat.GeoJson
1796
1799
  ? new format.GeoJSON().writeFeature(command.model.feature)
1797
- : new format.WKT().writeFeature(command.model.feature));
1800
+ : command.format === exports.FeatureOutputFormat.WKT
1801
+ ? new format.WKT().writeFeature(command.model.feature)
1802
+ : new format.GeoJSON().writeGeometry(command.model.feature.getGeometry()));
1798
1803
  };
1799
1804
  FeatureModificationService.prototype.observeMapRender = function () {
1800
1805
  var _this = this;