@artstesh/maps 3.1.3 → 3.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.
@@ -156,11 +156,13 @@ class MarkerModel {
156
156
 
157
157
  class PolygonModel {
158
158
  constructor(feature, id, info) {
159
- var _a;
159
+ var _a, _b;
160
160
  this.info = info;
161
161
  this.id = id == null ? IdGenerator.get() : id;
162
162
  this._feature = feature;
163
- [this.lng, this.lat] = getCenter((_a = this._feature.getGeometry()) === null || _a === void 0 ? void 0 : _a.getExtent());
163
+ if (this.info)
164
+ (_a = this._feature) === null || _a === void 0 ? void 0 : _a.set(MapConstants.FeatureInfo, this.info);
165
+ [this.lng, this.lat] = getCenter((_b = this._feature.getGeometry()) === null || _b === void 0 ? void 0 : _b.getExtent());
164
166
  }
165
167
  static fromGeoJson(id, json, info) {
166
168
  let feature = new GeoJSON().readFeature(json);