@artstesh/maps 4.1.21 → 4.1.23

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.
@@ -279,6 +279,7 @@ var FeatureOutputFormat;
279
279
  (function (FeatureOutputFormat) {
280
280
  FeatureOutputFormat[FeatureOutputFormat["GeoJson"] = 1] = "GeoJson";
281
281
  FeatureOutputFormat[FeatureOutputFormat["WKT"] = 2] = "WKT";
282
+ FeatureOutputFormat[FeatureOutputFormat["Geometry"] = 3] = "Geometry";
282
283
  })(FeatureOutputFormat || (FeatureOutputFormat = {}));
283
284
 
284
285
  /**
@@ -626,6 +627,15 @@ class GetFeaturesInPointQuery extends PostboyCallbackMessage {
626
627
  }
627
628
  GetFeaturesInPointQuery.ID = '99bbc56f-34a2-4064-8300-13bb3d0662c1';
628
629
 
630
+ class FitToFeaturesCommand extends PostboyGenericMessage {
631
+ constructor(features, zoomAfter = 0) {
632
+ super();
633
+ this.features = features;
634
+ this.zoomAfter = zoomAfter;
635
+ }
636
+ }
637
+ FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
638
+
629
639
  class AddLayerCommand extends PostboyGenericMessage {
630
640
  constructor(layer) {
631
641
  super();
@@ -667,15 +677,6 @@ class RemoveTileCommand extends PostboyGenericMessage {
667
677
  }
668
678
  RemoveTileCommand.ID = 'dab0f861-bb25-46da-9388-717bfaae798f';
669
679
 
670
- class FitToFeaturesCommand extends PostboyGenericMessage {
671
- constructor(features, zoomAfter = 0) {
672
- super();
673
- this.features = features;
674
- this.zoomAfter = zoomAfter;
675
- }
676
- }
677
- FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
678
-
679
680
  class GetLayerQuery extends PostboyCallbackMessage {
680
681
  constructor(name) {
681
682
  super();
@@ -1066,7 +1067,9 @@ class DrawingService {
1066
1067
  onEnd(evt, command, layer) {
1067
1068
  command.finish(command.format === FeatureOutputFormat.GeoJson
1068
1069
  ? new GeoJSON().writeFeature(evt.feature)
1069
- : new WKT().writeFeature(evt.feature));
1070
+ : command.format === FeatureOutputFormat.WKT
1071
+ ? new WKT().writeFeature(evt.feature)
1072
+ : new GeoJSON().writeGeometry(evt.feature.getGeometry()));
1070
1073
  this.clearInteraction(layer);
1071
1074
  }
1072
1075
  observeMapRender() {
@@ -1157,7 +1160,9 @@ class FeatureModificationService {
1157
1160
  onModified(command) {
1158
1161
  command.next(command.format === FeatureOutputFormat.GeoJson
1159
1162
  ? new GeoJSON().writeFeature(command.model.feature)
1160
- : new WKT().writeFeature(command.model.feature));
1163
+ : command.format === FeatureOutputFormat.WKT
1164
+ ? new WKT().writeFeature(command.model.feature)
1165
+ : new GeoJSON().writeGeometry(command.model.feature.getGeometry()));
1161
1166
  }
1162
1167
  observeMapRender() {
1163
1168
  this.postboy.sub(MapRenderedEvent).subscribe((m) => {
@@ -2716,5 +2721,5 @@ class StringifyFeatureHelper {
2716
2721
  * Generated bundle index. Do not edit.
2717
2722
  */
2718
2723
 
2719
- export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
2724
+ export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToFeaturesCommand, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
2720
2725
  //# sourceMappingURL=maps-components.mjs.map