@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.
@@ -278,6 +278,7 @@ var FeatureOutputFormat;
278
278
  (function (FeatureOutputFormat) {
279
279
  FeatureOutputFormat[FeatureOutputFormat["GeoJson"] = 1] = "GeoJson";
280
280
  FeatureOutputFormat[FeatureOutputFormat["WKT"] = 2] = "WKT";
281
+ FeatureOutputFormat[FeatureOutputFormat["Geometry"] = 3] = "Geometry";
281
282
  })(FeatureOutputFormat || (FeatureOutputFormat = {}));
282
283
 
283
284
  /**
@@ -625,6 +626,15 @@ class GetFeaturesInPointQuery extends PostboyCallbackMessage {
625
626
  }
626
627
  GetFeaturesInPointQuery.ID = '99bbc56f-34a2-4064-8300-13bb3d0662c1';
627
628
 
629
+ class FitToFeaturesCommand extends PostboyGenericMessage {
630
+ constructor(features, zoomAfter = 0) {
631
+ super();
632
+ this.features = features;
633
+ this.zoomAfter = zoomAfter;
634
+ }
635
+ }
636
+ FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
637
+
628
638
  class AddLayerCommand extends PostboyGenericMessage {
629
639
  constructor(layer) {
630
640
  super();
@@ -666,15 +676,6 @@ class RemoveTileCommand extends PostboyGenericMessage {
666
676
  }
667
677
  RemoveTileCommand.ID = 'dab0f861-bb25-46da-9388-717bfaae798f';
668
678
 
669
- class FitToFeaturesCommand extends PostboyGenericMessage {
670
- constructor(features, zoomAfter = 0) {
671
- super();
672
- this.features = features;
673
- this.zoomAfter = zoomAfter;
674
- }
675
- }
676
- FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
677
-
678
679
  class GetLayerQuery extends PostboyCallbackMessage {
679
680
  constructor(name) {
680
681
  super();
@@ -1057,7 +1058,9 @@ class DrawingService {
1057
1058
  onEnd(evt, command, layer) {
1058
1059
  command.finish(command.format === FeatureOutputFormat.GeoJson
1059
1060
  ? new GeoJSON().writeFeature(evt.feature)
1060
- : new WKT().writeFeature(evt.feature));
1061
+ : command.format === FeatureOutputFormat.WKT
1062
+ ? new WKT().writeFeature(evt.feature)
1063
+ : new GeoJSON().writeGeometry(evt.feature.getGeometry()));
1061
1064
  this.clearInteraction(layer);
1062
1065
  }
1063
1066
  observeMapRender() {
@@ -1143,7 +1146,9 @@ class FeatureModificationService {
1143
1146
  onModified(command) {
1144
1147
  command.next(command.format === FeatureOutputFormat.GeoJson
1145
1148
  ? new GeoJSON().writeFeature(command.model.feature)
1146
- : new WKT().writeFeature(command.model.feature));
1149
+ : command.format === FeatureOutputFormat.WKT
1150
+ ? new WKT().writeFeature(command.model.feature)
1151
+ : new GeoJSON().writeGeometry(command.model.feature.getGeometry()));
1147
1152
  }
1148
1153
  observeMapRender() {
1149
1154
  this.postboy.sub(MapRenderedEvent).subscribe((m) => {
@@ -2689,5 +2694,5 @@ class StringifyFeatureHelper {
2689
2694
  * Generated bundle index. Do not edit.
2690
2695
  */
2691
2696
 
2692
- 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 };
2697
+ 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 };
2693
2698
  //# sourceMappingURL=maps-components-src-map.mjs.map