@artstesh/maps 1.1.3 → 1.1.4

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.
@@ -645,12 +645,14 @@
645
645
 
646
646
  var PolygonModel = /** @class */ (function () {
647
647
  function PolygonModel(feature, id, info) {
648
- var _b;
649
- var _a;
648
+ var _c;
649
+ var _a, _b;
650
650
  this.info = info;
651
651
  this.id = id == null ? IdGenerator.get() : id;
652
652
  this._feature = feature;
653
- _b = __read(extent.getCenter((_a = this._feature.getGeometry()) === null || _a === void 0 ? void 0 : _a.getExtent()), 2), this.lng = _b[0], this.lat = _b[1];
653
+ if (this.info)
654
+ (_a = this._feature) === null || _a === void 0 ? void 0 : _a.set(MapConstants.FeatureInfo, this.info);
655
+ _c = __read(extent.getCenter((_b = this._feature.getGeometry()) === null || _b === void 0 ? void 0 : _b.getExtent()), 2), this.lng = _c[0], this.lat = _c[1];
654
656
  }
655
657
  PolygonModel.fromGeoJson = function (id, json, info) {
656
658
  var feature = new format.GeoJSON().readFeature(json);